Self-host ttyd with Levelrail
Shares a terminal over the web. Starts a shell inside its own container behind a generated password, handy for demos and short lived admin tasks.
- Authortsl0922
- LicenceMIT
- Memory64 MiB
- Services1
How to self-host ttyd
-
Pull the images
One image is pulled on your server.
Show images
tsl0922/ttyd:1.7.7
-
Create the app
One service starts in a single Compose app, on port 7681.
-
Fill in the secrets
1 secret is generated and stored encrypted, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
After the first start
- Sign in as admin with the generated password shown in the deployment variables. The shell sees only this container, never the host.
ttyd requirements
- Memory
- About 64 MiB
- Architectures
- amd64 unknown, arm64 unknown
- Ports
- 7681
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- MIT, permissive license
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then ttyd. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the ttyd docs page.
Deploy ttyd your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy ttyd from the CLI
levelrail-cli templates install ttyd --name my-ttyd Deploy ttyd with the API
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
https://levelrail.example.com/api/v1/service-templates/ttyd/install \
-d '{
"name": "my-ttyd"
}' ttyd configuration
ttyd services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| ttyd | tsl0922/ttyd:1.7.7 | 7681 | none |
ttyd environment variables
| Variable | Service | Value |
|---|---|---|
| TTYD_PASSWORD | ttyd | Generated at deploy |
Ports and volumes
- Ports
- 7681
- Volumes
- none
ttyd FAQ
How much memory does ttyd need?
The catalog lists about 64 MiB of memory for ttyd.
Does ttyd run on arm64?
For ttyd, arm64 support is not confirmed; amd64 is unknown.
What licence is ttyd under?
ttyd is licensed under MIT, which is permissive, with few conditions on reuse.
Does ttyd need configuration before it starts?
No. The template fills in its own defaults and generates secrets at deploy time.
Which ports does ttyd use?
ttyd listens on port 7681 inside the stack.
Can I deploy ttyd on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for ttyd, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image tsl0922/ttyd:1.7.7 is what you deploy there.