In light of the ongoing Reddit blackout, many users are seeking alternative platforms to host their communities. One popular option is Lemmy, a self-hosted federated link aggregator. However, most of the available documentation on running Lemmy involves using Nginx or Caddy as a reverse proxy. If you're utilizing Traefik with docker-compose and docker labels on your server, this guide will walk you through the process of setting up a working Lemmy instance without the need for Nginx or Caddy.
Step-by-Step Guide:
Docker Compose Configuration:
To begin, create a new docker-compose.yml file and include the necessary services for running Lemmy. Here's a sample configuration to get you started:
Adjust Hostname:
Remember to replace the placeholder hostname in the configuration with the actual hostname of your server. This ensures that Lemmy is accessible via the correct URL.
Start Lemmy: Save the changes to your docker-compose.yml file and execute the following command in the terminal to start Lemmy:
docker-compose up -d
Verify Lemmy's Availability:
Once the containers are up and running, access your Lemmy instance by navigating to the URL associated with your server's hostname.
Please note that the instructions provided here assume a basic understanding of Docker, Traefik, and server administration. Adjustments may be necessary based on your specific setup and requirements.
edit: Also note that this is for version 0.17.4. In case a new version releases you need to change the tag for both lemmy and lemmy-ui
For some reason this prevents some requests from finishing. Searches don't come back with a result until I reload the page. Posting comments never finishes (and never posts). After reverting back to the NginX proxy, everything works fine again.
To not having to repeat the http --> https redirect all the time, I've created a file config for Traefik: