Deploy Lemmy Communities
Lemmy communities with UI, pict-rs media, PostgreSQL and federation
Application
Lemmy Backend
Just deployed
pict-rs
Just deployed
/mnt
Data
PostgreSQL
Just deployed
/var/lib/postgresql/data
Web
Lemmy
Just deployed
Lemmy UI
Just deployed
Deploy and Host Lemmy Communities on Railway
Lemmy is a federated link aggregator and discussion forum, a self-hosted alternative to Reddit. People create communities, share links, images and text posts, vote and comment, and follow communities on other Lemmy, Mbin and Mastodon servers across the fediverse.
About Hosting Lemmy Communities
The template runs Lemmy 0.19.21 as five services from official images pinned by digest: the Lemmy backend, the server-rendered Lemmy UI, the pict-rs image server with a 5 GB volume, PostgreSQL 16 with a 5 GB volume, and a small Caddy router that is the only public service. The router sends API, media, and ActivityPub traffic to the backend and pages to the UI, exactly as upstream's nginx setup does. On the first boot Lemmy creates an admin account with a generated password, which you copy from the backend's variables, so nobody else can claim the instance. New members apply and wait for admin approval.
Why Deploy Lemmy Communities on Railway
Railway provides the HTTPS domain that federation requires, private networking between the five services, persistent volumes for posts and images, generated secrets, and health-checked deploys. The router passes each visitor's real address to Lemmy, so its rate limits work behind Railway's proxy.
Common Use Cases
- Run a forum for a project, club, company or local community that can also follow and be followed from the fediverse
- Host communities that you moderate yourself instead of relying on a large public instance
- Run a public forum where anyone can read and new members join after admin approval
Dependencies for Lemmy Communities Hosting
The deployment uses Lemmy, Lemmy UI, pict-rs, PostgreSQL, and Caddy.
Deployment Dependencies
- Lemmy and Lemmy UI 0.19.21 (join-lemmy.org)
- pict-rs 0.5.25 for image uploads and thumbnails
- PostgreSQL 16 and two 5 GB Railway volumes
- Optional: an SMTP provider on port 465 or 587 for email
Template Content
Lemmy Backend
dessalines/lemmy:0.19.21Lemmy
caddy:2.11.9-alpinePostgreSQL
postgres:16.16-alpineLemmy UI
dessalines/lemmy-ui:0.19.21pict-rs
asonix/pictrs:0.5.25