Joyent DNS Setup Guide for NodeKnockout Participants

We are very excited to be a sponsor of NodeKnocket 2013. We love node.js almost as much as we love making life easier for entrepreneurs that need to get their ideas online fast.

For NKO teams, here is an outline of how to setup your DNS records to point your domain name at your Joyent SmartMachine — to do this, you will need to modify the default POP DNS settings. 

First, you’re going to need to find your new Joyent server’s IP address. Your machine has two IP addresses: a public IP address and a private IP address. The public address is used to communicate with the Internet and is the one we want to use. You can find both addresses in the Machine Details page when logged in to your http://my.joyentcloud.com portal. You may optionally SSH into your Joyent server and issue the ifconfig -a command. If you care to read the Joyent wiki entry on finding your IP address, you may do so here. The guide covers private IP ranges which can help insure you don’t pick the wrong IP. 

Once you have found the public IP address of your Joyent machine, you’ll need to update your DNS settings in POP to point your domain at the new machine. We’ll cover both simple and advanced methods for creating these records within POP below.

When you login to POP and navigate to our Simple DNS Editor, you will see a list of available website builders and hosting providers. If you scroll down, you should see Joyent listed alphabetically.

image

Simply click on the Joyent column and you will be prompted to enter the public IP address of your machine.

image

Once you submit this form, a new overlay will outline the changes that will take place and any records that will be overridden or deleted by the change. Click on the button to confirm these changes and you’re all set!

image

If you’d prefer, you can also use our Advanced DNS Editor. On the same page as the Simple DNS Editor, there is a tab for our Advanced DNS Editor. This editor will allow you to create, update, and delete existing DNS records. To point your domain at Joyent using the advanced editor, you will need to update the existing root A record.

image

Your root A record is represented by the @ symbol. You’ll want to point this record at the IP address assigned to you by Joyent. Simply save this record once you’re done updating.

image

You will also want to handle the case of people navigating to www.<yourdomain>.co. To do this, we recommend updating the existing CNAME record with hostname set to WWW.

image

You’ll want to edit this existing record and update the record’s value to match your domain name. Note that you should include a trailing period at the end of your domain name.

image

Lastly, you may want to consider updating your machine’s hostname as it has been automatically setup by the NKO staff to be <team>.2013.nodeknockout.com. Simply issue the following command while SSHed into your server, replacing <domain> with the domain name your registered on POP:

image

DNS propagation delays may take anywhere from a few minutes to a few hours, so please be patient when trying to diagnose or configure your domain. 

Depending on your setup, you may need to update your node.js application to accept inbound connections from the domain if there are multiple apps on your machine (i.e. ConnectJS’s vhost middleware). 

If you’re in a hurry and can’t wait for DNS propagation, you can spoof your DNS records by editing your local machine’s /etc/hosts entry if you’re using Mac OSX or a Linux OS. If you’re on Windows, you will need to modify the equivalent file %SystemRoot%system32driversetchosts. When editing the file, simply create a pairing of IP address to domain name as the image below demonstrates:

We should also note that Joyent wiki documentation states that Joyent does not provide DNS services for SmartMachines outside of the single A record USERNAME.joyent.us as shown in the welcome email you should receive from them. If you want a reverse record (you want your SmartMachine IP address to have a record that points to your domain name instead of your SmartMachine zone name), you need to submit a ticket.

Good luck and feel free to ask us any questions! We can be reached on Twitter at @thePOPguys

Share this post on Tweet about this on TwitterShare on FacebookShare on Google+Share on TumblrShare on LinkedInShare on RedditDigg thisBuffer this page