# first we should create a volume for the open vpn data
docker volume create --name ovpndata
# then using that data volume we run a docker container based on the kylemanna/openvpn image
# make sure to change VPN.SERVERNAME.COM to your server address
docker run -v ovpndata:/etc/openvpn --log-driver=none --rm kylemanna/openvpn ovpn_genconfig -u udp://VPN.SERVERNAME.COM
docker run -v ovpndata:/etc/openvpn --log-driver=none --rm -it kylemanna/openvpn ovpn_initpki
# now start the server proccess
docker run -v ovpndata:/etc/openvpn -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn
### user creation
# create a new user with no password, replace USERNAME with your desired username
docker run -v ovpndata:/etc/openvpn --log-driver=none --rm -it kylemanna/openvpn easyrsa build-client-full USERNAME nopass
# retrieve user info into an embedded certificate, replace USERNAME with your desired username
docker run -v ovpndata:/etc/openvpn --log-driver=none --rm kylemanna/openvpn ovpn_getclient USERNAME > USERNAME.ovpn