Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Share your local tmux session in a web browser through a remote bridge machine.
Shell JavaScript Ruby
Branch: master

Webpair is an attempt to make pairing easy by sharing a tmux session through a web browser.

You will use a tmux session on your local machine that can be shared to other users on your machine. Then You'l open a ssh connection to a bridge server in the cloud where your pair buddies will be able to connect with their web browser.

WARNING: This is a full personna sharing that mean you and your pair will be the same user on your machine for the duration of the connection. The purpose of this tools IS NOT to keep the connection opened permanently. Close it when your pair session is finished.


  • a machine in the cloud where:
    • you can ssh to
    • git is installed
    • nodeJS is installed
  • a local account to be used to join your tmux session
  • ruby on your local machine


  1. create a shared tmux session with a server socket bin/stmux
  2. lunch the share script bin/stmux share
  3. share the resulting link with your friend

  4. shutdown the connection when your are done by hitting ^C.

How does it work

 (your tmux session) <>------           -
                            |            |
                   tmux socket share     | your machine
                            |            |
 |--<>(local pair user) <>--|            |
 |                                      -
 |                                      -
 --< (remote bridge) <>-----|             | your remote server
                            |           -
                            |           -
     (remote pair user) <>--|             | pair user machine

  1. stmux create a shared tmux session using a socket. Any local user can connect to it
  2. webpair open a ssh connection to your remote bridge with a come back route from a random port to your local machine port 22 (ssh). This back route can only be used by a logged user on the remote bridge machine.
  3. a tty.js server is launched o nthe bridge, attaching a random string to the back route port.
  4. when a remote pair use the URL of the bridge including the random string. tty.js establish a local SSH connection to the back route port.


setup your local machine

We want to create a local user which will automatically connect to the default stmux shared session at login.

  1. create a new user

    # Linux
    useradd ....
    # OSX
  2. make this user connect toe the default stmux socket

    cat > ~pguest/.bashrc <<EOF
    tmux -S /tmp/tmux-pair attach

setup on remote bridge

standalone server

Your local machine will establish a SSH connection to your remote bridge. You need a remote user to ssh to.

  1. checkout this repository as a folder named webpair at the root of your remote user home directory.

    ssh my_remote_user@remote.bridge git clone
  2. install our patched tty.js and its dependencies in our node subsystem.

    local>ssh my_remote_user@remote.bridge
    remote>cd webpair/tty.js
    remote>npm intall

** optionnal ** To avoid password asking and speedup connection time, you can setup ssh keys between your remote bridge and your local machine.

behind a webserver (ngynx)

__ to be done __


you can setup a YML configuration file ~/.webpair or ./.webpair

Here is an example:

  server: my.remote.bridge
  remote_user: my_remote_user
  remote_port: 8000
  local_guest_user: pguest
  use_https: true

__ TMUX_OPTS __ are complementary tmux command line options when creating a session.

Something went wrong with that request. Please try again.