1.5 KiB
1.5 KiB
Node
Agent that runs on each VPN server. Connects to Core, receives protocol configuration, manages the xray process, and reports traffic statistics.
Configuration
Edit the environment variables in docker-compose.node.yml:
| Variable | Required | Description |
|---|---|---|
CORE_URL |
Yes | URL of the Core service (e.g. http://your-core-server:3000) |
REGISTRATION_CODE |
Once | One-time code generated in admin panel → Nodes |
HEARTBEAT_INTERVAL_SEC |
No | Heartbeat interval in seconds (default: 30) |
Data directory is /var/lib/vpnnode and mounted as a Docker volume — all state (auth key, VPN configs, binaries) persists across container restarts automatically.
Registration
- In the admin panel, open Nodes and generate a registration code.
- Set
CORE_URLandREGISTRATION_CODEindocker-compose.node.yml. - Run
docker compose -f docker-compose.node.yml up -d. - Once the node appears as online in the panel, remove the
REGISTRATION_CODEline.
Behaviour
- Sends a heartbeat to Core every 30 seconds; if Core reports a newer config revision, the node pulls it immediately.
- Core can also trigger an instant config pull by calling the node directly (e.g. on admin-initiated sync).
- Reports per-subscription traffic to Core every minute.
- On first start, automatically installs the latest xray release if not present.
- Updates GeoIP/Geosite files automatically every 12 hours.