Setup your VPN server the easy way using docker
In this post, I will show you how to setup your own VPN server in a few simple steps.
## 1. Setup
Step 1 - Create a docker volume to save configuration
docker volume create --name ovpn-data |
Step 2 - Generate config
This step will pull the docker image kylemanna/openvpn:2.3
and run command ovpn_genconfig
. The IP_ADDRESS or DOMAIN is your public ip address, eg udp://vpn.hienhoang.ml
docker run -v ovpn-data:/etc/openvpn --log-driver=none --rm kylemanna/openvpn:2.3 ovpn_genconfig -u udp://{{IP_ADDRESS | DOMAIN}} |
Step 3 - Generate public private key
This step will generate public private key. You must type in 4 to 1023 characters when ask for PEM pass phrase. This will take a few minutes to generate a strong private key.