OpenVPN server in a Docker container complete with an EasyRSA PKI CA.
Dockerfile and config forked from a no longer maintained kylemanna/docker-openvpn GitHub repo.
- Docker Registry: lisenet/openvpn
- GitHub: lisenet/docker-openvpn
- OpenVPN: OpenVPN/openvpn
Note that iptables-legacy is no longer supported by this repository.
There are three Docker tags used for every new container image build using GitHub workflows:
- ${OPENVPN_VERSION}
- ${OPENVPN_VERSION}-build${BUILD_ID}
- latest
Each build includes the OpenVPN version tag that the image was built with, e.g. 2.6.6. This image, however, gets updated with every pull request, meaning that it's still a moving target for a given version of OpenVPN.
In order to preserve builds across pulls requests, each release also includes a build ID, e.g. 2.6.6-build12, which does not get overwritten. If you want to use a specific version of the OpenVPN image that does not change, use this tag.
Finally, each new build updates the latest tag, meaning that if you want to use the latest version of the OpenVPN image including all latest code changes, then you should use this tag.
docker build --pull --no-cache -t lisenet/openvpn:latest .The following deployment methods are supported and tested:
- Kubernetes: see docs/kubernetes-deployment.md.
- Docker Compose: see docs/docker-compose.md.
If you would like to contribute and provide instructions for other deployment methods (e.g. Podman, Docker engine, Swarm etc), please consider raising a pull request.
- OpenVPN server deployment:
- Kubernetes 1.28 on Rocky 9 (QEMU/KVM).
- Kubernetes 1.26 on Rocky 8 (QEMU/KVM).
- Docker Engine 29.5.3 with Docker Compose plugin 5.1.4 on Ubuntu 24.04 (VMware).
- Clients:
- Android App OpenVPN Connect 3.3.4 (9290).
- OpenVPN 2.5.9 on Rocky 9.
- OpenVPN 2.4.12 on Rocky 8.
- OpenVPN 2.4.7 on Debian 10.
- OpenVPN 2.5.5 on Ubuntu 22.04 LTS.
- OpenVPN 2.4.7 on Ubuntu 20.04 LTS.
- OpenVPN Connect 3.8.1 on macOS 15.7.4.