Desired state on the operator machine
Servers, users, quotas, and deploy metadata live under ~/.ovpn. Deploy renders that state into the remote runtime.
Deploy Xray servers, issue client access, check the runtime, and recover from backups with a local Go CLI. State stays local and deployments go over SSH. Source-available under a non-commercial license.
~/.ovpn stores servers, users, quotas, and deploy metadata.
/opt/ovpn.
Download the CLI, deploy a server, create a user, and import the link or QR code into a client.
Choose an archive from the latest release for Linux or macOS, on Intel/AMD 64-bit or ARM64. Extract it and open a terminal in that directory. Release binaries include the Linux runtime assets; Go and Docker are not required on your workstation.
Use a clean Debian 12+ or Ubuntu 22.04+ host, a domain that resolves to it, and SSH key access. Port 443/tcp must be free and allowed through the host and provider firewalls.
Connect once with ssh -i <ssh-private-key> root@<server-ip> and verify the host key. Replace all placeholders in the commands, including the SSH private key path.
Run the commands shown here. server init installs Docker/Compose if needed and performs the first runtime deployment. Use deploy for later runtime changes. On an existing installation, user add provisions the user across all enabled servers.
Import the personal VLESS link or terminal QR code, connect, and load an HTTPS page while checking the client's traffic counter. The client guide has platform-specific instructions. Treat the link and QR code as credentials.
doctor checks the server runtime; a successful request through the client confirms the client path. See the full quick start for download choices and troubleshooting, and the Ansible bootstrap for production host hardening.
./ovpn version
./ovpn server add \
--name <server> \
--host <server-ip> \
--domain <domain> \
--ssh-user root \
--ssh-port 22 \
--ssh-identity <ssh-private-key>
./ovpn server init <server>
./ovpn doctor <server>
./ovpn user add --username <user>
./ovpn user link \
--server <server> \
--username <user>
ovpn is built around files, SSH access, and reproducible deploys. The public repository contains the tool and templates; real inventory, hostnames, tokens, keys, and local state stay outside it.
Servers, users, quotas, and deploy metadata live under ~/.ovpn. Deploy renders that state into the remote runtime.
The operator uses one CLI. Release builds embed Linux runtime assets for ovpn-agent and the Telegram bot.
Xray, the agent, monitoring, optional proxy, and backups are kept under /opt/ovpn for predictable maintenance.
User add/remove/enable/disable, expiry, and quota commands can apply to all enabled VPN hosts by default.
The minimal Xray profile blocks BitTorrent and public tracker domains. Ansible can add host-level Tor exit filtering.
doctor, status, logs, backup, restore, cleanup, monitoring, and release smoke checks are first-class workflows.
Operations start from the operator machine. VPN hosts receive rendered Compose bundles. Clients connect directly to one or more VPN hosts, or through an optional HA entrypoint.
local control / remote runtime
~/.ovpn stores desired state and metadata. Private operational data stays local.
/opt/ovpn contains Docker Compose, Xray on 443/tcp, ovpn-agent, config, and snapshots.
443/tcp endpoint.
ovpn; embedded runtime assets are materialized during deploy.The CLI is the operator surface for initial bootstrap, normal deploys, user lifecycle, quotas, monitoring, and recovery.
server init and deploy render desired state and apply it through SSH/SCP.user add, user rm, quota-set, and expiry commands mirror users across enabled servers.doctor, status, logs, backups, restore, cleanup, and monitoring are built-in workflows.Documentation links open in the GitHub Pages renderer so Markdown files remain readable outside GitHub.
Follow development notes on X, or support maintenance through the donation page.