[PR #6509] Added docker-compose.ssl.yaml.example #25305

Closed
opened 2026-02-21 20:24:41 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/6509

State: closed
Merged: No


Checklist:

Important

Please review the checklist below before submitting your pull request.

  • Please open an issue before creating a PR or link to an existing issue
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Description

This pull request adds a docker-compose.ssl.yaml.example file to simplify the SSL certification process for Dify deployments. This addition will help streamline the SSL setup process for Dify users deploying with HTTPS.

Expected certification process with this file:

  1. Change current directory and copy the file:

    # Move to Dify's docker directory
    cd dify/docker
    # Create SSL configuration file for Docker Compose(New!)
    cp docker-compose.ssl.yaml.example docker-compose.ssl.yaml
    
  2. Install certbot and obtain certification:

    sudo apt update
    sudo apt install certbot
    sudo certbot certonly --standalone -d <your_domain>
    # or use dns challenge
    # sudo certbot certonly --manual --preferred-challenges dns -d <your_domain>
    
  3. Copy the certificate files to ./nginx/ssl/:

    sudo cp /etc/letsencrypt/live/<your_domain>/fullchain.pem ./nginx/ssl/<your_domain>.crt
    sudo cp /etc/letsencrypt/live/<your_domain>/privkey.pem ./nginx/ssl/<your_domain>.key
    
  4. Copy .env.example and edit the new .env file:

    cp .env.example .env
    

    Then edit the .env file to include:

    NGINX_HTTPS_ENABLED=true # change from false to true
    NGINX_SSL_PORT=443
    NGINX_SSL_CERT_FILENAME=<your_domain>.crt
    NGINX_SSL_CERT_KEY_FILENAME=<your_domain>.key
    

Fixes #[Issue number if applicable]

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update, included: Dify Document
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade

Testing Instructions

Please follow these steps to test the changes:

  1. Clone the repository and navigate to the docker directory.
  2. Copy the docker-compose.ssl.yaml.example file to docker-compose.ssl.yaml.
  3. Follow the steps outlined in the Description section to set up SSL for a test domain.
  4. Verify that the Dify application can be accessed via HTTPS after completing the setup.
  • Test on a local development environment
  • Test on a staging server (if applicable)
**Original Pull Request:** https://github.com/langgenius/dify/pull/6509 **State:** closed **Merged:** No --- # Checklist: > [!IMPORTANT] > Please review the checklist below before submitting your pull request. - [x] Please open an issue before creating a PR or link to an existing issue - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods # Description This pull request adds a `docker-compose.ssl.yaml.example` file to simplify the SSL certification process for Dify deployments. This addition will help streamline the SSL setup process for Dify users deploying with HTTPS. ## Expected certification process with this file: 1. Change current directory and copy the file: ```bash # Move to Dify's docker directory cd dify/docker # Create SSL configuration file for Docker Compose(New!) cp docker-compose.ssl.yaml.example docker-compose.ssl.yaml ``` 2. Install certbot and obtain certification: ```bash sudo apt update sudo apt install certbot sudo certbot certonly --standalone -d <your_domain> # or use dns challenge # sudo certbot certonly --manual --preferred-challenges dns -d <your_domain> ``` 3. Copy the certificate files to ./nginx/ssl/: ```bash sudo cp /etc/letsencrypt/live/<your_domain>/fullchain.pem ./nginx/ssl/<your_domain>.crt sudo cp /etc/letsencrypt/live/<your_domain>/privkey.pem ./nginx/ssl/<your_domain>.key ``` 4. Copy .env.example and edit the new .env file: ```bash cp .env.example .env ``` Then edit the .env file to include: ``` NGINX_HTTPS_ENABLED=true # change from false to true NGINX_SSL_PORT=443 NGINX_SSL_CERT_FILENAME=<your_domain>.crt NGINX_SSL_CERT_KEY_FILENAME=<your_domain>.key ``` Fixes #[Issue number if applicable] ## Type of Change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement - [ ] Dependency upgrade # Testing Instructions Please follow these steps to test the changes: 1. Clone the repository and navigate to the docker directory. 2. Copy the `docker-compose.ssl.yaml.example` file to `docker-compose.ssl.yaml`. 3. Follow the steps outlined in the Description section to set up SSL for a test domain. 4. Verify that the Dify application can be accessed via HTTPS after completing the setup. - [x] Test on a local development environment - [x] Test on a staging server (if applicable)
yindo added the pull-request label 2026-02-21 20:24:41 -05:00
yindo closed this issue 2026-02-21 20:24:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#25305