Fast Docker container with OpenVPN Server living inside.
10K+
Fast Docker container with OpenVPN Server living inside.
Forked from d3vilh/openvpn-server with security hardening, updated dependencies, and improved Docker configuration.
git clone https://github.com/ozon08/openvpn-server
cd openvpn-server
cp .env.example .env # add your admin credentials
docker compose up -d
| Variable | Description |
|---|---|
TRUST_SUB | Trusted subnet — full access to home network and internet (default: 10.0.70.0/24) |
GUEST_SUB | Guest subnet — internet only, no access to home network (default: 10.0.71.0/24) |
HOME_SUB | Your home/private subnet (default: 192.168.88.0/24) |
OPENVPN_MI_GID | Group with access to the management socket, same value on both services (default: 61194) |
Admin credentials (OPENVPN_ADMIN_USERNAME, OPENVPN_ADMIN_PASSWORD) are stored in a .env file — never hardcoded in docker-compose.yml.
| Path | Description |
|---|---|
./pki | PKI certificates and keys |
./clients | Generated .ovpn client profiles |
./config | EasyRSA vars and client config template |
./staticclients | Static IP assignments per client |
./log | OpenVPN log files |
./server.conf | OpenVPN server configuration |
./run | Management socket, shared with OpenVPN UI |
privileged: true removed from the openvpn container — Docker's default seccomp/AppArmor profiles are active, restricting dangerous syscalls (defense-in-depth vs. CVE-2026-31431 / Copy Fail and similar kernel LPEs)tls-auth enforced server-side — packets without valid HMAC are droppedprivileged mode for either container.env, excluded from Git| Tag | Description |
|---|---|
latest, 0.6.x | Releases for amd64, arm64 and arm/v7, built from a Git tag |
dev | Current main branch for amd64, not for production |
| Port | Protocol | Description |
|---|---|---|
1194 | UDP | OpenVPN |
8080 | TCP | OpenVPN UI (optional) |
Content type
Image
Digest
sha256:8a34f301c…
Size
11.1 MB
Last updated
4 months ago
docker pull ozon08/openvpn-server