Skip to content

add info about reverse proxy setup with nginx #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/self-hosting/development.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 5
---

# Development
Expand Down
51 changes: 51 additions & 0 deletions docs/self-hosting/reverse-proxy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
sidebar_position: 4
---

# Reverse Proxy Setup

If you want to expose docmost to the internet, you should hide it behind a reverse proxy with SSL enabled.
You need to enable websockets for a working setup.

## Nginx
In addition to the usual configuration for SSL, the following configuration is required for docmost to operate:

```
http {

# Adjust as required. This is the maximum size for file uploads.
# The default value 1M might be a little too small.
# This should be equal or higher than the FILE_UPLOAD_SIZE_LIMIT environment in your docker compose file
client_max_body_size 10M;

server {

location / {

# Adjust host and port as required.
proxy_pass http://localhost:3000/;

# These configuration options are required for WebSockets to work.
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
add_header Referrer-Policy "strict-origin-when-cross-origin";
}
}
}
```

## Traefik
TBD

## Caddy
TBD

## Apache2
TBD