Blog How to install Urbit on a $5/month Linode VPS

Jeremy Tunnell at

Updated June 25, 2022.

This guide assumes you have purchased or acquired an urbit planet or star and you would like to set it up on a cloud VPS so it is always on.

If you want to install on desktop (Windows, MacOS, or Linux), it is possible using the port application or you can use virtualization to install Urbit running on ubuntu on windows. HOWEVER, using port adds another layer of things that can go wrong and also your urbit will only be available when your computer is on and connected to the internet.

You can always reference the official install instructions here.

There is also an alternate method of installing using Docker and Caddy. You can find a script that will install Urbit using Docker and Caddy here.

Step 1: Create a Linode VPS

Visit Linode and sign up for an account.

Options:

  • OS: Ubuntu 20.04 LTS
  • Region: Nearest to you
  • Plan: Nanode 1GB
  • Label: *your planet name*

Step 2: Generate your key file on Bridge

There are a few ways to acquire a planet, but they all either result in you getting a master ticket, or the planet will be sent to an ETH address where you have the login credentials.

  1. Connect to Bridge.
  2. Pick the way you want to log in to Bridge. If you purchased a layer 2 planet (You'll know because you didn't pay a gas fee) or if you received a master ticket, choose "Master Ticket". If you purchased a layer 1 planet, and do not have a master ticket, you will need to log in to the Ethereum address holding your planet. In that case, choose "Metamask" or "Recovery Phrase". Hardware wallets use Metamask.
  3. Once you're logged in, click the "OS" option.
  4. In resulting page, click the "Download Arvo Keyfile" button. If this is grayed out, click on "Reset Networking Keys", then click on "Reset Networking Keys" on the following page, validate the transaction using your wallet, and then click Send Trasaction (This will use gas). Note, you can choose to "breach continuity" or not, it doesn't matter.
  5. You should now be able to "Download Arvo Keyfile" and receive a .key file that contains the secret needed to boot your ship.

Step 3: Connect to your VPS

You need to get command line access to your VPS. If you run Linux just use:

ssh ro[email protected]_ip_address

I am on Windows and I use a small utility called Putty.

Step 4: Configure the VPS

sudo apt-get update
wget --content-disposition https://urbit.org/install/linux64/latest
tar zxvf ./linux64.tgz --strip=1
rm linux64.tgz
chown -R root:root urbit

Everything that follows creates a 2GB swap file for the $5/month Linode VPS. If you have 2G of available memory, this is unneccesary.

  sudo fallocate -l 2G /swapfile
  sudo chmod 600 /swapfile
  sudo mkswap /swapfile
  sudo swapon /swapfile
  sudo cp /etc/fstab /etc/fstab.bak
  echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

Step 5: Upload your keyfile to your new VPS

  1. Go to the Network tab in Linode and get the IP address of your VPS. Also find the root login and password.
  1. Use an FTP utility to upload the keyfile (ends in .key) to your new VPS. I recommend FileZilla if you don't know how to do that. You will need to place the key file in the same directory as your urbit executable that you downloaded in step 4.

Step 6: Boot your Urbit

Run this command. Do not include the tilde (~) on your planet name. I have chosen to specify a udp port (32123) but you can choose your own if you want. See here for a complete list of options.

./urbit -w planetname -k ./keyfile.key -p 32123

You can also open the .key file and copy the key from it and type it into the boot command directly, like this:

./urbit -w planetname -p 32123 -G 0w2~Wsd.isle8.YFYUg.PHjqh.SyuLd.POEsn.j3T7s.ls8g2.Adifl.Tis2s.lse9g.asd45.JO-jL$

It will take a while to boot (10 minutes)? After it boots you will get a dojo prompt, and then you will probably see a bunch of "behn" which means your planet is downloading updates. It could take several hours to download all of the updates. Your urbit will seem unresponsive while you're downloading/installing updates.

Test it by typing (dopzod is another star)

|hi ~dopzod
hi ~dopzod successful; 
~dopzod is your neighbor

And by the way, grab your passcode so you can log into the web interface of your Urbit.

 +code

Step 7: Shut down your Urbit

ctrl-d

Step 8 Restart your Urbit within a screen

A screen will allow you to keep your urbit running if you exit your shell (putty) session.

screen -S name_of_the_screen

Name it whatever you want. Now restart your Urbit. Restarting an Urbit uses an abbreviated command. Replace [pier] with the directory named after your planet.

./[pier]/.run planetname -p 32123

Again, leave off the tilde (~). Now you can close the screen (Urbit will continue running)

ctrl-a d

When you want to open the screen again, just use:

screen -r

Step 9: Delete your keyfile

Once your Urbit has been started the first time, you don't need your keyfile anymore. Do not use your keyfile to boot again. It will destroy your pier and you will have to factory reset.

Optional - Set up HTTPS

(Official guide here: https://urbit.org/using/operations/hosting/) To set up SSL, you need to add an A record at your DNS provider that points to where your urbit is. So if your urbit is at 100.100.100.100, then you'll need to add an A record that points to this. After you do this at your DNS provider, typing "yourdomain.com" will send you to 100.100.100.100. Use https://dnschecker.org/ to see if your new DNS is pointing to the right place.

After that, make sure you have ports 80 and 443 open where your urbit is. On ubuntu it is:

ufw allow 80
ufw allow 443

Then you need to go to your dojo prompt and request a certificate. It will use LetsEncrypt, and it will first make sure that it can access your urbit on port 80 ( if it cannot, it will fail). Change /tld/domain/subdomain into whatever your domain is, so example.com would be /com/example, subdomain.example.com would be /com/example/subdomain.

:acme &path /tld/domain/subdomain

If you are successful, you will get the following response:

acme: requesting an https certificate for subdomain.example.com
acme: received https certificate for subdomain.example.com

http: restarting servers to apply configuration http: web interface live on https://localhost:443 http: web interface live on http://localhost:80 http: loopback live on http://localhost:12321

Optional: Join some groups

When you first boot up your urbit, you'll be connected with nothing. Here are some suggestions of groups you might join to get a feel for things:

  • ~bitbet-bolbel/urbit-community
  • ~tirrel/the-marketplace
  • ~wolref-podlex/foundation
  • ~rondev/group-discovery

If you have any trouble, check out the Urbit Troubleshooting page.

Add Comment