Skip to content
ResolveLabs Tunnel

CLI reference

Cheatsheet with every rl-tunnel command, subcommand and flag.

1 min read

A quick table to glance at and remember the commands. Run rl-tunnel --help for the full list in your installed version.

Tunnels

CommandWhat it does
rl-tunnel http 8080Creates a basic HTTP/HTTPS tunnel.
rl-tunnel http 3000 --subdomain my-appCreates a tunnel with a friendly, persistent URL (the name must be reserved in your account).
rl-tunnel tcp 5432Exposes local TCP connections (ideal for giving temporary access to your PostgreSQL to another dev). Needs an account.
rl-tunnel start --allStarts every tunnel defined in rl-tunnel.yml (or name them: start web api).
rl-tunnel inspect 12Shows the full request and response of entry #12 of the live log (--last for the most recent).
rl-tunnel replay 12Sends request #12 to your local app again (--last, --target 3001).
rl-tunnel --versionShows the installed version.
rl-tunnel --helpLists every parameter and configuration option available.

Flags for http and tcp

FlagDescription
--subdomain <name>Reserved subdomain, such as my-app.t.resolvelabs.com.br. http only.
--auth "user:pass"Requires Basic Auth before traffic reaches your machine. http only.
--allow-ip <ip|cidr>Only accepts traffic from this IP or range. Repeatable.
--host-header <host>Host sent to your app (default: the local target, such as localhost:3000). http only.
--preserve-hostSends your app the public host instead of the local one. http only.
--random-urlRandom URL even if you have a reserved subdomain. http only.
--no-bodyDoesn't capture request and response bodies in the inspector.
--log <file>Also writes every request to a file as JSON lines.
--debugPrints detailed connection logs.

Accounts

CommandWhat it does
rl-tunnel auth loginOpens the browser to link the CLI to your account (--no-browser to just print the URL).
rl-tunnel auth token <token>Saves an access token (CI and servers).
rl-tunnel auth logoutRemoves the credentials from this machine.
rl-tunnel whoamiShows the account in use and its reserved subdomains.
terminal
rl-tunnel whoami

Help

terminal
rl-tunnel --helprl-tunnel http --help