SOS: Dockerized Laravel/React/Inertia App - Need Help with HTTPS/SSL! (Traefik/Certbot Failed)

Hello everyone, I’m reaching a breaking point trying to get HTTPS working on my Laravel + React + Inertia application, which is running in Docker for production.

I successfully followed the official documentation and examples to get the app working smoothly with HTTP:

The app works perfectly locally and via HTTP, but I cannot for the life of me get SSL/HTTPS configured.

What I’ve Tried (and Broken):

  1. Traefik: Spent hours trying to integrate Traefik as a reverse proxy with automated Let’s Encrypt certificates. I kept running into configuration errors (mostly with the docker-compose.yml labels) that made the whole stack fall apart.
  2. Certbot: Attempted to use a standalone Certbot container, but struggled with volume mounting and proving domain ownership without exposing the Laravel container directly. It always seems to conflict with the Nginx setup.

Every attempt to introduce a certificate seems to break the entire setup or cause endless redirect loops.

My Request:

I’m desperate for a reliable, production-ready path to add HTTPS. Does anyone know of:

  • A successful fork of the dockersamples/laravel-docker-examples repository that already has a working HTTPS setup (e.g., with Traefik or Caddy)?
  • A simple, proven step-by-step tutorial for adding a free Let’s Encrypt certificate to this specific Laravel/Docker stack?
  • Any best practices or examples that avoid the common pitfalls with Traefik/Certbot in this environment?

Any help or working code example would be a lifesaver. I need to move past this to deployment!

Thank you so much in advance!

Tech Stack Summary:
Laravel 12, Inertia, React, Docker, Nginx, PHP-FPM

Until someone provides what you asked for, may I suggest that you share exactly what you did and how you did it, so we can get a clear view on things and figure out together what needs to be done in order to succeed.

We don’t know how far you are away from success. And there is no guaranty the next tutorial will not result in a similar situation.

Please share your compose file. Make sure to redact every secret and obfuscate your domain (make sure to obfuscate it the same way everywhere you use it, so we can make sure it’s not because of a missing character in one of the occurrences.).

We don’t know if you want to use the Letsencrypt tls- or http-challenge, where your dns entry must be configured to point to a public ip that can reach your docker host (directly, through portforwarding or a load balancer), or whether you want to use dns-challenge and use one of the dns providers that are supported by Traefik:

Furthermore, please share exact error messages, as they help us to help you.

Note: It doesn’t help to add things like need help, urgent or sos to the title, as everyone here creates a topic because they need help. The best change to get good support is to share everything you did, how you did it (as in exact compose files, config files and commands), and what the outcome was. You need to help us with providing good input, so we can provide a solution.

To solve your issues you would need to share some errors and logs. Maybe check simple Traefik example and other examples there.