mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Feat: Add HTTPS setup instructions and configuration for Nginx (#8401)
### What problem does this PR solve? _Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR._ ### Type of change: Documentation Update/Refactoring #### Summary Adds HTTPS/SSL configuration guide/example to enable secure RAGFlow deployments with proper certificate management. #### Changes - New HTTPS Setup Section: Step-by-step guide for SSL certificate configuration - Let's Encrypt Integration: Complete Certbot setup instructions - Docker Configuration: Volume mapping examples for certificates #### Key Features - Prerequisites checklist - Docker Compose configuration examples - Support for both Let's Encrypt and existing certificates #### Files Modified - `README.md` - `ragflow.https.conf` (new file)
This commit is contained in:
committed by
GitHub
parent
71afebb2c0
commit
4760e317d5
@ -6,6 +6,7 @@
|
||||
- 🐳 [Docker Compose](#-docker-compose)
|
||||
- 🐬 [Docker environment variables](#-docker-environment-variables)
|
||||
- 🐋 [Service configuration](#-service-configuration)
|
||||
- 📋 [Setup Examples](#-setup-examples)
|
||||
|
||||
</details>
|
||||
|
||||
@ -192,3 +193,77 @@ The [.env](./.env) file contains important environment variables for Docker.
|
||||
|
||||
> [!TIP]
|
||||
> If you do not set the default LLM here, configure the default LLM on the **Settings** page in the RAGFlow UI.
|
||||
|
||||
|
||||
## 📋 Setup Examples
|
||||
|
||||
### 🔒 HTTPS Setup
|
||||
|
||||
#### Prerequisites
|
||||
|
||||
- A registered domain name pointing to your server
|
||||
- Port 80 and 443 open on your server
|
||||
- Docker and Docker Compose installed
|
||||
|
||||
#### Getting and configuring certificates (Let's Encrypt)
|
||||
|
||||
If you want your instance to be available under `https`, follow these steps:
|
||||
|
||||
1. **Install Certbot and obtain certificates**
|
||||
```bash
|
||||
# Ubuntu/Debian
|
||||
sudo apt update && sudo apt install certbot
|
||||
|
||||
# CentOS/RHEL
|
||||
sudo yum install certbot
|
||||
|
||||
# Obtain certificates (replace with your actual domain)
|
||||
sudo certbot certonly --standalone -d your-ragflow-domain.com
|
||||
```
|
||||
|
||||
2. **Locate your certificates**
|
||||
Once generated, your certificates will be located at:
|
||||
- Certificate: `/etc/letsencrypt/live/your-ragflow-domain.com/fullchain.pem`
|
||||
- Private key: `/etc/letsencrypt/live/your-ragflow-domain.com/privkey.pem`
|
||||
|
||||
3. **Update docker-compose.yml**
|
||||
Add the certificate volumes to the `ragflow` service in your `docker-compose.yml`:
|
||||
```yaml
|
||||
services:
|
||||
ragflow:
|
||||
# ...existing configuration...
|
||||
volumes:
|
||||
# SSL certificates
|
||||
- /etc/letsencrypt/live/your-ragflow-domain.com/fullchain.pem:/etc/nginx/ssl/fullchain.pem:ro
|
||||
- /etc/letsencrypt/live/your-ragflow-domain.com/privkey.pem:/etc/nginx/ssl/privkey.pem:ro
|
||||
# Switch to HTTPS nginx configuration
|
||||
- ./nginx/ragflow.https.conf:/etc/nginx/conf.d/ragflow.conf
|
||||
# ...other existing volumes...
|
||||
|
||||
```
|
||||
|
||||
4. **Update nginx configuration**
|
||||
Edit `nginx/ragflow.https.conf` and replace `my_ragflow_domain.com` with your actual domain name.
|
||||
|
||||
5. **Restart the services**
|
||||
```bash
|
||||
docker-compose down
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
|
||||
> [!IMPORTANT]
|
||||
> - Ensure your domain's DNS A record points to your server's IP address
|
||||
> - Stop any services running on ports 80/443 before obtaining certificates with `--standalone`
|
||||
|
||||
> [!TIP]
|
||||
> For development or testing, you can use self-signed certificates, but browsers will show security warnings.
|
||||
|
||||
#### Alternative: Using existing certificates
|
||||
|
||||
If you already have SSL certificates from another provider:
|
||||
|
||||
1. Place your certificates in a directory accessible to Docker
|
||||
2. Update the volume paths in `docker-compose.yml` to point to your certificate files
|
||||
3. Ensure the certificate file contains the full certificate chain
|
||||
4. Follow steps 4-5 from the Let's Encrypt guide above
|
||||
Reference in New Issue
Block a user