Panel Installation
Step-by-step guide to installing the V2RayTun panel with Docker, Caddy auto-TLS, and all supporting services.
Requirements
| Resource | Minimum |
|---|---|
| CPU | 1 vCPU |
| RAM | 1 GB |
| Disk | 10 GB |
| OS | Ubuntu 22.04+ / Debian 12+ |
| Docker | 24.0+ with Compose V2 |
| Domains | 2 (panel + subscription) |
Both domains must have A records pointing to the server's public IP before you begin.
Install Script
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
v2raytunsetup install-panelOr run non-interactively:
V2RAYTUN_PANEL_DOMAIN=panel.example.com \
V2RAYTUN_SUB_DOMAIN=sub.example.com \
v2raytunsetup install-panelEnvironment Variables
| Variable | Description |
|---|---|
V2RAYTUN_PANEL_DOMAIN | FQDN for the panel UI |
V2RAYTUN_SUB_DOMAIN | FQDN for the subscription endpoint |
Docker Services
The installer creates a docker-compose.yml with the following services:
| Service | Image | Role |
|---|---|---|
| postgres | postgres:16-alpine | Primary database |
| redis | redis:7-alpine | Caching and session store |
| rabbitmq | rabbitmq:3-management | Message broker for node communication |
| backend | v2raytun/backend | REST API and business logic |
| frontend | v2raytun/frontend | Next.js web dashboard |
| caddy | caddy:2-alpine | Reverse 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
docker compose psAll 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
/opt/v2raytun/
├── docker-compose.yml
├── .env
├── caddy/
│ └── Caddyfile
├── data/
│ ├── postgres/
│ └── redis/
└── certs/
├── ca.crt
├── panel.crt
└── panel.keyNext Steps
- Node Installation — connect your first proxy node.
- System Requirements — full hardware and software prerequisites.