Hi @macmattias,
for a good diagnosis the logfile would be helpful.
This is my working configuration:
#(nextcloud docker-compose.yaml)
#[...]
labels:
- "traefik.enable=true"
- "traefik.http.routers.nextcloud.entrypoints=web-secure"
- "traefik.http.routers.nextcloud.rule=Host(`cloud.example.invalid`)"
- "traefik.http.routers.nextcloud.tls=true"
- "traefik.http.routers.nextcloud.tls.certresolver=tlschallenge"
- "traefik.http.routers.nextcloud.middlewares=nextcloud-dav,secHeaders@file"
- "traefik.http.middlewares.nextcloud-dav.replacepathregex.regex=^/.well-known/ca(l|rd)dav"
- "traefik.http.middlewares.nextcloud-dav.replacepathregex.replacement=/remote.php/dav/"
- "traefik.http.services.nextcloud.loadbalancer.server.port=80"
#[...]
I use this traefik-configuration: GitHub - wollomatic/traefik2-hardened: hardened rootless traefik2 deployment without mounting the docker socket into the traefik container
But it should also work with this simplified config: https://github.com/wollomatic/simple-traefik
I'd also recommend adding this to nextcloud´s config.php:
'trusted_proxies' =>
array (
0 => 'xxx.xxx.xxx.xxx',
),
with xxx.xxx.xxx.xxx replaced with the IP of your traefik container. See Reverse proxy — Nextcloud latest Administration Manual latest documentation
Regards,
Wolfgang