Skip to content

Instantly share code, notes, and snippets.

@ChrisColeTech
Last active August 21, 2025 15:34
Show Gist options
  • Select an option

  • Save ChrisColeTech/aecf3ddf7e80b5d03040177b4913323e to your computer and use it in GitHub Desktop.

Select an option

Save ChrisColeTech/aecf3ddf7e80b5d03040177b4913323e to your computer and use it in GitHub Desktop.
Completely FREE Claude Code MOBILE Setup (with tmux, Bitvise, and playit.gg)

Claude Code MOBILE Setup (with tmux, Bitvise, and playit.gg)

GxbDZHyaEAAtviV

This guide will walk you through setting up a remote-accessible Claude Code environment using tmux, Bitvise SSH Server, and playit.gg so you can attach to your running Claude session from another PC or your phone.


1. Install Required Software

Windows + PowerShell or Command Prompt

  1. Install Bitvise SSH Server Download: https://bitvise.com/ssh-server-download

  2. Install MSYS2 (bash shell for Windows) Download: https://www.msys2.org/

  3. Install tmux in MSYS2

    C:\msys64\usr\bin\bash.exe -lc "pacman -S --noconfirm tmux"
  4. Install playit.gg (creates a public tunnel to your SSH server) Download: https://playit.gg/download

  5. In Bitvise, set MSYS2 as the default shell:

    • Open Bitvise SSH Server Control Panel
    • Go to Open easy settingsTerminal Shell
    • Set it to: C:\msys64\usr\bin\bash.exe -l
  6. (Optional) Create a launch script to auto-start tmux + Claude when you connect (see section 4).


Windows + WSL (easier)

  1. Install WSL (Ubuntu recommended)

    wsl --install -d Ubuntu
  2. Install tmux in WSL

    sudo apt update && sudo apt install -y tmux
  3. Install Bitvise SSH Server (Download here)

  4. Install playit.gg (Download here)

  5. In Bitvise, set WSL as the default shell:

    • Open Bitvise SSH Server settings → Terminal shell
    • Example: wsl.exe -d Ubuntu
  6. Create a launch script to start tmux + Claude (see section 4).


2. Set Up playit.gg Tunnel for SSH

  1. Sign up at https://playit.gg and log in.

  2. Download and run the playit.gg client on your PC.

  3. In the dashboard, create a new tunnel:

    • Type: TCP
    • Port: 22 (SSH)
  4. Copy the public hostname/IP from the dashboard.


3. Test SSH Connection

From another device:

ssh yourusername@PUBLIC_IP_FROM_PLAYITGG

Example:

If successful, you should see your shell prompt.


4. Create "Attach or Create" Scripts

These scripts will attach to your tmux session if it exists or create one if it doesn’t.

PowerShell Version

Save this as attach.ps1 and place it somewhere in your PATH.

$msysBash   = 'C:\msys64\usr\bin\bash.exe'
$serverName = 'cc'
$session    = 'main'
$workDir    = '/c/Projects'
$pwshCmd    = "/usr/bin/winpty /c/Progra~1/PowerShell/7/pwsh.exe -NoLogo -NoExit -WorkingDirectory C:/Projects -Command claude"

$tmuxScript = "tmux -L $serverName has-session -t $session 2>/dev/null || tmux -L $serverName new-session -d -s $session -c $workDir '$pwshCmd'; exec winpty /usr/bin/tmux -L $serverName attach -t $session"

& "$msysBash" -lc "$tmuxScript"

Run it:

attach.ps1

CMD Version

Save as attach.cmd:

@echo off
set MSYSBASH=C:\msys64\usr\bin\bash.exe
%MSYSBASH% -lc "tmux -L cc has-session -t main 2>/dev/null || tmux -L cc new-session -d -s main -c /c/Projects '/usr/bin/winpty /c/Progra~1/PowerShell/7/pwsh.exe -NoLogo -NoExit -WorkingDirectory C:/Projects -Command claude'; exec winpty /usr/bin/tmux -L cc attach -t main"

Run it:

attach.cmd

WSL Version

Save as attach.sh in your WSL home:

#!/bin/bash
SESSION=main
WORKDIR=/mnt/c/Projects
CMD="zsh -lic claude"

tmux has-session -t "$SESSION" 2>/dev/null || tmux new-session -d -s "$SESSION" -c "$WORKDIR" "$CMD"
tmux attach -t "$SESSION"

Make executable:

chmod +x attach.sh

Run it:

./attach.sh

5. Connecting from Mobile or Another PC

Once the above is set up:

  1. Install an SSH client on your phone or PC (Termius, Blink Shell, etc.).

  2. Connect using the playit.gg public IP:

    ssh yourusername@PUBLIC_IP_FROM_PLAYITGG
  3. Run:

    attach
  4. You will be in the same Claude Code session as on your main PC.


You can now code with Claude remotely from anywhere!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment