From 5f3a3e24911412ab49461b4ea844a385d0928ba2 Mon Sep 17 00:00:00 2001 From: Sebastian Noe Date: Tue, 21 Jan 2025 19:48:44 +0100 Subject: [PATCH] add info about reverse proxy setup with nginx --- docs/self-hosting/development.md | 2 +- docs/self-hosting/reverse-proxy.md | 51 ++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 docs/self-hosting/reverse-proxy.md diff --git a/docs/self-hosting/development.md b/docs/self-hosting/development.md index b73b7de..d1b569d 100644 --- a/docs/self-hosting/development.md +++ b/docs/self-hosting/development.md @@ -1,5 +1,5 @@ --- -sidebar_position: 4 +sidebar_position: 5 --- # Development diff --git a/docs/self-hosting/reverse-proxy.md b/docs/self-hosting/reverse-proxy.md new file mode 100644 index 0000000..6184478 --- /dev/null +++ b/docs/self-hosting/reverse-proxy.md @@ -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 \ No newline at end of file