Closed megacorvega closed 1 year ago
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
You need to configure caddy to handle web sockets.
I'm having some trouble with that as well. I've added this to my Caddyfile entry:
kasm.{$MY_DOMAIN} {
@websockets {
header Connection *Upgrade*
header Upgrade websocket
}
reverse_proxy @websockets monolith.lan:4443 {
transport http {
tls_insecure_skip_verify
}
}
tls {
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
resolvers 1.1.1.1
}
}
But now I'm getting a blank page on the site. I'm sure I just don't understand how to apply the right headers. I'm trying to figure out how to redefine the host as to not include the 4443 port number at the end. I'll update here if I can figure it out.
EDIT: I've asked in the caddy forums, and apparently my initial configuration should handle websockets. Still looking into it.
Well, the answer was in the issue that I referenced... Just gotta learn to read I guess.
https://www.kasmweb.com/docs/latest/how_to/reverse_proxy.html#update-zones
Is there an existing issue for this?
REF: #27
Current Behavior
When running kasm behind a caddy reverse proxy (using the non standard 443 port), the containers become stuck on "Creating a secure connection..."
Expected Behavior
I have tested that the containers load and operate as intended if I use the fqdn of the host machine (eg. https://fqdn:4443), and not the proxied address.
Steps To Reproduce
Here is my caddy entry:
Also to note, the web browser F12 output shows:
Firefox can’t establish a connection to the server at wss://kasm.<domain>.com:4443/desktop/e052a7c5-f250-45d8-837a-1ef835f8b60c/audio/.
This is repeated as it attempts to connect.
Environment
CPU architecture
x86-64
Docker creation
Command used:
Container logs