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.
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 }}):