Skip to content

Panel Installation

Step-by-step guide to installing the V2RayTun panel with Docker, Caddy auto-TLS, and all supporting services.

Requirements

ResourceMinimum
CPU1 vCPU
RAM1 GB
Disk10 GB
OSUbuntu 22.04+ / Debian 12+
Docker24.0+ with Compose V2
Domains2 (panel + subscription)

Both domains must have A records pointing to the server's public IP before you begin.

Install Script

Bash
bash <(curl -fsSL https://raw.githubusercontent.com/v2RayTun/install-panel/main/install.sh)

This downloads the v2raytunsetup CLI and places it in /usr/local/bin.

Run the Installer

Bash
v2raytunsetup install-panel

Or run non-interactively:

Bash
V2RAYTUN_PANEL_DOMAIN=panel.example.com \
V2RAYTUN_SUB_DOMAIN=sub.example.com \
v2raytunsetup install-panel

Environment Variables

VariableDescription
V2RAYTUN_PANEL_DOMAINFQDN for the panel UI
V2RAYTUN_SUB_DOMAINFQDN for the subscription endpoint

Docker Services

The installer creates a docker-compose.yml with the following services:

ServiceImageRole
postgrespostgres:16-alpinePrimary database
redisredis:7-alpineCaching and session store
rabbitmqrabbitmq:3-managementMessage broker for node communication
backendv2raytun/backendREST API and business logic
frontendv2raytun/frontendNext.js web dashboard
caddycaddy:2-alpineReverse proxy with automatic TLS

TLS with Caddy

Caddy automatically obtains Let's Encrypt certificates for both domains. No manual certificate management is required. Ensure ports 80 and 443 are open so the ACME challenge can complete.

Verify the Installation

Bash
docker compose ps

All six services should show a status of running. Open https://panel.example.com to access the dashboard and register the admin account at /register.

Directory Structure

Text
/opt/v2raytun/
├── docker-compose.yml
├── .env
├── caddy/
│   └── Caddyfile
├── data/
│   ├── postgres/
│   └── redis/
└── certs/
    ├── ca.crt
    ├── panel.crt
    └── panel.key

Next Steps