List Active Tunnels
View all your currently active tunnels:If you have no active tunnels, the command displays:
No active tunnels.Stop a Tunnel
Stop an active tunnel using either its tunnel ID or hostname:Stopping a tunnel:
- Removes the DNS record
- Deletes the Cloudflare tunnel
- Makes the hostname available for reuse
Logout
Invalidate your session and clear stored credentials:- Revokes your access and refresh tokens on the server
- Clears locally stored credentials (from keytar or encrypted file storage)
- Requires you to log in again before creating new tunnels
Diagnostic Check
Verify your rs-tunnel installation and environment:What doctor Checks
Operating System
Verifies you’re on a supported platform:
macOS, Linux, or Windows
macOS, Linux, or Windows
API Connectivity
Tests connection to the configured API server
Shows the API URL being used
Shows the API URL being used
Authentication
Checks if you have a valid session
Shows the authenticated email
Shows the authenticated email
Cloudflared Binary
Verifies cloudflared is installed
Shows path and version
Shows path and version
Run
rs-tunnel doctor when troubleshooting connection issues or verifying your setup after installation.Tunnel Lifecycle
Active Tunnel States
Tunnels can be in the following states:- active: Tunnel is running and receiving heartbeats
- stale: Tunnel stopped sending heartbeats (will be cleaned up)
Heartbeat Mechanism
While a tunnel is running:- CLI sends heartbeat every 20 seconds (default)
- Server updates the tunnel’s last heartbeat timestamp
- If no heartbeat received for 60 seconds (default), tunnel is marked stale
- Reaper process cleans up stale tunnels every 30 seconds (default)
Quota Management
The server enforces a per-user tunnel quota (default: 5 active tunnels). Check your usage:Working with Multiple Tunnels
You can run multiple tunnels simultaneously (up to your quota):- Runs in its own CLI process
- Has its own dashboard
- Can be stopped independently
Self-Hosted Domain Override
All commands support the--domain flag for self-hosted deployments:
The
--domain flag is saved to ~/.rs-tunnel/config.json and applies to future commands. You only need to specify it once.Examples
Daily Workflow
Team Handoff
Troubleshooting
Next Steps
Configuration
Customize API domain and behavior
Troubleshooting
Solve common issues

