Skip to content

No Websocket connection #19

@iljur

Description

@iljur

Trying to make Websocket work following your (excellent!) manual Tutorial. I switched from OS version to the Pro server by just copying your compose.yml only changing the user/group IDs and leaving out the Caddy part.

Caddy is already installed directly on the host (Debian 12) serving two more subdomains without problems. So I just copy/paste the section for the new rust-domain into my existing Caddyfile (which is not too fancy at all, no global settings except email for ACME). Caddy gets a new certificate for the new rust domain without problems. Showing no errors while starting.

My clients (Windows, V1.4.5) cannot connect as soon as I enable Websocket in the network settings of the client. They connect instantly if I disable Websocket again (ports 211*,443,80 are all open in the fw for debbuging).

I can enter the Console/Web-UI without problems.

The Windows clients log says something like the following while trying to connect to the server with websocket switched on (changed actual domain for example.com):

[2026-01-11 12:00:33.158960 +01:00] DEBUG [src\client.rs:3987] Failed to create peers online stream, deadline has elapsed [2026-01-11 12:00:51.166162 +01:00] DEBUG [src\client.rs:3987] Failed to create peers online stream, deadline has elapsed [2026-01-11 12:00:58.776919 +01:00] WARN [src\common.rs:2151] Failed to bind IPv6 socket: Failed to resolve STUN ipv6 server address: stun.l.google.com:19302 [2026-01-11 12:00:58.776926 +01:00] INFO [src\common.rs:627] Testing nat ... [2026-01-11 12:00:58.781617 +01:00] ERROR [src\common.rs:2203] Failed to get public IPv6 address: Failed to resolve STUN ipv6 server address: stun.nextcloud.com:3478 [2026-01-11 12:00:58.803606 +01:00] DEBUG [src\common.rs:655] Got nat response from rust.example.com:21116: port=61000 [2026-01-11 12:00:58.837333 +01:00] DEBUG [src\common.rs:655] Got nat response from rust.example.com:21115: port=62210 [2026-01-11 12:00:58.837505 +01:00] INFO [src\common.rs:681] Tested nat type: SYMMETRIC in 60.5205ms

There is no IP6 in my local network here, so maybe no surprise here. Is IP6 crucial for Websocket??

I switched on some logging in Caddy and get lots of:

{"level":"info","ts":1768136872.095879,"logger":"http.log.access.log2","msg":"handled request","request":{"remote_ip":"149.50.37.181","remote_port":"64655","client_ip":"149.50.37.181","proto":"HTTP/1.1","method":"GET","host":"rust.example.com","uri":"/ws/id","headers":{"Connection":["Upgrade"],"Upgrade":["websocket"],"Sec-Websocket-Version":["13"],"Sec-Websocket-Key":["fIY7KfjZ914o/+3XZpFVMA=="]}},"bytes_read":0,"user_id":"","duration":0.000018087,"size":0,"status":308,"resp_headers":{"Location":["https://rust.example.com/ws/id"],"Content-Type":[],"Server":["Caddy"],"Connection":["close"]}}

"Http error 308: Permanent redirect" is also what the ios mobile client is showing when I switch on Websocket. Connects instantly if Websocket is switched off.

Any ideas on how to fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions