• The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Has anybody gotten Mastodon hosting to work with the Docker extension?

QWeb Ric

Regular Pleskian
Server operating system version
AlmaLinux 9.5
Plesk version and microupdate number
18.0.68 #2
I've spent the weekend experimenting with Docker and various Mastodon, Redis, and PostgreSQL set-ups, but for the life of me can't seem to get a working config. All of the Mastodon via Docker guides seem to be from a few years ago, before Plesk had a Docker extension, and talk about editing yml config files directly and/or running docker-compose, but I'm just trying to use the Docker extension alone.

If I pull the tootsuite/mastodon image through the extension, regardless of the environment variables I set, port mapping, volume mapping, etc, this image just seems to spit out a Tini info page and then exit. I've given up entirely on this image.

If I pull the bitnami/mastodon, bitnami/redis, and bitnami/postgresql images + set up the Redis and PostgreSQL containers and populate the appropriate environment variables within the Mastodon container to connect to them, using the IPs Portainer shows for each, then the Mastodon container appears to connect to the PostgreSQL database and spits out a "Migrating database" line so the bridging and port mapping at least seem to be working, but then just exits after a couple more minutes with no further output. Also despite finding the PostgreSQL database to connect to, the init lines still show "MASTODON_DATABASE_HOST could not be resolved" and "MASTODON_REDIS_HOST could not be resolved" outputs.

Additionally, setting up volume mapping for Redis and PostgreSQL works - I can see files created in the host folders when I do - but setting up for the Mastodon bucket doesn't result in any file dumps, either with the tootsuite/mastodon image or with bitnami/mastodon. Possibly just because the init process isn't getting far enough along to create anything. I'm aware Bitnami containers are non-root but so tried chowning the host directories but neither 991 or 1001 kicks them into life.

Has anybody had better luck with this? I feel like there's no technical reason for Mastodon hosting via Plesk and the Docker extension to not be possible, particularly if people have been running it via Docker outside of Plesk for years?
 
I've mention this before with someone else few months ago when someone was trying to deploy something else, can't remember. But I'll just say it here again. The Plesk Docker extension has much to be left desire. It's very basic and isn't meant for complexity. Plesk's docker extension did introduced the ability to run docker compose now (it's called Stacks) and you can choose to either use the editor, upload a file, or use a compose file from a web space (the web space one is useful if you're also using github to pull all the files).

My preferred method is still to use Portainer (which you can now install directly from within the Plesk Docker extension) since it does give you a lot more flexibility then the native support (again, the native support is a lot better compared to where it was last year but it's still not as flexible).

Now, as for your specific deployment, I'm looking over the docs at mastodon-documentation/Running-Mastodon/Docker-Guide.md at master · felx/mastodon-documentation and honestly I think your best case would be to just SSH into the server and follow the initial instructions because a lot of things involved starting the stack and going straight into the shell to run through setup and such before doing set it and forget it.
 
Thanks.

I'm not sure what the benefit of using Stacks would be over just setting up the environment variables, ports, and volumes within the container though? Plesk seems to set up bridge networking etc already and as you say, Portainer seems to fill in the gaps too. I used that to find the IPs associated to each container, for example.

This is where I'm perhaps being naive, but although the official docs do reference manually running a setup CLI, as far as I can tell this is just to populate some environment variables within the yml file which I can just do via the Docker extension anyway. The Bitnami image even ships with so many default values for each var that I'd expect it to work as-is, at least for testing: https://hub.docker.com/r/bitnami/mastodon/

But it just spits out hostname resolution issues and dies.

Confusingly, the yml that this image ships with is, I assume, containers/bitnami/mastodon/docker-compose.yml at main · bitnami/containers which seems to include blocks for PostgreSQL and Redis etc internally, so surely given it has default values for databases and such within those environment variables, even if I don't set up separate PostgreSQL etc instances for it to connect to, you'd think it would just use its built-in instances and, again for testing at least, just work out of the box? But still, even with the default variables it just spits out hostname resolution fails.

It's as if you're supposed to be able to reference service blocks as hostnames within Docker configs, but Plesk is somehow overriding this. I wondered whether bridge interfered, but removing from that network via Portainer just results in the container refusing to start at all.
 
Back
Top