What started as a simple request to build a “containerized dev environment” quickly became an epic adventure filled with SSL certificates, authentication middleware, and the occasional 404 error that made us question our life choices.
Our first attempt seemed logical enough:
What could go wrong?
Everything. Literally everything went wrong.
The architecture had a fundamental flaw: nginx terminated SSL and forwarded HTTP to Traefik, but Authelia v4.39+ refused HTTP URLs for security reasons. This created an unsolvable conflict that left us with working SSL certificates but broken authentication.
# The error that haunted our dreams
level=error msg="Target URL 'http://dev.playtopia.com.au/' has an insecure scheme 'http', only the 'https' and 'wss' schemes are supported"
After much frustration and a healthy dose of “maybe the right products weren’t chosen,” we made a bold decision: tear it all down and rebuild it properly.
The moment when everything clicked into place:
HTTP/2 302
location: https://auth.playtopia.com.au/?rd=https%3A%2F%2Fdev.playtopia.com.au%2F
set-cookie: authelia_session=...
That beautiful HTTP 302 redirect meant authentication was finally working!
By the end of our adventure, we had achieved:
Now that we have a solid foundation, the real fun begins:
Here’s a glimpse of our final docker-compose.yml structure:
services:
traefik:
image: traefik:v3.0
ports:
- "80:80"
- "443:443"
command:
- --certificatesresolvers.letsencrypt.acme.tlschallenge=true
- --entrypoints.websecure.address=:443
# The magic happens here...
Want to see the full configuration? Check out our documentation page!
Status: Environment fully operational and ready for world domination… I mean, creative projects. 🎯