Docker Installation

Make sure you have both docker and docker-compose(>=2.0) installed. On Ubuntu, just run apt install docker-compose-v2 On Debian, you need to install Docker using their official installation instructions and custom apt repo. Next,

# Create a folder for the lemmy files. the location doesnt matter, you can put this anywhere you want
mkdir lemmy
cd lemmy

Download default config files

These files contain {{ }} braces for variables, such as passwords and your domain.

Edit them before starting up lemmy for the first time.

The images will likely be: dessalines/lemmy:VERSION and dessalines/lemmy-ui:VERSION

Tracking Issue: For now, using latest is not advisable as changes can break your instance. Make sure you are using a specific version number. This is temporary and will be fixed.

wget -O lemmy.hjson

If you'd like further customization, have a look at the config file named lemmy.hjson, and adjust it accordingly.

Database tweaks

To optimize your database, add this file.

You can input your system specs, using this tool:


Folder permissions

Set the correct permissions for pictrs folder:

mkdir -p volumes/pictrs
sudo chown -R 991:991 volumes/pictrs

Finally, run:

docker compose up -d

lemmy-ui is accessible on the server at http://localhost:{{ lemmy_port }}

Reverse Proxy / Webserver

Here's an optional nginx reverse proxy template, which you can place in /etc/nginx/sites-enabled

Alternatively, you can use any other web server such as caddy as a simple reverse proxy.

Be sure to edit the {{ }} to match your domain and port.

If you're using this, you will need to set up Let's Encrypt. See those instructions below.


If you've set up Let's Encrypt and your reverse proxy, you can go to https://{{ domain }}

Let's Encrypt

You should also setup TLS, for example with Let's Encrypt. Here's a guide for setting up letsencrypt on Ubuntu.

For federation to work, it is important that you do not change any headers that form part of the signature. This includes the Host header - you may need to refer to the documentation for your proxy server to pass through the Host header unmodified.


To update to the newest version, you can manually change the version in docker-compose.yml. Alternatively, fetch the latest version from our lemmy-ansible repo:

# Then replace the {{ }} vars again
docker compose up -d