@elsetech/webterm
v2.0.0
Published
Run on a host machine to expose its shell to the WebTerm browser terminal.
Maintainers
Readme
@elsetech/webterm
Expose a host machine's shell to a browser terminal — no inbound ports, works behind NAT. Run this daemon on the machine you want to reach; it prints a token; paste that token into the WebTerm web UI to get a full interactive terminal.
It dials out over WebSocket to a Cloudflare Worker relay, which pairs it with your browser via a Durable Object keyed by the token.
Usage
npx @elsetech/webtermIt prints a token and a ready-to-open URL:
Token : Vb7m2x9Q…
Open : https://webterm.elsetech.app/?token=Vb7m2x9Q…Open that URL (token prefilled, auto-connects), or paste the token at https://webterm.elsetech.app.
Config (env vars)
| Var | Default | Purpose |
| --------------- | ------------------------------ | ------------------------------- |
| WEBTERM_SERVER| https://webterm.elsetech.app | Worker relay origin |
| WEBTERM_TOKEN | random 256-bit per run | Pin a fixed token (min 24 chars)|
| WEBTERM_SHELL | $SHELL / bash / powershell | Shell to spawn |
Security
The token is the credential — anyone with it gets a shell on this host. It is a random 256-bit value per run. Treat it like a password.
Requirements
Node.js >= 18. Installs node-pty (prebuilt binaries; a C/C++ toolchain is only
needed if a prebuild isn't available for your platform).
