Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions pages/docs/remote/nginx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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/<your-domain>/` directory on your host.

```nginx
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
# ...
ssl_certificate /etc/letsencrypt/live/<your-domain>/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/<your-domain>/privkey.pem;
# ...
server_name <your-domain>;
# ...
```

2. Update `deploy-compose.yml` in the `client` section to mount the certificate files from the host:

```yaml
Expand All @@ -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

Expand Down Expand Up @@ -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.
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.
Loading