Internal Server Error (500) when attempting to access Nextcloud behind reverse proxy (Traefik)

it looks you are doing lot of stuff like custom middlewares in your traefik config. I would recommend you start with simple config and add complexity once you get the simple setup working. maybe you find my example useful Docker - nextcloud oder linuxserver/nextcloud - #6 by wwe