Deploying Mastodon on Digital Ocean

Mastodon is the new social media platform, a decentralized alternative to Twitter that is currently blowing up. This is a step by step guide on how to run your own Mastodon instance on Digital Ocean.

Set up a Droplet

Create a new docker droplet:

This droplet has almost everything we will need preinstalled.

You will receive an email from DO with the credentials you can use to log in to start setting up the server.

Connect to the server as a root user, using ip and password from the email:

ssh root@[ip-from-email]

You will be prompted to change the default password, so do that.

Then create a new user with the username you like, and grant him the sudo powers:

adduser ray
gpasswd -a ray sudo

Connect domain name

Let's also immediately point your domain name to the droplet …