Skip to content

Commit 4e7db72

Browse files
committed
Added new page for external reverse proxy
1 parent 5169e25 commit 4e7db72

File tree

2 files changed

+169
-0
lines changed

2 files changed

+169
-0
lines changed

mint.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
"self-hosting/govern/database-and-storage",
8989
"self-hosting/govern/custom-domain",
9090
"self-hosting/govern/private-bucket",
91+
"self-hosting/govern/reverse-proxy",
9192
"self-hosting/telemetry"
9293
]
9394
},
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
---
2+
title: Configure external reverse proxy
3+
sidebarTitle: External reverse proxy
4+
---
5+
6+
This guide provides configuration templates for setting up external reverse proxies with Plane using NGINX, Caddy, or Traefik.
7+
8+
All configurations include:
9+
- Automatic HTTPS redirection
10+
- WebSocket support
11+
- Standard proxy headers
12+
- SSL/TLS certificate management
13+
- NGINX: Uses Certbot
14+
- Caddy: Handles certificates automatically
15+
- Traefik: Uses Let’s Encrypt
16+
17+
## Proxy setup
18+
19+
1. Choose the appropriate [configuration template](#configuration-templates) for your reverse proxy.
20+
21+
2. Replace the following placeholders:
22+
- `<domain>`
23+
Your Plane application's domain name.
24+
- `<plane-host-ip>`
25+
The IP address where Plane is hosted.
26+
- `<plane-host-port>`
27+
The port Plane listens on.
28+
29+
3. For Traefik, also update `[email protected]` with your email.
30+
31+
## Configuration templates
32+
33+
### NGINX
34+
<Accordion title="NGINX configuration">
35+
```bash
36+
server {
37+
server_name <domain>;
38+
39+
location / {
40+
proxy_pass http://<plane-host-ip>:<plane-host-port>/;
41+
42+
# Set headers for proxied request
43+
proxy_set_header X-Forwarded-Proto $scheme;
44+
proxy_set_header X-Forwarded-Host $host;
45+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
46+
proxy_set_header X-Real-IP $remote_addr;
47+
48+
proxy_set_header Upgrade $http_upgrade;
49+
proxy_set_header Connection "upgrade";
50+
proxy_set_header Host $http_host;
51+
proxy_http_version 1.1;
52+
}
53+
54+
client_max_body_size 10M;
55+
56+
listen 443 ssl; # managed by Certbot
57+
ssl_certificate /etc/letsencrypt/live/<domain>/fullchain.pem;
58+
ssl_certificate_key /etc/letsencrypt/live/<domain>/privkey.pem;
59+
include /etc/letsencrypt/options-ssl-nginx.conf;
60+
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
61+
}
62+
63+
server {
64+
if ($host = <domain>) {
65+
return 301 https://$host$request_uri;
66+
}
67+
68+
listen 80;
69+
server_name <domain>;
70+
return 404;
71+
}
72+
```
73+
74+
</Accordion>
75+
76+
### Caddy
77+
<Accordion title="Caddy configuration">
78+
```bash
79+
<domain> {
80+
tls {
81+
# Caddy will automatically handle certificates
82+
}
83+
84+
redir / https://{host}{uri} permanent
85+
86+
reverse_proxy <plane-host-ip>:<plane-host-port> {
87+
header_up X-Forwarded-Proto {scheme}
88+
header_up X-Forwarded-Host {host}
89+
header_up X-Real-IP {remote_host}
90+
header_up X-Forwarded-For {remote_host}
91+
header_up Host {http.request.host}
92+
93+
header_up Upgrade {http.request.header.Upgrade}
94+
header_up Connection {http.request.header.Connection}
95+
96+
transport http {
97+
tls_insecure_skip_verify
98+
read_buffer 4096
99+
write_buffer 4096
100+
}
101+
}
102+
103+
request_body {
104+
max_size 10MB
105+
}
106+
}
107+
```
108+
109+
</Accordion>
110+
111+
### Traefik
112+
<Accordion title="Traefik configuration">
113+
```bash
114+
entryPoints:
115+
web:
116+
address: ":80"
117+
http:
118+
redirections:
119+
entryPoint:
120+
to: websecure
121+
scheme: https
122+
permanent: true
123+
124+
websecure:
125+
address: ":443"
126+
127+
certificatesResolvers:
128+
letsencrypt:
129+
acme:
130+
email: [email protected] # Replace with your email
131+
storage: acme.json
132+
httpChallenge:
133+
entryPoint: web
134+
135+
providers:
136+
http:
137+
routers:
138+
plane-router:
139+
rule: "Host(`<domain>`)"
140+
service: plane-service
141+
entryPoints:
142+
- websecure
143+
tls:
144+
certResolver: letsencrypt
145+
146+
services:
147+
plane-service:
148+
loadBalancer:
149+
servers:
150+
- url: "http://<plane-host-ip>:<plane-host-port>"
151+
passHostHeader: true
152+
responseForwarding:
153+
flushInterval: "100ms"
154+
serversTransport:
155+
maxIdleConnsPerHost: 100
156+
forwardingTimeouts:
157+
dialTimeout: 30s
158+
responseHeaderTimeout: 30s
159+
idleConnTimeout: 90s
160+
161+
middlewares:
162+
headers:
163+
headers:
164+
customRequestHeaders:
165+
X-Forwarded-Proto: "https"
166+
X-Real-IP: "{{ .RemoteAddr }}"
167+
```
168+
</Accordion>

0 commit comments

Comments
 (0)