Run your own Mastodon server on localhost

I want to play around with #Mastodon API. So I thought about an environment I could use for it.

I had these options:

I decided to setup a server on my PC to access it via localhost. Cause I didn't want to install the software and set several environment variables at my PC I went to Dockerhub and searched for an image. I found an image from VMWARE that was easy to install (no config at all). There is also another promising image from linuxserver.io but this needs some additional services (e.g. postgresql database) that needs to be setup and linked to your mastodon container by yourself.

The installation was very easy. I just downloaded a docker-compose.yaml file and ran it.

curl -sSL https://raw.githubusercontent.com/bitnami/containers/main/bitnami/mastodon/docker-compose.yml > docker-compose.yml

docker-compose up -d

Note: If you, unlike me, want to save some time read the docker-hub documentation of the bitnami image completely till the end. Otherwise you will wonder and search the internet for the default usernames and passwords :–).