Need help with local-tld?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

199 Stars 19 Forks 83 Commits 9 Opened issues


Maintain a TLD on localhost for all your projects

Services available


Need anything else?

Contributors list

Local TLD

Build Status Dependency Status devDependency Status

Local TLD maintains a local development top level domain that you can hook various projects into.

If you know

, this is
without the Rack part.

Mac OS X only, for the time being. Cross platform support desired, if you can contribute it! :)

Er what?

Here’s an example. What if you maintained two web projects A and B and have a local setup of both, and you’d like to work on them both at the same time, or switch easily, and you don’t want to mess with things like

because that is just annoying and ugly.

What if you could have these two nice addresses:

Yes, you can do that by messing with

, but it ain’t pretty, and you have to do it for every new project and it is ugly.


$ npm -g install local-tld
  # or for now git clone $thisrepo
$ $EDITOR ~/.local-tld.json
  "8000": {
    "name": "myfancyprojectA"
  "8001": {
    "name": "thatotherprojectB"

Dat it.

maps the a subdomain to a TCP port. So if you have an httpd running on
you can now reach it by going to

I want my app to register itself with local-tld!


Ok cool, how does it work?

This uses a cool dynamic DNS system that is built into Mac OS X. Local TLD runs a minimal DNS lookup server that does the address translation magic.

I want subdomains!

Easy. Just make your configuration look like this:

  "8000": {
    "name": "myfancyprojectA",
    "aliases": ["subdomain1", "subdomain2"]

Now, you should be able to reach

, and

Sweet. Does it work with boot2docker ports?

Yep! In addition to the port, you'll need to specify your

boot2docker ip
address (usually
) for the domains you want to map:
  "": {
    "name": "myfancyprojectC"

(Astute readers will note that this actually means it works with any server on any IP address, not just boot2docker)

No Original Work

This is all ripped out of

, we don’t claim any credit.


Apache 2 License


(c) 2013 Jan Lehnardt [email protected]

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.