Server Quick Start
Get a server running in under 10 minutes.
Prerequisites
Section titled “Prerequisites”- A machine with a public IP address (Linux, macOS, or FreeBSD)
- Port 443 open in your firewall/security group
- Root or sudo access
1. Install
Section titled “1. Install”The universal installer handles everything:
curl -fsSL https://assets.rvpn.org/install.sh | sudo bash -s -- --setup --serverIt will auto-detect your platform, download the correct binary, verify the checksum, and walk you through server configuration (keys, TLS, TUN mode, etc.).
Or manually:
# Linux x86_64 (most VPS)curl -LO https://assets.rvpn.org/1.3.1/rvpn-server-x86_64-linux-gnuchmod +x rvpn-server-x86_64-linux-gnusudo mv rvpn-server-x86_64-linux-gnu /usr/local/bin/rvpn-server
# Linux ARM64curl -LO https://assets.rvpn.org/1.3.1/rvpn-server-aarch64-linux-gnuchmod +x rvpn-server-aarch64-linux-gnusudo mv rvpn-server-aarch64-linux-gnu /usr/local/bin/rvpn-server
# FreeBSDfetch https://assets.rvpn.org/1.3.1/rvpn-server-x86_64-freebsdchmod +x rvpn-server-x86_64-freebsdsudo mv rvpn-server-x86_64-freebsd /usr/local/bin/rvpn-serverSee Server Installation for all available binaries and checksum verification.
Verify it works:
rvpn-server --help2. Generate Server Keys
Section titled “2. Generate Server Keys”Both commands write to the paths configured in server.toml. Point them at /etc/rvpn/ by creating a minimal config first, then run:
sudo mkdir -p /etc/rvpnsudo tee /etc/rvpn/server.toml <<'EOF' >/dev/null[server]identity_key_file = "/etc/rvpn/server_identity.key"prekey_bundle_file = "/etc/rvpn/prekey-bundle.json"EOF
sudo rvpn-server -c /etc/rvpn/server.toml keygensudo rvpn-server -c /etc/rvpn/server.toml prekey-bundleThis creates three files under /etc/rvpn/:
| File | Purpose |
|---|---|
server_identity.key | Server’s long-term Ed25519 identity key — keep private |
prekey-bundle.json | Public prekey bundle — distribute to clients |
prekey-bundle.private.json | Private prekey material — keep private |
Without the -c flag both commands write to the current working directory (server_identity.key / prekey-bundle.json), which is fine for testing but easy to lose track of.
Important: Keep
server_identity.keyandprekey-bundle.private.jsonsecure. Back them up. If lost, clients will need a new prekey bundle.
3. Enable automatic TLS
Section titled “3. Enable automatic TLS”rvpn-server can obtain and renew a Let’s Encrypt certificate itself using the TLS-ALPN-01 challenge. Same :443 listener, no :80 port, no certbot, no external timer — the state machine lives inside the server process.
Append this to /etc/rvpn/server.toml:
[server.acme]enabled = truedomains = ["your-domain.com"]cache_dir = "/var/lib/rvpn/acme"Then create the cache directory (it needs to survive restarts so you don’t burn Let’s Encrypt rate limits on every reboot):
sudo mkdir -p /var/lib/rvpn/acmesudo chmod 700 /var/lib/rvpn/acmePrerequisites — check before you enable this:
your-domain.commust resolve (A/AAAA) to this server’s public IP.- Inbound TCP
:443must be reachable from Let’s Encrypt’s validators. - Nothing else may be bound to
:443(the challenge shares the listener).
First time? Set staging = true in [server.acme] on the first run to test the whole chain against Let’s Encrypt’s rate-limit-free staging environment. If the logs show ACME event: CertCacheStore, flip to staging = false and use a fresh cache_dir for production. See reference → [server.acme] for the full workflow, the three LE rate limits that matter, and the renewal cadence.
Prefer to bring your own cert — e.g. from an existing certbot workflow or a reverse proxy — instead? Skip this section and set tls_cert_file / tls_key_file in [server] as documented in reference → server-config. ACME and static certs are mutually exclusive; the server refuses to start if both are set.
4. Enable IP Forwarding
Section titled “4. Enable IP Forwarding”rVPN needs IP forwarding to route traffic on behalf of clients:
echo "net.ipv4.ip_forward = 1" | sudo tee -a /etc/sysctl.confsudo sysctl -p5. Start the Server
Section titled “5. Start the Server”sudo rvpn-server -c /etc/rvpn/server.tomlYou should see output like:
INFO Starting rVPN Server on 0.0.0.0:443INFO Server listening on wss://0.0.0.0:443INFO WebSocket endpoint: /api/v1/wsINFO WebSocket endpoint (desktop SOCKS): /api/v1/wsINFO WebSocket endpoint (mobile TUN): /api/v1/ws/tunINFO WebSocket endpoint (DNS proxy): /api/v1/ws/dnsINFO WebSocket endpoint (SOCKS5 mux): /api/v1/ws/muxOnce confirmed working, set it up as a systemd service to run on boot.
6. Distribute the Prekey Bundle
Section titled “6. Distribute the Prekey Bundle”Clients need prekey-bundle.json to connect. Send it to your users securely (encrypted email, secure messenger, etc.) — this file is public and does not need to be kept secret, but it must be the real file from your server.
Next Steps
Section titled “Next Steps”- Run as a systemd service
- Reverse proxy setup — Caddy, nginx, HAProxy, decoy site
- Full server configuration options
- TUN mode — full-tunnel VPN with NAT
- Use case scenarios — practical guides for common deployments
- Troubleshooting — solutions for common problems