Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(nginx): proxy realtime and terminal WebSockets on the dashboard port

Andras Bacsaif97398c83c0e
diff --git a/docker/development/etc/nginx/site-opts.d/http.conf b/docker/development/etc/nginx/site-opts.d/http.conf
index d7855ae800..f92cd0625c 100644
--- a/docker/development/etc/nginx/site-opts.d/http.conf
+++ b/docker/development/etc/nginx/site-opts.d/http.conf
@@ -29,6 +29,24 @@ location /healthcheck {
fastcgi_pass 127.0.0.1:9000;
}
+# Proxy the realtime (Reverb) and terminal WebSockets that run in this container, so a
+# reverse proxy that forwards only this port (for example Tailscale Serve) also serves them.
+location /app/ {
+ proxy_pass http://127.0.0.1:6001;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "Upgrade";
+ proxy_set_header Host $host;
+}
+
+location = /terminal/ws {
+ proxy_pass http://127.0.0.1:6002;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "Upgrade";
+ proxy_set_header Host $host;
+}
+
# Have NGINX try searching for PHP files as well
location / {
try_files $uri $uri/ /index.php?$query_string;
diff --git a/docker/production/etc/nginx/site-opts.d/http.conf b/docker/production/etc/nginx/site-opts.d/http.conf
index d7855ae800..f92cd0625c 100644
--- a/docker/production/etc/nginx/site-opts.d/http.conf
+++ b/docker/production/etc/nginx/site-opts.d/http.conf
@@ -29,6 +29,24 @@ location /healthcheck {
fastcgi_pass 127.0.0.1:9000;
}
+# Proxy the realtime (Reverb) and terminal WebSockets that run in this container, so a
+# reverse proxy that forwards only this port (for example Tailscale Serve) also serves them.
+location /app/ {
+ proxy_pass http://127.0.0.1:6001;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "Upgrade";
+ proxy_set_header Host $host;
+}
+
+location = /terminal/ws {
+ proxy_pass http://127.0.0.1:6002;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "Upgrade";
+ proxy_set_header Host $host;
+}
+
# Have NGINX try searching for PHP files as well
location / {
try_files $uri $uri/ /index.php?$query_string;