Blog How to move your Urbit pier to a Linode $5/month VPS

Jeremy Tunnell at

Updated January 14, 2023.

This guide assumes you have an existing urbit planet or star that has been running and you would like to move it to a cloud VPS.

Make sure your planet or star is shut down before beginning this guide.

If you are installing from a new planet/star, see my other guide.

You can always reference the official install instructions here.

Step 1: Create a Linode VPS

Visit Linode (referral link gives you a free two months and $25 credit) 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: Connect to your VPS

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

ssh root@vps_ip_address

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

Step 4: Configure the VPS

curl -L https://urbit.org/install/linux-x86_64/latest | tar xzk --transform='s/.*/urbit/g' && ./urbit

Everything that follows creates a 2GB swap file because this VPS has 1GB of memory. 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 pier to your new VPS

Your pier is the folder that holds all of your data.  If you're moving your planet, you'll have to move your pier.  It's a folder that is named after your planet, and usually appears empty, but it's not.

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

Step 6: Boot your Urbit

Run this command from the folder where your pier is (the folder with your planet name). Replace *planetname* with your planet name. 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.

Also, if you are on a machine with 4gb of ram or more, you can add --loom32 as an option below to use the extra memory.

./*pier*/.run *planetname* -p 32123

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 a while 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 and *planetname* with your planet name.

./*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

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