Tunnels
A tunnel is a public link to your Varin, so you can reach it from an ordinary browser on another network. Use varin tunnel to create one for a running instance.
Connecting your own devices (the mobile app, another desktop) usually doesn’t need a tunnel — pair them instead and let the end-to-end encrypted Private Relay handle away-from-home access once the server has a relay configured (
VARIN_RELAY_URL).
Prerequisites
Section titled “Prerequisites”Varin starts the tunnel provider CLI on your machine. Install the provider you want to use first:
brew install cloudflaredbrew install ngrokCloudflare quick tunnels can run with cloudflared. Ngrok requires an ngrok account and an authtoken from the ngrok dashboard:
ngrok config add-authtoken <your-ngrok-token>Quick start
Section titled “Quick start”- Start Varin:
varinIf you skip this step, varin tunnel start can auto-start a CLI server. When auto-starting, you can pass server options such as --port, --host, --lan, --ui-password, and --api-only.
- Start a Cloudflare tunnel:
varin tunnel start --provider cloudflare --mode quickOr start an Ngrok tunnel:
varin tunnel start --provider ngrok --mode quick- Check status:
varin tunnel statusWhen the tunnel is up, status shows a public URL. Open it, or scan the QR code, to reach Varin from anywhere.
By default, Varin prints a QR code in interactive TTY sessions. Use --qr to force QR output, or --no-qr to disable it.
Providers
Section titled “Providers”cloudflare: quick, managed remote, and managed local modesngrok: quick mode
Managed modes
Section titled “Managed modes”Managed remote
Section titled “Managed remote”Use a token + hostname managed by Cloudflare:
varin tunnel start --provider cloudflare --mode managed-remote --token-file ~/.secrets/cf-token --hostname app.example.comManaged local
Section titled “Managed local”Use a local cloudflared config:
varin tunnel start --provider cloudflare --mode managed-local --config ~/.cloudflared/config.ymlProfiles (managed-remote)
Section titled “Profiles (managed-remote)”Save a reusable profile:
varin tunnel profile add --provider cloudflare --mode managed-remote --name prod-main --hostname app.example.com --token-file ~/.secrets/cf-tokenStart using the saved profile:
varin tunnel start --profile prod-mainUseful commands
Section titled “Useful commands”varin tunnel providersvarin tunnel ready --provider cloudflarevarin tunnel ready --provider ngrokvarin tunnel doctor --provider cloudflarevarin tunnel doctor --provider ngrokvarin tunnel stop --port 3000Behavior notes
Section titled “Behavior notes”- one active tunnel per Varin instance (port)
- starting a new mode/provider on same instance replaces previous tunnel
- generating a new connect link revokes previous unused one
- tunnel auto-start preserves server flags like
--ui-passwordand--api-onlyin the instance settings used by restart/update flows
Related
Section titled “Related”- Connect a Device — pair your own devices without a public URL
- Security — protect the UI before exposing it
- Desktop Tunnels — desktop app tunnel setup without CLI startup
- PWA & Mobile — reach Varin from your phone
- Troubleshooting — if the tunnel link doesn’t work