Skip to the content.
Blog | Links | Mastodon

11 July 2023 - by Jim

How to host your own Mastodon instance for free

There are many guides out there for how to host your own Mastodon instance, to be honest this one doesn’t add much to those already out there but I’m posting this as the entire thing has cost me no money at all so I thought it was worth sharing:

  1. Sign up for an Oracle Cloud account and set up an Arm instance running Ubuntu, you can probably easily use a 2 CPU, 12GB of RAM instance but feel free to use a 4/24 if you prefer (Some people have reported issues with Oracle and having their accounts suddenly suspended or deleted with no warning. This hasn’t happened to me in around 6 months of using them however I have now upgraded to a pay as you go account to provide an extra level of security/peace of mind. I still haven’t spent a single penny on the set-up though.)
  2. SSH in and do the usual apt updates/upgrades, you need to install Docker, nginx and any other useful tools you like such as ufw, mosh etc.
  3. Follow this guide to open ports 80 and 443 on your VM.
  4. Follow this guide to get Mastodon set-up in Docker. I recommend creating /opt/mastodon/ and using that as the base directory.
  5. Once the containers are up you need to run a command to create your ID (replacing yourid and [email protected] with your own):
    docker exec mastodon_web_1 tootctl accounts create yourid --email [email protected] --confirmed --role Owner
  6. Success!

Additional things you can do: