Termbox provides instant Linux terminal access via a web interface.
Note: this is not Termbox the user interface library.
First, install hyperd.
By default, hyperd is accessible via a socket file at /var/run/hyper.sock
.
You can pass this file to Termbox, or configure hyperd to listen on a TCP address.
Due to the lack of built in authentication, both methods should be used with care.
Termbox is distributed as a Docker image:
docker run -v /var/run/hyper.sock:/var/run/hyper.sock -p 7842:7842 termbox/termbox
Now open localhost:7842
and you should see the app loading up.
Install the following first:
Get the code and its dependencies:
go get -d github.com/termbox/termbox
cd $GOPATH/github.com/termbox/termbox
glide install
npm install
jspm install
Run the server:
make run
Now open localhost:7842
.
Termbox is configured via environment variabes, although a .env
file is
supported as well.
TERMBOX_ADDR
: Address and port to listen on. Defaults to:7842
.TERMBOX_ENV
: When set toproduction
, enables various optimizations and loads the script bundle. Defaults todevelopment
.TERMBOX_RCSITEKEY
andTERMBOX_RCSECRET
: Recaptcha site key and secret. No captcha checks are performed if not set.TERMBOX_AUTOTLS
: If set totrue
, enables TLS and automatically obtains a certificate from Let's Encrypt.TERMBOX_TLSCERT
andTERMBOX_TLSKEY
: Enables TLS using the specificed certificate and key.TERMBOX_BOXMEMORY
: RAM assigned to boxes in megabytes. Defaults to256
.TERMBOX_BOXCPUS
: CPUs assigned to boxes. Defaults to1
.TERMBOX_BOXDURATION
: Time in hours after which boxes are deleted. Defaults to3
.TERMBOX_PUBLICADDR
: The public address of the server. Setting this enables public ports.TERMBOX_HYPERPROTO
: Protocol to access hyperd. Set tounix
(default) ortcp
.TERMBOX_HYPERADDR
: Address to access hyperd. Defaults to/var/run/hyper.sock
.
To generate a self signed cert for development, run:
go run /usr/lib/golang/src/crypto/tls/generate_cert.go --host localhost