Traefik

Making directories

I'll be saving my data in ~/docker in this example

  1. Open terminal and cd docker (mkdir docker if you don't have it)
  2. mkdir traefik and cd traefik This will be where you save traefik
  3. nano compose.ymlTemplate
  4. CTRL + X, y and Enter

For the basicauth.users label, replace admin:123 with a secure login:

echo $(htpasswd -nb "admin" "123") | sed -e s/\\$/\\$\\$/g

Use the result from this command.


Making a few more files

  1. touch config.yml
  2. touch acme.json
  3. nano traefik.ymlTemplate, add your Cloudflare email. CTRL + X, y and Enter
  4. mkdir logs

Almost done

  1. sudo docker network create proxy
  2. sudo docker compose up -d
  3. sudo docker compose logs -f (optional, to see logs)

Head over to your domain and you should see the Traefik dashboard.