Server lifecycle
Add servers, initialize hosts, deploy runtime config, check status, inspect logs, run doctor checks, and clean up old runtime safely.
ovpn is a Go CLI and agent system for operating self-hosted Xray servers over SSH. It keeps the public surface small, manages runtime state locally, and deploys Docker Compose services on your own hosts.
The public repository focuses on the operator CLI, runtime agent, host bootstrap guidance, monitoring definitions, and release automation. Real production inventory and secrets are intentionally kept outside the repo.
Add servers, initialize hosts, deploy runtime config, check status, inspect logs, run doctor checks, and clean up old runtime safely.
Create users, generate VLESS links, mirror users across enabled servers, set expiry dates, and enforce rolling 30 day quota limits.
Add proxy entrypoints in front of existing VPN backends with split routing, local HAProxy failover, and country-specific presets.
Create local and remote archives, keep automatic retention, and restore server runtime state when operational recovery is needed.
Ansible prepares the host baseline and security posture. ovpn owns Xray runtime rendering, deploys the Compose stack, manages users, and exposes optional operational monitoring.
The recommended production model exposes Xray on 443/tcp and SSH on 22/tcp. Internal agent and monitoring endpoints stay private.
The default minimal profile blocks BitTorrent and public tracker categories and uses threat DNS resolvers unless explicitly disabled.
go build -o ovpn ./cmd/ovpn
./ovpn version
./ovpn server add \
--name <server> \
--host <server-ip> \
--domain <domain> \
--ssh-user root \
--ssh-port 22
./ovpn server init <server>
./ovpn deploy <server>
./ovpn doctor <server>
Start with the README for operator setup. The docs below cover client onboarding, monitoring, high availability, security, CI, testing, and upgrades.
Donations help fund bug fixes, documentation, release work, and operator tooling for the project.