Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/outray-tunnel/outray/llms.txt

Use this file to discover all available pages before exploring further.

OutRay is fully open source under AGPL-3.0. You can run every component — the tunnel server, web dashboard, and background jobs — on your own hardware or cloud account.
OutRay is licensed under AGPL-3.0-only. If you distribute a modified version of OutRay (including running it as a network service), you must make the source code of your modifications available under the same license.

Why self-host?

  • Privacy — all tunnel traffic stays within your own infrastructure.
  • Control — configure port ranges, retention policies, and resource limits to match your environment.
  • No usage caps — you set the limits, not a pricing plan.
  • Open source — inspect and modify every part of the stack.

Architecture

A self-hosted OutRay deployment consists of four components:

Web dashboard

The React frontend and API server. Handles user accounts, organizations, tunnel management, and analytics queries. Backed by PostgreSQL.

Tunnel server

Proxies HTTP, TCP, and UDP traffic from public URLs to the connected CLI client. Uses Redis to track active tunnel state.

Cron jobs

Background service that snapshots active tunnel counts and performs analytics data cleanup based on per-organization retention policies.

CLI

The outray CLI your users install locally. Point it at your self-hosted server with the --dev flag or OUTRAY_SERVER_URL environment variable.

Infrastructure requirements

Before deploying, provision the following:
ServicePurposeMinimum version
Node.jsRuns all OutRay applications20+
PostgreSQLStores users, organizations, and tunnel records14+
RedisTracks live tunnel state and heartbeats6+
TimescaleDB (Tiger Data)Stores time-series analytics (request events, protocol events)2.x
TimescaleDB must be a separate database instance from your main PostgreSQL database. OutRay uses TIMESCALE_URL and DATABASE_URL as distinct connection strings.

High-level setup

1

Clone the repository

Pull the OutRay source from GitHub.
2

Install dependencies

Run npm install in the repository root and in each app you plan to run.
3

Configure environment variables

Copy .env.example to .env in each app directory and fill in your connection strings, secrets, and domain.
4

Run database migrations

Apply the Drizzle schema to PostgreSQL, then initialize the TimescaleDB hypertables using the provided SQL script.
5

Start services

Start the web dashboard, tunnel server, and cron job with your process manager of choice (e.g., PM2, systemd, Docker).
6

Point the CLI at your server

Configure the OutRay CLI to connect to your instance instead of the hosted service.
See the Deployment Guide for the full step-by-step walkthrough.

Build docs developers (and LLMs) love