By now, you’ve likely heard about Mastodon, which is all the rage right now.

It is, functionality wise, a (almost) perfect replacement for ~~the birdsite~ Twitter. Lately, Twitter has become a cesspool infested with people that I do not want in my filter bubble community.

Since Mastodon is federated one can run their own instance. Running stuff is hard though, especially in production and becomes exponentially harder if more people start using it. And since I wanted to have my own a Mastodon instance as well, I was looking for a reliable solution, that takes as much work away from me as possible.

To me, this means having a Linux VM that needs little to maintenance (Debian instead of Arch Linux, e.g.), runs Docker Swarm so I don’t have to care about scaling, load balancing, routing , running docker-compose up -d after reboots and using someone else’s a hosted RDS.

In my case, to be precise, I am talking about running Mastodon on top of

  • a Docker Swarm (with 1 node)
  • utilizing Amazon’s EC2 t3.medium and RDS for PostgreSQL, on a db.t2.small and a cache.t2.micro ElastiCache as Redis replacement
  • with 50 GB EBS volume for your the user’s assets and uploads
  • with Træfik as a reverse proxy, that also manages Let’s Encrypt certificates for me

Using this setup, I only care about significant OS updates, Mastodon updates are fairly simple, storage and database are (update-wise) none of my business.

This is, sadly, not a cheap setup, comes in at a steep ~80€/month, but it’s your instance afterwards, with your rules, your choices and full control.

If you want, I have unlimited a few invites to spare 😉

And to make things easier for future generations you, I’ll publish my configurations in a repository. Also, I might at some point add a Terraform template to make things easier 😎.