Skip to content

Commit 332b629

Browse files
authored
Merge pull request #43 from makeplane/external-reverse-proxy
Added new page for external reverse proxy
2 parents 5169e25 + 4150c49 commit 332b629

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

0 commit comments

Comments
 (0)