Server
Server Setup
Guide to setting up portr server
Prerequisites
Before setting up your Portr server, ensure you have:
- A virtual machine with Docker installed (Hetzner 4GB 2 vCPU is recommended and cost-effective)
- DNS records configured for your domain
- Cloudflare API token for wildcard subdomain SSL setup (or Route53)
- GitHub OAuth app credentials for admin dashboard login (optional)
- Required ports open on the server
DNS Configuration
Configure the following DNS records for your domain:
Type | Name | Value |
---|---|---|
A | @ | your-server-ipv4 |
A | * | your-server-ipv4 |
Port Requirements
- Port 2222: Open for incoming SSH connections
- Port range 30001-40001: Open for incoming TCP connections (required for TCP tunnels)
Quick Setup Guides
Deploy with Docker
Use Docker Compose to quickly deploy Portr server.
Cloudflare API Token
Set up Cloudflare API token for SSL certificates.
GitHub OAuth App
Configure GitHub OAuth for admin dashboard login.
Server Components
The Portr server consists of several components:
- Admin Server: Web dashboard for managing tunnels and teams
- Tunnel Server: Handles tunnel connections and routing
- Reverse Proxy: Routes traffic and handles SSL termination
- Database: Stores user data, teams, and tunnel configurations
The complete setup uses Docker Compose to orchestrate all these components together.