Skip to main content
tunnelbyte [region] [-- <cmd>...] [flags]
tunnelbyte <command> [flags]

Commands

CommandPurpose
tunnelbyte [region]Bring up a tunnel. The primary command.
tunnelbyte regionsList exit regions.
tunnelbyte signupUpgrade anonymous → free account.
tunnelbyte loginLink this device to an existing account.
tunnelbyte logoutDelete the cached token.
tunnelbyte tokenPrint the cached API token (for $(...) substitution).
tunnelbyte upgradeAdd a card; go paid.
tunnelbyte billingOpen the billing portal.
tunnelbyte versionPrint version info.

Global flags

FlagDefaultPurpose
--region(auto)Override the region (skips persistence).
--alloffSystem-wide routing (one-time sudo prompt). See routing modes.
-v, --verboseoffVerbose output.
-h, --helpHelp for any command.
There’s also --api-url (or TUNNELBYTE_API_URL) for pointing the CLI at a non-default API host. Useful for self-hosting or local dev only. Run tunnelbyte --help for the canonical list.

Where state lives

Layout follows platform conventions:
OSPath
Linux$XDG_CONFIG_HOME/tunnelbyte/ (fallback ~/.config/tunnelbyte/)
macOS~/Library/Application Support/tunnelbyte/
Inside:
  • token - bearer token (anonymous device-bound or account-linked).
  • region - last successful auto-pick. Delete to re-geolocate.
  • tier - last-seen tier; drives the “tier changed” banner on upgrade.
  • browser-profiles/<app>/<region>/ - per-(browser, region) Chromium user-data-dir. Created on first launch of tunnelbyte fsn -- brave and friends. Logins / bookmarks / extensions persist there across re-runs.
The directory is mode 0700; individual files are 0600. Deleting any of them is harmless - the next invocation rebuilds.

Exit codes

CodeMeaning
0Tunnel torn down cleanly (Ctrl-C, server expired, etc.).
1Generic error. See stderr.
2Quota exhausted at session create. The error payload shows the breakdown (tier, bytes_used, session_seconds, resets_at). See tiers.
3Session was terminated by the server while running (quota hit mid-session, idle handshake timeout, or 30-day safety ceiling). The reason prints to stderr; see the Status response for the taxonomy.
otherThe wrapped child’s own exit code is propagated when you use the -- <cmd> form.