How to spin up your own Mastodon instance for free


The federated universe, aka fediverse, got a lot of new users ever since Twitter announced their Musk deal. What is great about the fediverse is that you are not limited to only one provider or one server. You can sign-up on any as long as it is either running the same Mastodon software, or any software that uses ActivityPub. Since Mastodon is a free, open source software (FOSS), you can easily archive your data from one Mastodon server or instance and move it to another. What is even better is that you can host your own instance and have full control of your users (you can opt to just use it exclusively for yourself) and have control of the content moderation (you can block users from other instances or the entire instance itself from appearing on yours) — no more mysterious content blocking due to some ridiculous and opaque community guidelines!

Personally, I thought of setting up my own Mastodon instance and share it with the family. After looking for some way to try it first (self-hosting, that is), I found two services that can make life easier for someone who does not have the time to tinker with the software dependencies management, installation and configuration. Here’s how.

First you need a hosting provider. I tried Oracle Cloud’s forever free 1GB server instance. However, I found that the actual RAM you get is less than 1GB — I reckon that a small part is used by the container manager, but then again, it should have been excluded. Anyway, that was not an option.

Luckily, I found Atlantic.Net with a 12-month trial for a 2GB Linux server. I figured that I have the entire year to save up to continue the server once the free allocation is up! How cool is that? They have a referral program, but unfortunately it is not available when you are on the free tier. Booo! Haha. Spinning up the Linux server is a just four clicks away — select the OS version, the duration of the subscription, the size of the server and execute! In a minute or two, you get your server that is accessible via the browser-based console or via SSH.

Now that we have the Linux server ready, it is time to get Mastodon installed. If you have seen the documentation at joinmastodon.org, you might be overwhelmed. There are services that provide you pre-configured Mastodon instances from Linode.com and DigitalOcean, but they do not have Atlantic.Net’s 12-month free offer! So I found the next best thing — cloudron.io. Cloudron.io is a one-stop shop for installing and managing your own cloud services. Mastodon is one the more than a hundred applications that you can install.

Installing cloudron.io requires running three terminal commands to download the installer, make it executable and running it. After a few minutes, you will be asked to access your server via a web browser to continue configuring your cloudron.

Configuring cloudron requires that you have access to a DNS server, either the one provided by your domain registrar, or via other DNS servers. If your DNS server provides API for management, then that is ideal — as it will allow cloudron to automatically configure the DNS entries for your applications. After this, you will configure your cloudron account — if you don’t have one yet, you can create it from here. That is about it — the next step is to choose the app to install, in this case, Mastodon.

Now that you have access to your cloudron dashboard, installing Mastodon is just a one-click thing. During installation, you need to decide whether you want Mastodon to handle user accounts (best if you want others to sign-up directly on Mastodon) or disable account registration and allow only users you have on cloudron. Since this is a small server, I chose to make it private, no registration. You can add users from your cloudron dashboard and they’d immediately have access to Mastodon! How cool is that?

One more thing that you need to do is to drop to the Mastodon terminal interface to issue a command to make a user as the Mastodon admin. From there, you are off with your own Mastodon instance connected with the rest of the fediverse! 

Just a word of caution though. Mastodon is a resource-heavy application and your free server is limited (remember, in addition to Mastodon, you are running Cloudron, too), so your mileage may vary (YMMV).

Cloudron.io provides a free service for up to two applications. It is a $15/month subscription if you want to add more applications. Applications that you can add include, but not limited to, Nextcloud, PixelFed, Matrix, Ghost, Gitlab, Matomo, Minecraft (three versions!), SyncThing and Wordpress! If you are subscribing, please use my referral link so we both benefit. 

What are you waiting for? It is time to own and control your content!