There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

rikudou ,

Then it should work with this: join-lemmy.org/docs/…/install_docker.html

Here are the commands, basically:

Installing docker

From this doc: docs.docker.com/engine/install/ubuntu/

  • for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
  • apt-get update
  • apt-get install ca-certificates curl gnupg
  • install -m 0755 -d /etc/apt/keyrings
  • curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
  • chmod a+r /etc/apt/keyrings/docker.gpg
  • echo “deb [arch=”$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu “$(. /etc/os-release && echo “$VERSION_CODENAME”)” stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
  • apt-get update
  • apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose

This series of commands installed an official docker repository in your system so docker itself is always up-to-date, Ubuntu gets updates like this kinda slowly.

Installing Lemmy

From this doc: join-lemmy.org/docs/…/install_docker.html

  • mkdir /opt/lemmy
  • cd /opt/lemmy
  • wget https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/templates/docker-compose.yml
  • wget https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/examples/config.hjson -O lemmy.hjson
  • wget https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/templates/nginx_internal.conf
  • wget https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/examples/customPostgresql.conf
  • Edit all the downloaded files (for example using nano) and change everything that starts with {{ and ends with }}
  • mkdir -p volumes/pictrs
  • chown -R 991:991 volumes/pictrs
  • docker-compose up -d

Installing webserver

I chose Caddy, you can choose a different one but then you’ll have to check on your own.

From this guide: caddyserver.com/docs/install#debian-ubuntu-raspbi…

  • apt install -y debian-keyring debian-archive-keyring apt-transport-https
  • curl -1sLf ‘https://dl.cloudsmith.io/public/caddy/stable/gpg.key’ | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
  • curl -1sLf ‘https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt’ | tee /etc/apt/sources.list.d/caddy-stable.list
  • apt update
  • apt install caddy
  • Edit the file /etc/caddy/Caddyfile (for example using nano /etc/caddy/Caddyfile)
  • Paste this content (replace domain.tld with your Lemmy instance domain and the 1236 with the port you have configured in the docker-compose.yml file for {{ lemmy_port }}):
<pre style="background-color:#ffffff;">
<span style="color:#323232;">domain.tld {
</span><span style="color:#323232;">        @http {
</span><span style="color:#323232;">                protocol http
</span><span style="color:#323232;">        }
</span><span style="color:#323232;">        redir @http https://{host}{uri}
</span><span style="color:#323232;">        reverse_proxy localhost:1236
</span><span style="color:#323232;">}
</span>

Hope I haven’t forgotten anything, feel free to ask.

Edit: After all the commands, restart caddy with service caddy restart.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines