Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Stream a tmux session in realtime over HTTP

On the server with tmux

Create a new tmux session:

tmux new-session -s my-session # launch `top`, `htop`, or anything that will regularly updates, then detach

Stream your session:

STREAM=$(curl -sX POST -d '' stream.chunk.io/streams)
echo $STREAM
socat EXEC:"tmux attach -t my-session",pty,stderr EXEC:"curl -T - $STREAM"

On the client(s)

curl --no-buffer $STREAM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment