diff --git a/pages/docs/remote/nginx.mdx b/pages/docs/remote/nginx.mdx index 113b75711..743d82da2 100644 --- a/pages/docs/remote/nginx.mdx +++ b/pages/docs/remote/nginx.mdx @@ -46,7 +46,20 @@ Nginx acts as a reverse proxy, forwarding client requests to your LibreChat appl The `deploy-compose.yml` file includes an Nginx container and uses the `client/nginx.conf` file for Nginx configuration. However, since `sudo certbot --nginx` extracts the certificate to the host configuration, you need to duplicate the certificate to the Docker containers. -1. Update `client/nginx.conf` with your domain and certificate paths. +1. Update `client/nginx.conf` with your domain and certificate paths. They are in `/etc/letsencrypt/live//` directory on your host. + +```nginx +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + # ... + ssl_certificate /etc/letsencrypt/live//fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live//privkey.pem; + # ... + server_name ; + # ... +``` + 2. Update `deploy-compose.yml` in the `client` section to mount the certificate files from the host: ```yaml @@ -62,7 +75,8 @@ client: 3. Stop any running instance: `npm run stop:deployed` 4. Commit the changes to a new Git branch. -5. Rebase the deployed instance: `npm run rebase:deployed` +5. Stop nginx on your host, which could be started by `sudo certbot --nginx` command. +6. Rebase the deployed instance: `npm run rebase:deployed` ### Option B: Host-based Deployment without Docker @@ -147,4 +161,4 @@ DISABLE_COMPRESSION=true This will prevent LibreChat from compressing static files, allowing NGINX to handle compression more efficiently. -For more information on static file handling in LibreChat, including caching options, refer to the [Static File Handling](/docs/configuration/dotenv#static-file-handling) documentation. \ No newline at end of file +For more information on static file handling in LibreChat, including caching options, refer to the [Static File Handling](/docs/configuration/dotenv#static-file-handling) documentation.