-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
Description
Describe the bug
I tried unsuccessfully to get ttyd to work on wsl2 (ubuntu). I had downloaded the 1.7.7 amd64 binary from the GitHub Releases page. The issue was that the server would start but was not accessible from browsers within Windows or WSL. I decided to download and build from source and now it works fine.
- The version on the Releases page is: ttyd 1.7.7-40e79c7 (libwebsockets 4.3.3-unknown)
- The version that is working is: ttyd 1.7.7-05422dc (libwebsockets 4.0.20)
(Note libwebsockets version is lower on the working version)
Environment:
- OS: Linux CFA-L-F888JR3 5.15.167.4-microsoft-standard-WSL2 # 1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Output from Non-Working Binary
[2025/07/20 13:04:30:4237] N: ttyd 1.7.7-40e79c7 (libwebsockets 4.3.3-unknown)
[2025/07/20 13:04:30:4237] N: tty configuration:
[2025/07/20 13:04:30:4237] N: start command: bash
[2025/07/20 13:04:30:4238] N: close signal: SIGHUP (1)
[2025/07/20 13:04:30:4238] N: terminal type: xterm-256color
[2025/07/20 13:04:30:4238] N: The --writable option is not set, will start in readonly mode
[2025/07/20 13:04:30:4238] N: lws_create_context: LWS: 4.3.3-unknown, MbedTLS-2.28.5 NET SRV H1 H2 WS ConMon IPV6-off
[2025/07/20 13:04:30:4239] N: elops_init_pt_uv: Using foreign event loop...
[2025/07/20 13:04:30:4240] N: __lws_lc_tag: ++ [wsi|0|pipe] (1)
[2025/07/20 13:04:30:4240] N: __lws_lc_tag: ++ [vh|0|netlink] (1)
[2025/07/20 13:04:30:4241] N: __lws_lc_tag: ++ [vh|1|default|lo|lo|8080] (2)
[2025/07/20 13:04:30:4242] N: [vh|1|default|lo|lo|8080]: lws_socket_bind: source ads 10.255.255.254
[2025/07/20 13:04:30:4243] N: __lws_lc_tag: ++ [wsi|1|listen|default|lo|8080] (2)
[2025/07/20 13:04:30:4243] N: Listening on port: 8080
^C[2025/07/20 13:04:51:2281] N: received signal: SIGINT (2), exiting...
[2025/07/20 13:04:51:2281] N: send ^C to force exit.
Output from Working Binary
[2025/07/20 13:34:01:1519] N: ttyd 1.7.7-05422dc (libwebsockets 4.0.20)
[2025/07/20 13:34:01:1519] N: tty configuration:
[2025/07/20 13:34:01:1519] N: start command: ./myprogram
[2025/07/20 13:34:01:1519] N: close signal: SIGHUP (1)
[2025/07/20 13:34:01:1519] N: terminal type: xterm-256color
[2025/07/20 13:34:01:1520] N: Using foreign event loop...
[2025/07/20 13:34:01:1603] N: Listening on port: 8080
[2025/07/20 13:34:10:7487] N: HTTP / - 127.0.0.1
[2025/07/20 13:34:10:7643] N: HTTP /favicon.ico - 127.0.0.1
[2025/07/20 13:34:10:9543] N: HTTP /token - 127.0.0.1
[2025/07/20 13:34:10:9584] N: HTTP /favicon.ico - 127.0.0.1
[2025/07/20 13:34:11:0273] N: WS /ws - 127.0.0.1, clients: 1
[2025/07/20 13:34:11:0310] N: started process, pid: 6756
[2025/07/20 13:34:23:6542] N: WS closed from 127.0.0.1, clients: 0
[2025/07/20 13:34:23:6543] N: killing process, pid: 6756
[2025/07/20 13:34:23:6563] N: process killed with signal 1, pid: 6756
^C[2025/07/20 13:34:27:7149] N: received signal: SIGINT (2), exiting...
[2025/07/20 13:34:27:7149] N: send ^C to force exit.
Mistic92