Docker-based setup that runs Claude Code with --dangerously-skip-permissions and exposes it via a web terminal (ttyd) accessible only over your private Tailscale network. Open http://<tailscale-ip>:7681 on your phone to monitor and interact with Claude Code sessions.
- Docker and Docker Compose
- Tailscale installed and connected on both your host machine and phone
- Claude Code auth (run
claude loginon the host — token is persisted via~/.claudebind mount)
cp .env.example .env
# Edit .env: set TAILSCALE_IP, PROJECT_DIR, TTYD_PASS
vim .env
chmod +x run.sh stop.sh
./run.sh- Make sure your phone is on the same Tailnet
- Open
http://<tailscale-ip>:7681in mobile Safari or Chrome - Enter the basic auth credentials (default:
claude/changeme) - You're in a tmux session running Claude Code
Claude runs inside tmux. If you close the browser tab or lose connection, the session keeps running. Just reconnect to the same URL and you'll reattach to the live session.
To attach locally from the host:
docker exec -it claude-remote tmux attach -t claude- Network level: ttyd port is bound to your Tailscale IP only — not reachable from the public internet or local network
- Application level: ttyd basic auth (username/password)
- Change the default password in
.envbefore running
| Variable | Default | Description |
|---|---|---|
ANTHROPIC_API_KEY |
(none) | Optional — only needed if not using claude login |
TAILSCALE_IP |
(auto-detected) | Your machine's Tailscale IPv4 address |
PROJECT_DIR |
. |
Absolute path to the project directory to mount |
TTYD_USER |
claude |
Basic auth username |
TTYD_PASS |
changeme |
Basic auth password |
SESSION_NAME |
claude |
tmux session name (for running multiple instances) |
Run multiple containers for different projects by using different session names and ports. Create separate compose files or override the port and session name per instance.
- Tailscale inside the container — container joins the Tailnet directly, ttyd listens on localhost only
- HTTPS via Tailscale certs —
tailscale cert+ ttyd--sslflags - Push notifications — webhook when Claude finishes a task or errors
- Read-only observer mode — remove ttyd
-Wflag for watch-only access - Project-specific toolchains — extend the Dockerfile with Rust, clang, cmake, etc.