Get into DevOps is a blog about methodologies, practices and tools to improve software delivery.

Announcing: Dyname.net - The free dynamic DNS service for pros

There are tons of free dynamic DNS services out there (I think I've tried most of them), but all of them are lacking somehow. Some limit you to a couple of hostnames, some require you to login to keep your account active. Some make you download bloated update clients. All of them make you register, and most require you to give out lots of data about yourself.

I can't say I'm particularly happy with any of the existing services or their features, so I decided to build one myself. It's also the perfect opportunity for me to learn more on DNS internals.

I'm launching my own dynamic DNS service today. It's called Dyname (https://dyname.net), and my humble goal is to make it 10 times better than anything else out there.

Highlights:

  • No registration. Just start using the API or one of the provided scripts.
  • Developer mode. Point your hostname to a development HTTP server on your local machine, even if you are behind a NAT or a firewall. Great for Node.js, Rails and Django developers, among others.
  • Easy setup scripts provided for Windows, Linux, Mac OS X and Amazon Web Services.
  • A proper RESTful JSON API.
  • Compatibility APIs to support most routers and firewalls with DDNS support.
  • Setup your own private domain name, or use one of mine.
  • Unlimited number of subdomains.
  • Unlimited number of DNS queries.
  • It's absolutely free.

Bypass NAT, share your development server with Developer mode

One feature I'm particularly excited about is Developer mode. With it enabled, Dyname creates a secure tunnel from your local machine to an endpoint on the Internet, and forwards requests from your hostname to a HTTP server via this tunnel. This makes web application, API and webhook testing easy, as it enables you to run a development server on your local machine while exposing it publicly on the Internet.

In the spirit of eating my own dogfood, I've used it for testing different clients while developing the Dyname API locally. Works great!

Read next: How to use Developer mode to expose a local Node/Django/Rails/Flask development server on the Internet

Support for Amazon Web Services

Another feature I think is cool is the AWS EC2 integration.

By pasting a few lines of code into the User Data of your EC2 instance, you can register an easy to remember hostname for your instance automatically.

#!/bin/bash

EMAIL="your-email-here" bash <(wget -qO- https://aws.dyname.net)

By default, the script uses the Name tag of the instance to register a hostname. Just name your instance with, for example, web01.my-aws-infra.dyname.net, add an Instance Role to it, and paste the code into the UserData field. When the instance boots, you will be able to access it externally by its name.

Read next: Detailed instructions on setting up AWS EC2 instances with easy to remember hostnames

Currently it only supports instances running Ubuntu Linux, but support for other common Linux distributions are in the pipeline.

All of the setup scripts are available on Github. Pull requests are very welcome!

Tech Stack

As you're reading this blog, you might be interested in the tech behind the service. I'm running load balanced nodes, each with the following:

  • A custom API server written in Python
  • A custom DNS server with heavy in-memory caching, also Python
  • MongoDB replicaset
  • RabbitMQ cluster node for feeding updates to DNS cache
  • nginx for rate limiting, SSL termination and serving the static website

The stack is fully redundant and horizontally scalable. It's currently running in AWS on two t2.micro instances. Due to the nature of the setup, I am able to deploy new versions of the components and/or scale the service resources up/down with zero downtime.

Because the cost of running this is coming entirely out of my own pocket, I've put special effort into ensuring it's economical to run.

Future

The service is still very much in beta - I'm hoping to get some users in to give me feedback and weed out bugs in the existing functionality. Once that is done and the service is deemed stable, I'm very much looking to build new functionality.

For that, I need your help. What's the most important feature in a dynamic DNS service? Drop me a note as a comment, or e-mail me at miiro.juuso@gmail.com.

How to use a custom domain name with AWS EC2 instances

How to use a custom domain name with AWS EC2 instances

Persistent SSH sessions with Mosh