To Reproduce
- Install Dokploy v0.28.8 with default configuration
- Deploy any application (e.g., a Next.js app)
- Go to the application's Deployments tab and click on any past deployment to view its logs
- The deployment logs dialog opens but stays in a loading state indefinitely - logs never appear
- Go to the application's Logs tab
- You can select a container from the dropdown, but the logs widget never loads - it remains empty
- Open browser DevTools (F12) → Console tab
- You will see WebSocket errors like:
WebSocket connection to 'wss://your-domain/listen-deployment?logPath=/etc/dokploy/logs/app/app-2026-04-11:15:47:42.log' failed:
WebSocket error: Event {isTrusted: true, type: 'error', target: WebSocket, ...}
Root cause investigation:
-
SSH into the server and test WebSocket through Traefik with HTTP/2:
curl -v -N -k -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: your-domain.com" -H "Sec-WebSocket-Key: dGVzdA==" -H "Sec-WebSocket-Version: 13" "https://localhost:443/listen-deployment?logPath=/etc/dokploy/logs/app/app.log"
Result: HTTP/2 404 - WebSocket upgrade fails because HTTP/2 doesn't use the traditional "Upgrade" header
-
Test with HTTP/1.1 forced:
curl --http1.1 -v -N -k -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: your-domain.com" -H "Sec-WebSocket-Key: dGVzdA==" -H "Sec-WebSocket-Version: 13" "https://localhost:443/listen-deployment?logPath=/etc/dokploy/logs/app/app.log"
Result: HTTP/1.1 400 Bad Request - WebSocket endpoint is reached (400 is expected with curl, not a real WS client)
Current vs. Expected behavior
Current behavior:
- The default
traefik.yml configuration enables HTTP/2 and HTTP/3
- Modern browsers negotiate HTTP/2 with Traefik via ALPN
- WebSocket connections fail because HTTP/2 handles WebSockets differently (no "Upgrade" header mechanism)
- Users cannot view deployment logs or container logs in the Dokploy UI
- The logs panel shows infinite loading state
Expected behavior:
- WebSocket connections for logs/monitoring should work out of the box
- Either HTTP/2 should be disabled by default, or Traefik should be configured to handle WebSockets over HTTP/2 properly
Provide environment information
- **Operating System:** Ubuntu 24.04 LTS (x86_64)
- **Dokploy version:** v0.28.8
- **VPS Provider:** Hostinger
- **Applications deployed:** Next.js applications, Node.js APIs
- **Reverse proxy:** Using Cloudflare proxy (but issue also occurs without Cloudflare)
Which area(s) are affected? (Select all that apply)
Traefik
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
How we discovered the root cause:
Initially, I suspected the issue was related to Cloudflare proxy or firewall configuration. After extensive debugging:
- Checked Docker containers - all Dokploy containers running correctly
- Verified disk space and PostgreSQL logs - no issues
- Noticed browser console errors showing WebSocket failures
- Bypassed Cloudflare proxy to test direct connection - same WebSocket errors persisted
- Tested WebSocket endpoint directly on port 3000 (Dokploy) - worked correctly
- Tested WebSocket through Traefik port 443 - failed with HTTP/2 404
- Tested WebSocket through Traefik with
--http1.1 flag - worked correctly
This confirmed that HTTP/2 negotiation between browser and Traefik was breaking the WebSocket upgrade mechanism.
Default traefik.yml (problematic):
entryPoints:
web:
address: :80
websecure:
address: :443
http3:
advertisedPort: 443
http:
tls:
certResolver: letsencrypt
Fixed traefik.yml (working):
entryPoints:
web:
address: :80
websecure:
address: :443
http2:
maxConcurrentStreams: 0
http:
tls:
certResolver: letsencrypt
The fix disables HTTP/2 by setting maxConcurrentStreams: 0, which forces browsers to use HTTP/1.1 where traditional WebSocket upgrades work correctly.
Possible solutions:
- Quick fix: Change default Traefik configuration to disable HTTP/2 for the websecure entrypoint
- Better fix: Implement proper HTTP/2 WebSocket support (RFC 8441) in Dokploy's WebSocket endpoints
- Documentation: Add a troubleshooting section about this issue for users who enable HTTP/2
However I would appreciate feedback about the approach I followed, thanks!
Will you send a PR to fix it?
Yes
To Reproduce
Root cause investigation:
SSH into the server and test WebSocket through Traefik with HTTP/2:
Result:
HTTP/2 404- WebSocket upgrade fails because HTTP/2 doesn't use the traditional "Upgrade" headerTest with HTTP/1.1 forced:
Result:
HTTP/1.1 400 Bad Request- WebSocket endpoint is reached (400 is expected with curl, not a real WS client)Current vs. Expected behavior
Current behavior:
traefik.ymlconfiguration enables HTTP/2 and HTTP/3Expected behavior:
Provide environment information
Which area(s) are affected? (Select all that apply)
Traefik
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
How we discovered the root cause:
Initially, I suspected the issue was related to Cloudflare proxy or firewall configuration. After extensive debugging:
--http1.1flag - worked correctlyThis confirmed that HTTP/2 negotiation between browser and Traefik was breaking the WebSocket upgrade mechanism.
Default traefik.yml (problematic):
Fixed traefik.yml (working):
The fix disables HTTP/2 by setting
maxConcurrentStreams: 0, which forces browsers to use HTTP/1.1 where traditional WebSocket upgrades work correctly.Possible solutions:
However I would appreciate feedback about the approach I followed, thanks!
Will you send a PR to fix it?
Yes