SSL Configuration Issue for Self-Hosted Deployment #310

Closed
opened 2026-02-21 17:26:45 -05:00 by yindo · 5 comments
Owner

Originally created by @bhctest123 on GitHub (Jul 29, 2023).

Originally assigned to: @takatost on GitHub.

Title: SSL Configuration Issue for Self-Hosted Deployment

Description:

Problem Statement

We are attempting to host Dify on our server and have encountered issues configuring SSL. Our goal is to set up the Docker Compose file to support Certbot and configure NGINX to support SSL. However, we are experiencing challenges in implementing this.

Details of the Issue

Docker Configuration: We need to ensure that the Docker Compose file supports Certbot for SSL certificate management.
NGINX Configuration: We need to configure NGINX within the Docker container to handle SSL termination and forward traffic to the Dify application.
Inter-container Communication: While trying to handle NGINX on our side and configure things at the server level instead of Docker, we ran into issues where the app (Dify) wasn't aware of the different Docker containers on a network level.

Attempts to Resolve

We attempted to follow a similar approach to issue #426 by taking responsibility for NGINX on our side, but this led to the aforementioned inter-container communication problem.

Proposed Solution

We would like to request guidance or a fix for the following:

Modifying the Docker Compose file to include Certbot and properly configure SSL.
Ensuring that NGINX within the container can handle SSL and is properly configured to communicate with other containers.

Additional Context

Dify Version: 3.10
Environment: Docker in AWS

Conclusion

Your assistance in resolving this SSL configuration issue would be greatly appreciated. Ensuring secure communication is vital for our deployment, and we believe that addressing this issue will be beneficial to other self-hosted Dify users as well.

Thank you for your attention to this matter.

Originally created by @bhctest123 on GitHub (Jul 29, 2023). Originally assigned to: @takatost on GitHub. Title: SSL Configuration Issue for Self-Hosted Deployment Description: ### Problem Statement We are attempting to host Dify on our server and have encountered issues configuring SSL. Our goal is to set up the Docker Compose file to support Certbot and configure NGINX to support SSL. However, we are experiencing challenges in implementing this. ### Details of the Issue Docker Configuration: We need to ensure that the Docker Compose file supports Certbot for SSL certificate management. NGINX Configuration: We need to configure NGINX within the Docker container to handle SSL termination and forward traffic to the Dify application. Inter-container Communication: While trying to handle NGINX on our side and configure things at the server level instead of Docker, we ran into issues where the app (Dify) wasn't aware of the different Docker containers on a network level. ### Attempts to Resolve We attempted to follow a similar approach to issue #426 by taking responsibility for NGINX on our side, but this led to the aforementioned inter-container communication problem. ### Proposed Solution We would like to request guidance or a fix for the following: Modifying the Docker Compose file to include Certbot and properly configure SSL. Ensuring that NGINX within the container can handle SSL and is properly configured to communicate with other containers. ### Additional Context Dify Version: 3.10 Environment: Docker in AWS ### Conclusion Your assistance in resolving this SSL configuration issue would be greatly appreciated. Ensuring secure communication is vital for our deployment, and we believe that addressing this issue will be beneficial to other self-hosted Dify users as well. Thank you for your attention to this matter.
yindo added the 💪 enhancement📚 documentation🙋‍♂️ question labels 2026-02-21 17:26:45 -05:00
yindo closed this issue 2026-02-21 17:26:45 -05:00
Author
Owner

@f1ynng8 commented on GitHub (Jul 30, 2023):

I have enabled the ssl support by introducing another docker, nginx-proxy-manager.
You can have a try.

@f1ynng8 commented on GitHub (Jul 30, 2023): I have enabled the ssl support by introducing another docker, nginx-proxy-manager. You can have a try.
Author
Owner

@bhctest123 commented on GitHub (Jul 30, 2023):

Hi @f1ynng8 thank you for the suggestion! Do you have any specific configs you can share on the nginx proxy manager docker?

@bhctest123 commented on GitHub (Jul 30, 2023): Hi @f1ynng8 thank you for the suggestion! Do you have any specific configs you can share on the nginx proxy manager docker?
Author
Owner

@f1ynng8 commented on GitHub (Jul 30, 2023):

You can find it from its repo here @bhctest123
Its docker-compose config is quite simple. Just add a new proxy for dify after nginx proxy manger up. Nginx proxy manager support ACME ssl apply and auto renew.

@f1ynng8 commented on GitHub (Jul 30, 2023): You can find it from its repo [here](https://github.com/NginxProxyManager/nginx-proxy-manager) @bhctest123 Its docker-compose config is quite simple. Just add a new proxy for dify after nginx proxy manger up. Nginx proxy manager support ACME ssl apply and auto renew.
Author
Owner

@bhctest123 commented on GitHub (Aug 7, 2023):

We figured it out. Thank you for your help @f1ynng8 you are awesome!

@bhctest123 commented on GitHub (Aug 7, 2023): We figured it out. Thank you for your help @f1ynng8 you are awesome!
Author
Owner

@dentroai commented on GitHub (Apr 25, 2024):

hey @f1ynng8 how did you set up nginx-proxy-manager?

Both dify and nginx-proxy-manager run on port 80, so I need to change the port of dify it seems.
I tried to use port 8082 instead to listen for dify, and forward with nginx proxy to port 8082, but my dify app simply isn't reachable.

I wonder if you can give me some pointers so that I can figure it out, using both dify and nginx-proxy-manager for the first time.

@dentroai commented on GitHub (Apr 25, 2024): hey @f1ynng8 how did you set up nginx-proxy-manager? Both dify and nginx-proxy-manager run on port 80, so I need to change the port of dify it seems. I tried to use port 8082 instead to listen for dify, and forward with nginx proxy to port 8082, but my dify app simply isn't reachable. I wonder if you can give me some pointers so that I can figure it out, using both dify and nginx-proxy-manager for the first time.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#310