Here's how to set up a custom domain name for your Nodejitsu app:

1. Get a list of ip addresses for Nodejitsu's balancers:

If you're on the command line, you can get the lastest version of this list by running:

host <url>

This list of balancers is current as of November 30th, 2012:

165.225.129.253  
165.225.130.235  
165.225.130.237  
165.225.130.238  
165.225.130.239  
165.225.130.240  
165.225.130.241  
165.225.131.4  
165.225.131.5

2. Set the A-record for your app

Using your DNS provider, modify the A-record for your domain to point to the ip addresses you found in step 1. This process depends on your dns hosting provider. Add all of these addresses to your A-records, as they serve as fallbacks for each other.

3. Modify your package.json

Nodejitsu uses a special field in your package.json, called "domains", to keep track of an app's assigned custom domains. For example, the app hosted at http://jesusabdullah.jit.su has the following package.json:

{
  "name": "jesusabdullah.net",
  "subdomain": "jesusabdullah",
  "domains": [
    "jesusabdullah.net",
    "www.jesusabdullah.net"
  ],
  "scripts": {
    "start": "server.js"
  },
  "version": "0.0.0-7",
  "engines": {
    "node": "0.6.x"
  }
}

In this example, the "domains" property is a list of domains you want to point to your application.

4. Push your changes to nodejitsu

The most painless way to do this, if your app is already running, is to use jitsu apps update to push only your package.json:

josh@onix:~/dev/virtual-window$ jitsu apps update
info:   Welcome to Nodejitsu
info:   It worked if it ends with Nodejitsu ok
info:   Executing command apps update
info:   Authenticated as jesusabdullah
info:   Updating application jesusabdullah.net with:
data:   {
data:       domains: [ 'jesusabdullah.net', 'www.jesusabdullah.net' ]
data:   }
info:   Nodejitsu ok

5. Test it out!

http://www.jesusabdullah.net

Having Issues?