relay

Documentation

Getting started

Install the relay CLI, authenticate with your token, and expose a local port to the internet. Most flows take under a minute.

Install

Choose the path that matches your setup. Homebrew is the quickest on macOS.

One-liner — taps the repo and installs the formula:

sh
brew tap afomera/relay https://github.com/afomera/relay.git && brew install relay

Verify the install:

sh
relay --version

Authenticate

Run relay auth login and relay opens your browser to the dashboard, where you sign in and authorize the CLI. Once you approve, relay saves the token locally so relay http and friends just work.

sh
relay auth login

The token is written to config.toml in relay's config directory — ~/Library/Application Support/dev.withrelay.relay/ on macOS, ~/.config/relay/ on Linux, and the equivalent %APPDATA% path on Windows. You only need to do this once per machine.

On a headless box? Pass --no-browser to print the sign-in URL, or skip the handshake with relay auth login --token rly_pat_… or the RELAY_AUTH_TOKEN environment variable.

Start a tunnel

Once authenticated, point relay at any local port. Four common shapes:

HTTP on a generated hostname

The fastest path. Relay picks a memorable subdomain on the shared zone:

sh
relay http 3000
# → https://bright-otter.temporary.sharedwithrelay.com

Reserved wildcard hostname

Claim a stable name under your account's wildcard. Great for demos and webhooks:

sh
relay http 3000 --hostname api.andrea
# → https://api.andrea.sharedwithrelay.com

Custom domain

Bring your own domain. Point a CNAME at relay, and certificates are provisioned automatically:

sh
relay http 3000 --domain tunnel.mycompany.com

Raw TCP

For Postgres, Redis, SSH, or anything else that speaks TCP:

sh
relay tcp 5432
# → tcp.sharedwithrelay.com:29734

What's next

  • Explore the full CLI with relay --help.
  • Want to run your own control plane? See the self-hosting guide.
  • Read the spec for architecture and milestones.