A black cat with a red bandana, holding a baguette and looking to the left

damien's zone

Posts with #vercel

Running my own Mastodon instance "behind" Astro on Vercel

My profile on my Mastodon instance

The Mastodon instance I've been on for the past 7 years, octodon.social is shutting down next year. So rather than try to find a replacement, I decided to run my own, single-user instance.

The issue isn't that good, well-moderated instances don't exist, they do! But one of the big reasons why I stayed on Octodon was because I knew the moderation team personally so I trusted their decisions and agreed with most of them. I just frankly couldn't be bothered with having to find and vet a new instance and I like to tinker so, after some advices from my friend Niléane I went and spun up my own!

It's up at https://social.erambert.me and you can find me on Mastodon by looking up @eramdam@erambert.me.

The setup isn't anything too fancy:

  • a dedicated server hosted by OVH
  • OVH's object storage solution for media files behind Bunny
  • running Mastodon 4.2.10 (current stable version at the time of writing)

All set up while following the official documentation.

The only quirk of my setup might is that the "local domain" (domain the instance responds to) and the "web domain" (domain where the Web interface lives) are different. Meaning that people can find me by looking up @eramdam@erambert.me despite the actual instance running on https://social.erambert.me. It's a behavior that is well documented by Mastodon and is usually trivial to implement when you host your website on your own server...

Except I don't do that 😅 My website is, for now, running on Astro and hosted on Vercel so I can't just modify the web server configuration to set up the necessary redirection.

Now, I'm not the only one that tried to do this with a similar setuip link link link. But none of those solutions were satisfactory for me because:

  1. they…Read more

astro mastodon vercel