-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Example Usage
Zorbatron edited this page Jul 13, 2025
·
13 revisions
ttyd starts web server at port 7681 by default, you can use the -p option to change it, the command will be started with arguments as options. For example, run:
ttyd -p 8080 bashThen open http://localhost:8080 with a browser, you will get a bash shell with debug mode enabled.
More Examples:
- If you want to login with your system accounts on the web browser, run
ttyd login. - You can even run a non-shell command like vim, try:
ttyd vim, the web browser will show you a vim editor. - Sharing single process with multiple clients:
ttyd tmux new -A -s ttyd vim, runtmux new -A -s ttydto connect to the tmux session from terminal.
- enable ZMODEM / lrzsz file transfer support:
ttyd -t enableZmodem=true bash - enable trzsz file transfer support:
ttyd -t enableTrzsz=true bash - enable Sixel image output support (img2sixel / lsix):
ttyd -t enableSixel=true bash
- Sharing single docker container with multiple clients:
docker run -it --rm -p 7681:7681 tsl0922/ttyd. - Creating new docker container for each client:
ttyd docker run -it --rm ubuntu.
Chrome users might be interested in launching chrome as chrome --app=https://www.example.com/ttyd, as this allows Ctrl+n, Ctrl+w etc. to be passed to the terminal.