tunk start <name> # Start a tunnel
tunk stop <name> # Stop a tunnel
tunk restart <name> # Restart a tunnel
tunk status <name> # Show tunnel status
tunk list # List all tunnels
tunk reload # Reload configurations from disktunk start web
# ✓ Tunnel startedThe tunnel starts running in the daemon process. The daemon handles:
- Spawning the SSH process
- Monitoring its health
- Auto-restarting on failure (if configured)
tunk stop web
# ✓ Tunnel stoppedGraceful shutdown with timeout (3 seconds), then force-killed.
tunk status web
# Tunnel Status
# Name: web
# Running: yestunk list
# Configured Tunnels
# web running
# api stoppedReload tunnels and backends from disk without restarting the daemon:
tunk reload
# ✓ Daemon configuration reloadedUseful when adding/editing tunnel configs.
| Variable | Default | Description |
|---|---|---|
TUNK_SOCK_PATH |
/tmp/tunk.sock |
Daemon socket path |
Send Ctrl+C to the daemon to gracefully shutdown all tunnels:
# Find daemon PID
pgrep tunkd
# Send Ctrl+C equivalent
kill -INT $(pgrep tunkd)The daemon will:
- Stop accepting new connections
- Signal all tunnel managers to shutdown
- Wait up to 5 seconds for graceful shutdown per tunnel
- Force-kill any remaining tunnels