Self-host Lemmy
updated Sep 2026deployed by usprices checked · Jul 2026Install verified on Ubuntu 26.04 · Sep 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →
A Reddit-style link aggregator and discussion forum: users subscribe to communities, post links and discussions, vote and comment. Lemmy instances federate over ActivityPub, so communities can be followed from other Lemmy servers and other Fediverse software.
Key facts
CategorySocial network (Fediverse)
LicenseAGPL-3.0
StackRust, TypeScript, PostgreSQL
Min RAM1024 MB
Official imageyes
Measured idle RAM250 MB
Difficulty
What you need
- Any VPS with at least 1024 MB of RAM
- A domain you control — most self-hosted setups need HTTPS in front of them
- About an afternoon — budget time for troubleshooting
Where to host itaffiliate disclosure
Hetzner Cloudrun it on
From $23.59/mo · 2 vCPU / 4 GB / 80 GB · EU + USKamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + AsiaDigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + AsiaPaid link — we earn a commission if you shop through it.
Install
Run these commands on your server:
# Lemmy — upstream's Docker install (join-lemmy.org/docs/administration/install_docker.html)
mkdir -p ~/lemmy && cd ~/lemmy
wget -q https://raw.githubusercontent.com/LemmyNet/lemmy-docs/main/assets/docker-compose.yml
wget -q https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/examples/config.hjson -O lemmy.hjson
wget -q https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/templates/nginx_internal.conf
wget -q https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/files/proxy_params
wget -q https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/examples/customPostgresql.conf
# your domain can't change once the instance federates; the same random value is used for the DB password and the pict-rs API key
PGPASS=$(openssl rand -hex 24)
sed -i "s/{{ domain }}/lemmy.example.com/g; s/{{ postgres_password }}/$PGPASS/g" docker-compose.yml lemmy.hjson
sed -i 's/{{ nginx_internal_resolver }}/127.0.0.11/' nginx_internal.conf
# nginx_internal.conf is an Ansible (Jinja) template: keep the non-Anubis branch or nginx refuses to start
perl -0pi -e 's/\{% if anubis.*?%\}\n.*?(?:\{% else %\}\n(.*?))?\{% endif %\}\n/$1/gs' nginx_internal.conf
mkdir -p volumes/pictrs && sudo chown -R 991:991 volumes/pictrs
docker compose up -d # → http://SERVER_IP:10633
# the first visit shows the instance setup form, where you create the admin account; put a TLS reverse proxy in front before federatingMore self-hosted tools
Social network (Fediverse)
GoToSocial
GoSQLitePostgreSQL
easyRead guide →
Social network (Fediverse)
Mastodon
RubyRailsNode.jsPostgreSQLRedis
moderateRead guide →
Social network (Fediverse)
WriteFreely
GoSQLiteMySQL
easyRead guide →
Scheduling
Cal.diy
TypeScriptNext.jsPostgreSQLPrisma
moderateRead guide →