Skip to contentOutRay/Docs
GitHub ↗
Get started ↗
Documentation

Your services, from local to live.

OutRay documentation

Products

Tunnels

Getting started

InstallationAuthenticationOpening a Tunnel

Features

Reserved SubdomainsPassword ProtectionCustom DomainsTeams & OrganizationsCI/CD Integration

Integrations

Vite Plugin

Reference

TCP & UDP TunnelsCLI ReferenceArchitecture
Tunnels

Opening a Tunnel

Expose a local service, inspect traffic, and stop the connection.

Start your local application first and confirm it responds on its port. Then connect OutRay from a separate terminal:

outray login
outray 3000

outray http 3000 is the explicit form of the same command. Once connected, the CLI prints the assigned public URL. Use that URL for a preview, callback, or webhook destination.

The public URL is reachable by anyone who knows it. CLI authentication controls who opens a tunnel, not who visits it. Keep application authentication enabled and avoid exposing admin interfaces or sensitive data.

Choose an address

For repeatable callbacks, use a reserved subdomain:

outray 3000 --subdomain my-app

For a verified custom domain:

outray 3000 --domain preview.example.com

The CLI also supports password protection for HTTP requests on paid plans.

Inspect tunnel traffic

The terminal shows request method, path, status, and duration. Use --no-logs to hide local request lines; it does not disable server-side tunnel traffic records.

In the console, select your organization and open Tunnels at /<org-slug>/tunnel. Request details and any enabled full request capture belong to that tunnel workspace.

Tunnel traffic records show requests passing through the public endpoint. They are separate from Observability, which uses an SDK to collect application traces, logs, and metrics even without a tunnel.

Start multiple tunnels

Create outray/config.toml in your project:

[tunnel.web]
protocol = "http"
local_port = 3000

[tunnel.api]
protocol = "http"
local_port = 8000

[tunnel.database]
protocol = "tcp"
local_port = 5432

Validate and start the configuration:

outray validate-config
outray start

start uses your saved browser login. It does not accept the single-tunnel --key authentication workflow. See the CLI reference for supported fields and custom config paths.

Local network access

--local adds a .local address alongside the public HTTP tunnel. --local-only provides LAN access without a remote tunnel or OutRay login:

outray 3000 --local
outray 3000 --local-only --subdomain my-app

Devices must be on the same network and able to resolve mDNS. Follow the terminal's actual URLs: availability of local ports 80/443 and certificate trust affects the address you can use.

Stop or troubleshoot

Press Ctrl+C to stop the tunnel. The public endpoint no longer forwards to your application; a reserved address remains reserved.

If a request fails, check the local service first, then the CLI's connection and authentication messages. For raw socket services, choose TCP or UDP rather than an HTTP tunnel.

Authentication

Choose browser login or a scoped API token for the CLI.

Reserved Subdomains

Keep a stable address for previews, webhooks, and callbacks.

On this page

Choose an addressInspect tunnel trafficStart multiple tunnelsLocal network accessStop or troubleshoot