Network & Connectivity
502 Bad Gateway
Nginx is forwarding to wrong container IPs. Get current container IPs:dify/docker/nginx/conf.d:
- Replace
http://api:5001withhttp://172.19.0.7:5001 - Replace
http://web:3000withhttp://172.19.0.5:3000
Cannot access localhost services
Docker containers can’t reach host services via127.0.0.1. Use your machine’s local network IP instead.
Example: For OpenLLM running on host, configure Dify with http://192.168.1.100:port (your actual local IP).
Page loads forever with CORS errors
If this started after a domain change, check that the public URLs match the new domain. Also reviewCONSOLE_CORS_ALLOW_ORIGINS and WEB_API_CORS_ALLOW_ORIGINS under CORS Configuration.
From dify/docker, validate and apply the changes with the deployment’s existing Compose project and options:
Mounting & Volumes
Nginx configuration mount failure
Error:Port conflicts
Port 80 already in use? Either:-
Stop the conflicting service (usually Apache/Nginx):
-
Or change port mapping in
docker-compose.yaml:
Container Management
View background shell outputs
List running shells:Container restart issues
After system reboot, containers may fail to connect. Ensure proper startup order:SSRF Proxy
Thessrf_proxy container prevents Server-Side Request Forgery attacks.
Customize proxy rules
Editdocker/volumes/ssrf_proxy/squid.conf to add ACL rules: