The shortcut: do it with Railyard
Everything above, Postgres and Redis wired to all three Rails-based processes, the streaming service split out with its own routing, Sidekiq sharing the media volume, is also what Railyard’s Mastodon stack template sets up for you. Connect a server, then pick Mastodon in the templates catalog: app.railyard.run/deploy?stack=mastodon-stack. Railyard generates every secret from Step 2 for you and wires the database, Redis and streaming URLs automatically; you still add your own SMTP provider afterward, the same as Step 2 above, Railyard doesn’t configure one for you either, and uploaded media still defaults to a shared local volume unless you point it at object storage yourself.
See deploy with a button and databases and backups for how templates and persistent data work on the platform more generally.
Self-host a Mastodon server ?
Running your own corner of the fediverse means running five things that all have to agree with each other: a Rails web process, a separate streaming server for the real-time timeline, a Sidekiq worker for federation and notifications, Postgres, and…

RailyardSelf-host a Mastodon server · RailyardRun a real Mastodon instance with Postgres, Redis, the streaming API and Sidekiq as separate services, behind Caddy HTTPS, with backups.
commit 795597f