hwdsl2/docker-openvpn — 37★ trên GitHub (Shell). Docker image to run an OpenVPN server with automatic PKI setup and client config generation. Managed via a helper script. Based on Alpine Linux with OpenVPN and EasyRSA. Supports amd64, arm64 and arm/v7.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
AI: Self-Hosted AI Stack for local LLMs, chat, RAG, voice and AI tools
📘 Interested in self-hosted AI? The Self-Hosted AI Builder’s Guide (Kindle · Google Play · paperback) is a practical guide to building, securing, and operating your own private AI stack.
Import client.ovpn into your OpenVPN client to connect.
Alternatively, you may set up OpenVPN without Docker. To learn more about how to use this image, read the sections below.
Community
📬 Get project updates and free deployment guides (1–2 emails/month)
💬 Join the r/selfhostedstack community for discussions
⭐ Star the repository if you find it useful — it helps others discover it
Requirements
A Linux server with a public IP address or DNS name
Docker installed
VPN port open in your firewall (UDP 1194 by default, or your configured port/protocol)
Download
Get the trusted build from the Docker Hub registry:
docker pull hwdsl2/openvpn-server
Alternatively, you may download from Quay.io:
docker pull quay.io/hwdsl2/openvpn-server
docker image tag quay.io/hwdsl2/openvpn-server hwdsl2/openvpn-server
Supported platforms: linux/amd64, linux/arm64 and linux/arm/v7.
Environment variables
All variables are optional. If not set, secure defaults are used automatically.
This Docker image uses the following variables, that can be declared in an env file (see example):
Variable
Description
Default
VPN_DNS_NAME
Fully qualified domain name (FQDN) of the server
Auto-detected public IP
VPN_PUBLIC_IP
Public IPv4 address of the server
Auto-detected
VPN_PUBLIC_IP6
Public IPv6 address of the server
Auto-detected
VPN_PROTO
VPN protocol: udp or tcp
udp
VPN_PORT
VPN port (1–65535)
1194
VPN_CLIENT_NAME
Name of the first client config generated
client
VPN_DNS_SRV1
Primary DNS server pushed to clients
8.8.8.8
VPN_DNS_SRV2
Secondary DNS server pushed to clients
8.8.4.4
VPN_DISABLE_USAGE_COUNTS
Set to 1 to disable anonymous aggregate usage counts.
(not set)
Note: In your env file, you may enclose values in single quotes, e.g. VAR='value'. Do not add spaces around =. If you change VPN_PORT or VPN_PROTO, update the -p flag in the docker run command accordingly.
The env file is bind-mounted into the container, so changes are picked up on every restart without recreating the container.
Client management
Use docker exec to manage clients with the ovpn_manage helper script.
Add a new client:
docker exec openvpn ovpn_manage --addclient alice
docker cp openvpn:/etc/openvpn/clients/alice.ovpn .
Export a client config (prints to stdout):
docker exec openvpn ovpn_manage --exportclient alice > alice.ovpn
List clients:
docker exec openvpn ovpn_manage --listclients
Revoke a client (will prompt for confirmation):
docker exec -it openvpn ovpn_manage --revokeclient alice
# Or revoke without confirmation prompt:
docker exec openvpn ovpn_manage --revokeclient alice -y
Persistent data
All server and client data is stored in the Docker volume (/etc/openvpn inside the container):
/etc/openvpn/
├── server/
│ ├── server.conf # OpenVPN server configuration
│ ├── ca.crt # CA certificate
│ ├── server.crt # Server certificate
│ ├── server.key # Server private key
│ ├── tc.key # TLS crypt key
│ ├── dh.pem # DH parameters
│ ├── crl.pem # Certificate revocation list
│ ├── client-common.txt # Client config template
│ ├── ipp.txt # IP pool persistence
│ └── easy-rsa/pki/ # Full PKI directory
└── clients/
├── client.ovpn # First client config
└── alice.ovpn # Additional clients
Back up the Docker volume to preserve all keys and client configurations.
IPv6 support
If the Docker host has a public (global unicast) IPv6 address and the requirements below are met, IPv6 support is automatically enabled when the container starts. No manual configuration is needed.
Requirements:
The Docker host must have a routable global unicast IPv6 address (starting with 2 or 3). Link-local (fe80::/10) addresses are not sufficient.
IPv6 must be enabled for the Docker container. See Enable IPv6 support in Docker.
To enable IPv6 for the Docker container, first enable IPv6 in the Docker daemon by adding the following to /etc/docker/daemon.json on the Docker host, then restart Docker:
{
"ipv6": true,
"fixed-cidr-v6": "fddd:1::/64"
}
After that, re-create the Docker container. To verify that IPv6 is working, connect to the VPN and check your IPv6 address, e.g. using test-ipv6.com.
Using docker-compose
cp vpn.env.example vpn.env
# Edit vpn.env if needed, then:
docker compose up -d
docker cp openvpn:/etc/openvpn/clients/client.ovpn .
To update the Docker image and container, first download the latest version:
docker pull hwdsl2/openvpn-server
If the Docker image is already up to date, you should see:
Status: Image is up to date for hwdsl2/openvpn-server:latest
Otherwise, it will download the latest version. Remove and re-create the container using instructions from Quick start. Your data is preserved in the openvpn-data volume.
Usage counts
This image uses public GitHub release asset download counts for anonymous, aggregate usage counts. Counts are approximate and are not unique users or active installs. The image does not send a telemetry payload or use a private collector. It only attempts the best-effort count after setup reaches OpenVPN startup with a mounted /etc/openvpn volume, and again when that persistent install first runs a different image build. To opt out, set VPN_DISABLE_USAGE_COUNTS=1.
Technical details
Base image: alpine:3.23
OpenVPN: latest available from Alpine packages
EasyRSA: bundled at build time
Cipher: AES-128-GCM
Auth: SHA256
Key exchange: tls-crypt (HMAC + encrypt)
DH parameters: pre-defined ffdhe2048 group (RFC 7919)
Client certificates: 10-year validity
VPN subnet: 10.8.0.0/24
IPv6 VPN subnet: fddd:1194:1194:1194::/64 (when server has IPv6)
Further reading
📚 For broader guidance on protecting your online privacy, see Privacy Tools in the Age of AI.
License
Note: The software components inside the pre-built image (such as OpenVPN and EasyRSA) are under the respective licenses chosen by their respective copyright holders. As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.
Copyright (C) 2026 Lin Song
This work is licensed under the MIT License.
This project is based in part on the work of Nyr and contributors, licensed under the MIT License.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/hwdsl2/docker-openvpn là nguồn chính thức.
hwdsl2/docker-openvpn có bao nhiêu sao?
hwdsl2/docker-openvpn có 37 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/hwdsl2/docker-openvpn. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
hwdsl2/docker-openvpn có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho hwdsl2/docker-openvpn. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
hwdsl2/docker-openvpn còn đang phát triển không?
Commit gần nhất trên hwdsl2/docker-openvpn là 15 ngày trước (theo timestamp GitHub). Repo có 8 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
hwdsl2/docker-openvpn là gì?
hwdsl2/docker-openvpn (hwdsl2/docker-openvpn) là dự án Shell trên GitHub. Theo mô tả gốc: Docker image to run an OpenVPN server with automatic PKI setup and client config generation. Managed via a helper script. Based on Alpine Linux with OpenVPN and EasyRSA. Supports amd64, arm64 and arm/v7.
hwdsl2/docker-openvpn so với các dự án Security khác thế nào?
hwdsl2/docker-openvpn được TopGit xếp vào nhóm Security, với 37 sao GitHub và viết bằng Shell. Xem trang chủ đề Security trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
Đọc đầy đủ README ở tab phía trên.
docker-openvpn có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về docker-openvpn.