Architecture
A self-hosted Private Connect deployment consists of three core components:Components
Web UI
Nuxt-based dashboard for managing workspaces, agents, and services
API Hub
NestJS backend handling authentication, tunneling, and orchestration
PostgreSQL
Primary database storing users, workspaces, agents, and tunnels
System Requirements
Minimum Requirements
- OS: Linux (Ubuntu 20.04+, Debian 11+) or macOS
- CPU: 2 cores
- RAM: 4 GB
- Storage: 20 GB SSD
- Node.js: v18.0.0 or higher
- Database: PostgreSQL 16+
Production Requirements
- CPU: 4+ cores
- RAM: 8+ GB
- Storage: 50+ GB SSD
- Network: Static IP or domain name
- SSL: Valid TLS certificate (recommended)
Deployment Options
Docker Compose
Easiest way to get started with all components containerized
From Source
Build and run components manually for maximum control
Port Requirements
Ensure the following ports are available:| Port Range | Component | Purpose |
|---|---|---|
3000 | Web UI | Dashboard access |
3001 | API Hub | Agent connections & API |
5432 | PostgreSQL | Database (internal) |
23000-23100 | API Hub | Tunnel port range |
The tunnel port range (
23000-23100) is used for establishing connections between agents. You can configure this range based on your expected concurrent tunnels.Environment Variables
API Hub Configuration
The API hub requires these environment variables:Web UI Configuration
Agent Configuration
Agents connect to your self-hosted hub:Database Schema
Private Connect uses Prisma ORM with PostgreSQL. The schema includes:- Users & Authentication: User accounts, magic links, sessions
- Workspaces: Multi-tenant organization structure
- Agents: Connected machines running the agent
- Services: Exposed and reachable services
- Tunnels: Active tunnel connections
- Diagnostics: Service health checks and monitoring
- Audit Logs: Security and usage tracking
Security Considerations
Next Steps
Deploy with Docker
Quick start with Docker Compose
Build from Source
Manual setup for advanced configurations