Alternatives
Tech stack
No tech stack added yet. Sign in to suggest some
Note: The official website could not be fetched this time. The text below is based on existing knowledge of the project, so please refer to the official website and the GitHub repository for exact parameters and installation methods.
Introduction
ttyd is an open-source command-line tool for sharing a terminal over the web. It runs a shell or another command-line program on the server and forwards input and output to the browser over WebSocket. The front end renders the terminal with xterm.js, so users don't need to install an SSH client. They can use the command line just by opening a browser.
Key Features
- Web-based terminal: The front end uses xterm.js and supports CJK characters and input methods.
- High performance and small size: Written in C and built on libuv and libwebsockets, it has a low resource footprint.
- File transfer: Supports the ZMODEM (with lrzsz) and trzsz protocols, so you can upload and download files in the browser.
- Image display: Supports Sixel image output.
- Security options: Supports SSL/TLS encryption and HTTP basic authentication.
- Read-only or writable mode: Newer versions are read-only by default, and you need to add the
-Woption to allow client input. - Runs any command: It can run not only bash but any terminal program, such as top, htop, and vim.
- Cross-platform: Supports platforms including Linux, macOS, FreeBSD, OpenWrt, and Windows.
Target Users and Use Cases
- Ops engineers and developers who need temporary browser access to a server
- Providing a web-based management terminal on NAS devices, routers (OpenWrt), or embedded devices
- Sharing a terminal screen during teaching demos
- Wrapping command-line tools as web services
Installation and Usage
- macOS:
brew install ttyd - Linux: Use your distribution's package, or download a prebuilt static binary from GitHub Releases
- Docker: Use the official image
tsl0922/ttyd - You can also build from source, which requires dependencies such as CMake, libwebsockets, libuv, and json-c
Basic usage examples:
# 在默认端口 7681 共享 bash,并允许客户端输入
ttyd -W bash
# 指定端口,并启用用户名和密码认证
ttyd -p 8080 -c user:password -W bash
After it starts, open http://server-address:port in a browser to access it.
Notes
Exposing a writable shell to the network is risky. We recommend enabling authentication and SSL, or using it behind a reverse proxy or VPN. The project is open source under the MIT license.
Discover more
Nexterm
The open source server management software for SSH, VNC & RDP
collie
Herdr mobile client for iPhone and Android. A self-hosted PWA to drive Claude Code, Pi, Codex and OpenCode in Herdr, tmux or zellij from your phone. Push alerts, no app store.
Cardea
Cardea is an SSH bastion server with access control, session recording, and optional TPM-backed key protection.
EasyTier
A simple, decentralized mesh VPN with WireGuard support.
Engity's Bifröst
Highly customizable SSH server with several ways to authorize a user and options where and how to execute a user's session.
Firezone
Secure remote access gateway that supports the WireGuard protocol. It offers a Web GUI, 1-line install script, multi-factor auth (MFA), and SSO.