diff --git a/README.md b/README.md index 71f3b2c..4398c54 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ seedbox and personal media server. | Netdata | netdata.yourdomain.com | [netdata/netdata](https://hub.docker.com/r/netdata/netdata) | *latest* | Server monitoring | | Duplicati | duplicati.yourdomain.com | [linuxserver/duplicati](https://hub.docker.com/r/linuxserver/duplicati)| *latest* | Backups | -The front-end reverse proxy (Traefik - *version1 **v1.7-alpine***) routes based on the lowest level subdomain +The front-end reverse proxy (Traefik - **check the next section if you have already the seedbox with Traefik v1**) routes based on the lowest level subdomain (e.g. `deluge.example.com` would route to deluge). Since this is how the router works, it is recommended for you to get a top level domain. If you do not have one, you can edit your domains locally by changing your hosts file or use a @@ -32,6 +32,32 @@ Traefik takes care of valid Let's Encrypt certificates and auto-renewal. Note: Plex is also available directly through the `32400` port without going through the reverse proxy. +## September 2020 - Upgrade to Traefik v2 instructions + +Before upgrading Traefik to version 2, please check the following: + +- In this repo, Traefik v2 upgrade is as seamless as possible (same environment variables than before, out-of-the-box config file...). +- The ``HTTP_PASSWORD`` variable now must be simple-quoted in the .env file. See the updated ``.env.sample`` file (which has also been reorganized) +- Run ``init.sh`` in order to create required Docker objects (network name has changed). +- You can update your acme.json to a Traefik v2-compliant one by doing the following (before launching Traefik v2): + +```sh +mkdir -p /tmp/migration +cd /tmp/migration +sudo cp /opt/traefik/acme.json . +sudo chmod 775 /tmp/migration/acme.json +# Do *NOT* forget the --resolver at the end! (le = Let's Encrypt resolver, see traefik/traefik.yml) +docker run --rm -v ${PWD}:/data -w /data containous/traefik-migration-tool acme -i acme.json -o acme2.json --resolver le +mkdir -p /data/config/traefik +sudo cp acme2.json /data/config/traefik/acme.json +sudo chmod 600 /data/config/traefik/acme.json +# When you already have a backup! +sudo rm -rf /opt/traefik /tmp/migration +``` + +- As from Traefik v2, as Http Authentication is now possible on the Traefik console, the latter is enabled at ``traefik.yourdomain.com``. +- After all this, you can simply do: ``./update-all.sh``! VoilĂ ! + ## Dependencies - [Docker](https://github.com/docker/docker) >= 1.13.0 diff --git a/init.sh b/init.sh index bd573a0..160adec 100755 --- a/init.sh +++ b/init.sh @@ -1,7 +1,7 @@ #!/bin/bash echo "[$0] Initializing..." -docker network create traefik-network || true +docker network create traefik-network 2&>1 || true if [[ ! -f .env ]]; then cp .env.sample .env echo "[$0] Please edit .env file"