remote-chrome starts Google Chrome on a remote Linux host over Waypipe and can
temporarily forward a local YubiKey to that host for WebAuthn/FIDO prompts.
The common use case is a browser profile that must live on another machine, but still needs a physical security key attached to the local machine.
You need SSH access from the local host to the remote host.
remote-chrome launch --foreground HOSTcan use normal interactive SSH.- The default detached tmux launch requires noninteractive SSH, such as an SSH key, agent, or an already-open SSH control connection.
- YubiKey forwarding requires noninteractive SSH because USB/IP setup runs multiple remote commands.
Local host requirements:
bashsshwaypipetmux- a graphical Wayland session
Remote host requirements:
waypipegoogle-chrome-stable
The launcher starts Chrome with:
--ozone-platform=wayland --disable-gpu --disable-features=Vulkan --new-windowWaypipe is intentionally kept as a prerequisite rather than installed by this script. Package names and setup differ enough across distros that automatic installation would add churn and surprising behavior.
Local host requirements:
usbipssfromiproute2- a local YubiKey visible in
usbip list -l sudoaccess formodprobe usbip-host,usbip bind,usbip unbind, and starting/stoppingusbipd
Remote host requirements:
usbip- passwordless remote
sudoformodprobe vhci-hcd,usbip attach, andusbip detach libfido2for optionalfido2-tokenverification
Passwordless remote sudo is a hard requirement for YubiKey forwarding. The
remote commands run over noninteractive SSH and cannot complete a sudo prompt.
On an Arch-family remote host, install the remote-side packages:
ssh remote-host 'sudo pacman -S --needed waypipe usbip libfido2'Install Google Chrome on the remote host through the appropriate channel for that machine.
On an Arch-family local host, install the runtime dependencies:
sudo pacman -S --needed waypipe tmux usbip iproute2Clone the repository:
git clone https://github.com/byebyebryan/remote-chrome.git
cd remote-chromeFor an editable checkout, link the launcher into the user-local executable directory:
mkdir -p "$HOME/.local/bin"
ln -s "$PWD/bin/remote-chrome" "$HOME/.local/bin/remote-chrome"Alternatively, install a standalone copy:
install -Dm755 bin/remote-chrome "$HOME/.local/bin/remote-chrome"Make sure $HOME/.local/bin is on PATH. Add this to the appropriate shell
startup file if it is not already configured:
export PATH="$HOME/.local/bin:$PATH"Verify the local setup:
command -v remote-chrome
remote-chrome --help
usbip list -lThe final command should list a connected YubiKey when YubiKey forwarding will
be used. Chrome-only sessions do not require a YubiKey or the usbip tools.
Start Chrome on the remote host in a detached tmux session:
remote-chrome launch remote-hostThe host can also be the first argument:
remote-chrome remote-hostThe default tmux session name is remote-chrome-HOST, with characters that are
awkward for tmux targets replaced by underscores. For example, remote.example
becomes remote-chrome-remote_example.
Check or stop the session:
remote-chrome status remote-host
remote-chrome stop remote-hostPass extra Chrome arguments after --:
remote-chrome launch remote-host -- --profile-directory=DefaultRun in the foreground instead of tmux:
remote-chrome launch remote-host --foregroundDetached tmux mode is the default because it keeps Chrome and Waypipe alive if the launching terminal exits, and it gives you a stable place to inspect logs:
tmux attach -t remote-chrome-remote-host
tmux capture-pane -pt remote-chrome-remote-host:chromeA user systemd service would also work, but tmux keeps this tool dependency-light and easy to inspect.
Chrome has single-instance behavior per user-data directory. If Chrome is already running on the remote host, a new invocation can delegate to that existing browser process, which means the tab or window opens in the remote host's normal desktop session instead of the Waypipe session.
--new-window does not fully solve this because the existing browser process
can still handle the request.
By default, remote-chrome launch checks for an existing remote Chrome browser
process and stops before launching if one is found. Use one of these options:
remote-chrome launch remote-host --kill-existing
remote-chrome launch remote-host --kill-existing --yes
remote-chrome launch remote-host --allow-existingUse --kill-existing only after saving anything important in the remote browser.
Use --allow-existing only when you know the existing browser process uses a
different --user-data-dir.
For an interactive WebAuthn prompt, foreground mode starts USB/IP forwarding and cleans up when you press Ctrl-C:
remote-chrome yubikey run remote-hostLeave that terminal open while completing the browser prompt. Touch the physical YubiKey locally when Chrome asks for it.
The explicit start/stop form is available when needed:
remote-chrome yubikey start remote-host
remote-chrome yubikey status remote-host
remote-chrome yubikey stop remote-hostWhile forwarding is active, the YubiKey is attached to the remote host, so local apps may not be able to use it.
The tool records the exact local bus ID and any usbipd process it started in a
state file beside the SSH control socket. Cleanup only detaches that recorded
device. A pre-existing system usbipd is never stopped, and a tool-started
daemon remains running while other USB/IP exports still exist.
You can also start YubiKey forwarding with the Chrome tmux session:
remote-chrome launch remote-host --with-yubikeyThis creates a second tmux window named yubikey in the same session. Stopping
the tmux session sends the forwarding process a signal, and it detaches/unbinds
the YubiKey during cleanup.
If you prefer an explicit prompt when a local YubiKey is detected:
remote-chrome launch remote-host --ask-yubikeyThe tool does not auto-forward a detected YubiKey by default. Forwarding gives the remote host access to the USB device, so it stays opt-in.
Chrome defaults:
REMOTE_CHROME_COMMAND=google-chrome-stable
REMOTE_CHROME_SESSION_PREFIX=remote-chromeYubiKey defaults:
REMOTE_CHROME_YUBIKEY_USB_ID=1050:0407
REMOTE_CHROME_USBIP_PORT=3240
REMOTE_CHROME_YUBIKEY_SOCKET=${XDG_RUNTIME_DIR:-/tmp}/remote-chrome-yubikey-remote-host.sock
REMOTE_CHROME_STOP_USBIPD=1Set REMOTE_CHROME_STOP_USBIPD=0, or pass --keep-usbipd to a yubikey
command, to leave a tool-started daemon running after cleanup.
If modprobe usbip-host fails locally after a kernel upgrade, reboot so the
running kernel matches /lib/modules.
USB/IP gives the remote host access to the forwarded USB device. Only forward to hosts you trust.
The script uses an SSH reverse tunnel bound to 127.0.0.1 on the remote side.
The local usbipd daemon may still listen on the local host's network
interfaces while forwarding is active, depending on your distro's usbipd
behavior. Run remote-chrome yubikey stop HOST after use, or use
remote-chrome yubikey run HOST and stop it with Ctrl-C.
Install ShellCheck and run the repository checks:
sudo pacman -S --needed shellcheck
./scripts/checkThe check script runs Bash syntax validation, ShellCheck, the command-level
test suite, and git diff --check. The same checks run in GitHub Actions.
Released under the MIT License.