-
-
Notifications
You must be signed in to change notification settings - Fork 639
Open
Description
Description
Hi,
I’m using nginx-proxy-automation on a Linux server running Docker, and I’ve noticed an intermittent issue:
after a full server reboot, some domains occasionally serve the wrong website, meaning the vhost mapping becomes incorrect.
Example scenario:
site-a.comunexpectedly shows the content ofsite-b.com- Restarting the affected container or reloading nginx fixes the issue temporarily
This doesn’t happen after every reboot, only sometimes.
Expected behavior
Each domain should always route to the correct container after the host system reboots.
Actual behavior
After reboot:
- Wrong container is served for one or more
VIRTUAL_HOSTdomains - It looks like nginx-proxy loads an outdated or incomplete configuration
- Running
nginx -s reloadinside the proxy container fixes the issue - Restarting the app container also fixes it
Possible causes (hypothesis)
- Race condition: proxy starts before all containers are alive
- Old config not fully refreshed on startup
- Docker network not ready when proxy boots
- Exited/ghost containers being detected by nginx-proxy
- Missing forced reload when containers attach to the proxy network
What I’ve tried
- Added
restart: alwaysto all containers - Ensured all containers have unique
VIRTUAL_HOST,LETSENCRYPT_HOST,VIRTUAL_PORT - Added
depends_onso apps start before proxy - Running
docker exec nginx-proxy nginx -s reloadsolves it - Cleaned up stopped containers (
docker container prune) - Checked Docker networks (no duplicates or recreations)
Questions
- Is this a known issue related to container startup order?
- Is there a recommended way to force nginx-proxy to wait until all services are up?
- Should an automatic
nginx -s reloadbe triggered after boot? - Are there debug logs or flags that can help identify why config generation fails?
Metadata
Metadata
Assignees
Labels
No labels