Complete guide to set up claude-wormhole — access Claude Code sessions from any device over a private Tailscale network.
Phone (Safari PWA / SSH)
│
│ Tailscale private network
│
Mac (tmux + Claude Code + web server)
The fastest path — handles prerequisites check, build, CLI setup, and hooks:
./install.shThis will:
- Check prerequisites (tmux, node, jq, claude)
npm install+npm run build- Symlink
wormholeto/usr/local/bin/wormhole - Set up tmux config
- Configure Claude Code notification hooks
- Enable Tailscale serve
- Add
cldshell alias
After install, verify with wormhole status.
If you prefer to set things up step by step:
brew install tmux # terminal multiplexer
brew install joshmedeski/sesh/sesh # smart tmux session manager
brew install node # Node.js (v20+)
npm install -g @anthropic-ai/claude-code # Claude Code CLI
# tmux plugin manager (for session persistence)
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm- Install:
brew install --cask tailscale(or Mac App Store) - Open Tailscale and sign in
- Enable incoming connections — Tailscale menu bar > Settings > "Allow incoming connections" ON
- Without this, your phone can't reach the Mac (see Troubleshooting)
- Install Tailscale and sign in with the same account
- Verify both devices appear in your Tailscale admin console
- Test connectivity: find your Mac's IP with
tailscale ip -4
Copy the included config or merge with your existing ~/.tmux.conf:
cp scripts/tmux.conf ~/.tmux.conf
tmux # start tmux, then press prefix + I to install pluginsIncludes tmux-resurrect (save/restore sessions) and tmux-continuum (auto-save every 15 min).
After running install.sh, cld is available as a shell alias for wormhole cld:
cd ~/projects/my-app
cld # auto-detects "my-app" as session name
cld -- --model opus # pass extra args to claudeOr set it up manually:
# Add to ~/.zshrc
alias cld="wormhole cld"
source ~/.zshrcwormhole start # build-if-needed + start server
# or for development:
npm run dev # port 3100tailscale serve --bg 3100 # serve over HTTPS
# Available at: https://your-machine.tailnet.ts.net/
tailscale serve --bg off # stop servingAuto-start on login with crash recovery via macOS launchd:
wormhole service install # build + enable tailscale serve + load agent
wormhole service status # check if running
wormhole service logs # tail stdout + stderr
wormhole service restart # stop + start
wormhole service uninstall # remove agentLogs: /tmp/claude-wormhole.log and /tmp/claude-wormhole.err
Get notified when Claude needs input or finishes a task — even when the PWA isn't open.
wormhole setup push https://your-machine.tailnet.ts.net
wormhole restartThen open the PWA on your phone and tap Enable on the notification banner.
The install.sh script configures these automatically. For manual setup, add to ~/.claude/settings.json:
{
"hooks": {
"Notification": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "/path/to/claude-wormhole/bin/wormhole notify",
"timeout": 10
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "/path/to/claude-wormhole/bin/wormhole notify",
"timeout": 10
}
]
}
]
}
}The hook defaults to http://localhost:3100. Set CLAUDE_WORMHOLE_URL to override.
Test:
curl -X POST http://localhost:3100/api/notify \
-H "Content-Type: application/json" \
-d '{"type": "idle", "message": "Test notification", "session": "my-session"}'- Open Safari > your Tailscale serve URL
- Tap Share > Add to Home Screen
- Name it (e.g., "wormhole") and tap Add
Runs in standalone mode with no browser chrome, dark theme optimized for terminal use.
If the web UI is down, use SSH via Tailscale:
- Mac: System Settings > General > Sharing > Remote Login > ON
- iOS: Install Terminus, connect to your Mac's Tailscale IP
tmux attach -t my-app
| What | Command |
|---|---|
| Start Claude session | cd ~/projects/my-app && cld |
| Start web server | wormhole start |
| Restart server | wormhole restart |
| Check health | wormhole status |
| Tailscale serve | tailscale serve --bg 3100 |
| Stop Tailscale serve | tailscale serve --bg off |
| Setup push notifications | wormhole setup push <your-url> |
| List tmux sessions | tmux ls |
| Mac Tailscale IP | tailscale ip -4 |
Phone can't reach Mac over Tailscale
- Check "Allow incoming connections" is ON in Tailscale settings on Mac
- Verify both devices are on the same network:
tailscale status - macOS firewall (pf rules) won't help — you need Tailscale's own setting
Terminal doesn't connect
- A tmux session must exist first:
tmux ls - The web app attaches to existing sessions, it doesn't create them
wormhole not found
- Run
install.shagain, or manually:sudo ln -sf /path/to/claude-wormhole/bin/wormhole /usr/local/bin/wormhole
cld not found
- Ensure the alias is in
~/.zshrcand you've runsource ~/.zshrc - Or run directly:
wormhole cld
tmux plugins not loading
- Run
prefix + Iinside tmux to install via TPM - Check TPM is cloned:
ls ~/.tmux/plugins/tpm