I've been playing with the excellent Tilemill / Tilestream / Wax stack from Mapbox to create some nifty web maps for my San Francisco mapping project (referred to lovingly as the 'feverdream'). Unable to justify $50/mo for hosting five maps from Mapbox's own service, I looked into the option of installing and running tilestream on a server of my own. Installing Node,js proved impossible on my Bluehost account (no sudo access, hilariously outdated software like Python 2.3); I tried EC2 but fell into a dependency hellhole trying to install Node.js on an Ubuntu image. In the end I went with a Joyent Node.js SmartMachine that 1) came with Node.js preisntalled, and 2) is totally free. So that others might tread a similar path with less yak shaving, I provide some simple instructions:
1. Sign up for Joyent (free, don't even need to give a credit card number like for EC2)
2. SSH into the machine you set up following the instructions given by Joyent and change the passwords (replace name with whatever you chose as the domain)
2. SSH into the machine you set up following the instructions given by Joyent and change the passwords (replace name with whatever you chose as the domain)
ssh root@name.no.de
sudo passwd root
<password>
<confirm password>
logout
ssh admin@name.no.de
sudo passwd admin
<password>
<confirm password>
logout
ssh node@name.no.de
passwd
<password>
<confirm password>
3. Update npm
curl http://npmjs.org/install.sh | sh
4. Install tilestream
npm install -g tilestream
5. Disable node to free up port 80 for tilestream
node-service-disable
6. SCP the tileset you want to display from path on your local machine (host) into Documents/Mapbox/tiles directory. Alternatively, use any other method ever to get it there
scp user@host:path Documents/Mapbox/tiles <password>
7. Run tilestream with the port and the domain name specified
tilestream --host name.no.de
--uiPort=80 --tilePort=80
8. Run that last process in the background by typing control-z and then 'bg' and hitting enter. Logout of the remote machine, and visit the server with a web browser. There should be a minimalist interface that includes the tileset you moved to the server. You can now reference the tile source listed here in other maps (i.e. from Wax, etc.)
Happy mapping!
Happy mapping!