Back to all templates
Lemmy logo

Lemmy

Application512MB+ RAM

Federated link aggregator (Reddit alternative)

forumfediversereddit-alternativeactivitypub

Deploy Lemmy in 3 Steps

1

Connect Your VPS

Add your server credentials to Server Compass

2

Select Lemmy

Choose from our template library

3

Deploy & Configure

Fill in settings and click Deploy

No Docker knowledge required
Step-by-step deployment guide

Deploy Lemmy on a VPS with Server Compass

Use the Lemmy template in Server Compass to deploy a self-hosted federated link aggregator on your VPS, then verify the backend API and web UI.

About 10 minutesBrowser verified
1
Step 1

Open the server Apps tab

Select the tutorial-vps VPS, open the Apps tab, and start a new app deployment. Keep sensitive server details hidden before capturing or sharing screenshots.

Server Compass Apps tab before creating a Lemmy app
2
Step 2

Choose an app template

Click New App and choose the template deployment path so Server Compass can load the built-in catalog.

Choosing to deploy an app from a Server Compass template
3
Step 3

Search for Lemmy

Use the template picker search to find Lemmy in the Server Compass template catalog.

Searching for Lemmy in the Server Compass template picker
4
Step 4

Select the Lemmy template

Choose the Lemmy template. Server Compass fills the backend API service, Lemmy UI service, PostgreSQL database, pict-rs image service, generated config, and persistent volumes.

Lemmy template selected in Server Compass
5
Step 5

Review the Lemmy settings

Confirm the app name and compose service. In this run, the app was named lemmy-demo and used host port 1234.

Reviewing Lemmy project settings and compose service
6
Step 6

Deploy Lemmy

Review the generated compose settings, confirm the Lemmy UI and API ports are available, and click Deploy.

Reviewing Lemmy web port before deployment
7
Step 7

Watch the deployment progress

Keep the deployment modal open while Server Compass uploads the compose file, pulls the Lemmy image, starts the container, and verifies the stack.

Server Compass deploying the Lemmy template on the VPS
8
Step 8

Confirm Lemmy is running

After deployment finishes, return to the Apps tab and confirm the Lemmy app is marked Running with its published ports available.

Lemmy template running in the Server Compass Apps tab
9
Step 9

Verify Lemmy from the container

Check the Lemmy backend API, the Lemmy UI homepage, and recent container logs to confirm the generated configuration bootstrapped the instance.

Lemmy service verification output from logs

After Lemmy Opens

  • Sign in as the generated `admin` user and rotate the generated admin password.
  • Put Lemmy behind a real domain and HTTPS before enabling federation publicly.
  • Configure email delivery before relying on registration or password recovery flows.
  • Back up the PostgreSQL and pict-rs volumes.
  • Create communities and assign moderators before inviting users.

Verified Result

Lemmy API returned HTTP 200 for the generated Server Compass Lemmy site, and the UI homepage returned HTTP 200 on the published host port.

Lemmy deployment questions

What does the Lemmy template deploy?

It deploys the Lemmy backend, Lemmy UI, PostgreSQL, pict-rs, and a generated `config.hjson` that bootstraps an initial admin user.

Which port did the tutorial use?

The tutorial used host port 1234 for the Lemmy UI. The template also publishes the backend API port.

Does Lemmy need setup after deployment?

The template creates the initial site and admin user automatically. After deployment, sign in, rotate the generated admin password, configure email, and update site settings.

Should this become a blog post?

No. The deployment guide should live on the Lemmy template detail page and be linked from the reusable template deployment docs page.

Manual Deployment Guide

Manual Lemmy Setup

For terminal enthusiasts: deploy Lemmy manually with these simple steps.

1

SSH into Your Server

Launch your preferred terminal and connect to your VPS using SSH.

terminal
# Log into your server
ssh root@<your-server-ip>

# If using key-based auth
ssh -i ~/.ssh/my-key root@<your-server-ip>

First time? Docker not installed? Run: curl -fsSL https://get.docker.com | sh

2

Create Working Directory

Prepare a directory for your application files and configuration.

terminal
# Create and navigate to project directory
mkdir -p ~/apps/lemmy
cd ~/apps/lemmy
3

Configure Your Containers

Create the Docker Compose configuration file with these contents:

docker-compose.yml
services:
  lemmy:
    image: dessalines/lemmy:latest
    ports:
      - "8536:8536"
    environment:
      - RUST_LOG=warn
    volumes:
      - ./lemmy.hjson:/config/config.hjson
    restart: unless-stopped
    depends_on:
      - db
      - pictrs

  lemmy-ui:
    image: dessalines/lemmy-ui:latest
    ports:
      - "1234:1234"
    environment:
      - LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy:8536
      - LEMMY_UI_LEMMY_EXTERNAL_HOST=<your-domain>
    restart: unless-stopped
    depends_on:
      - lemmy

  db:
    image: postgres:16-alpine
    environment:
      - POSTGRES_USER=lemmy
      - POSTGRES_PASSWORD=<your-db-password>
      - POSTGRES_DB=lemmy
    volumes:
      - postgres_data:/var/lib/postgresql/data
    restart: unless-stopped

  pictrs:
    image: asonix/pictrs:latest
    environment:
      - PICTRS__SERVER__API_KEY=<your-pictrs-api-key>
    volumes:
      - pictrs_data:/mnt
    restart: unless-stopped

volumes:
  postgres_data:
  pictrs_data:
Environment Configuration
PORTAPI port(default: 8536)
UI_PORTUI port(default: 1234)
DOMAINDomain
DB_PASSWORDDB password
PICTRS_API_KEYPictrs key
4

Deploy with Docker Compose

Launch the application stack using Docker Compose.

terminal
# Deploy the application
docker compose up -d

# Check container health
docker compose ps

# Monitor logs
docker compose logs -f --tail=100
5

Open Required Ports

Enable external access by opening the necessary port.

terminal
# Allow the application port through firewall
sudo ufw allow 8536/tcp
sudo ufw reload

# Access your app at:
# http://your-server-ip:8536
Skip the Terminal

There's an easier way. Meet Server Compass.

Deploy Lemmy without touching the command line. Server Compass gives you a clean UI for one-click deployments.

  • Intuitive dashboard
  • Deploy in 3 minutes
  • Free SSL included
  • Blue-green deploys
  • Real-time logs
  • Version history
Download Server Compass$29 one-time • Lifetime license

After Deployment

After deploying Lemmy with Server Compass, complete these steps to finish setup

1

Create lemmy.hjson config

2

Register admin account

3

Create communities

Need help? Check out our documentation for detailed guides.

Lemmy FAQ

Common questions about self-hosting Lemmy

How do I deploy Lemmy with Server Compass?

Simply download Server Compass, connect to your VPS, and select Lemmy from the templates list. Fill in the required configuration and click Deploy. The entire process takes under 3 minutes.

What are the system requirements for Lemmy?

Lemmy requires a minimum of 512MB RAM. We recommend a VPS with at least 1024MB RAM for optimal performance. Any modern Linux server with Docker support will work.

Can I migrate my existing Lemmy data?

Yes! Server Compass provides volume mapping that allows you to import existing data. You can also use standard Lemmy backup and restore procedures.

How do I update Lemmy to the latest version?

Server Compass makes updates easy. Simply click the Update button in your deployment dashboard, and the latest Lemmy image will be pulled and deployed with zero downtime.

Is Lemmy free to self-host?

Lemmy is open-source software. You only pay for your VPS hosting (typically $5-20/month) and optionally Server Compass ($29 one-time). No subscription fees or per-seat pricing.

Ready to Self-Host Lemmy?

Download Server Compass and deploy Lemmy to your VPS in under 3 minutes. No Docker expertise required.

Download Server Compass