2014-07-09 19:18:43 +00:00
# Advanced Configurations
2015-03-14 12:22:28 +00:00
The [`ovpn_genconfig` ](/bin/ovpn_genconfig ) script is intended for simple configurations that apply to the majority of the users. If your use case isn't general, it likely won't be supported. This document aims to explain how to work around that.
2014-07-09 19:18:43 +00:00
2014-11-16 18:06:04 +00:00
## Create host volume mounts rather than data volumes
2014-07-09 19:18:43 +00:00
2016-09-03 23:08:49 +00:00
* Refer to the Quick Start document, and substitute `-v $OVPN_DATA:/etc/openvpn` with `-v /path/on/host/openvpn0:/etc/openvpn`
2014-07-09 19:18:43 +00:00
* Quick example that is likely to be out of date, but here's how to get started:
mkdir openvpn0
cd openvpn0
docker run --rm -v $PWD:/etc/openvpn kylemanna/openvpn ovpn_genconfig -u udp://VPN.SERVERNAME.COM:1194
docker run --rm -v $PWD:/etc/openvpn -it kylemanna/openvpn ovpn_initpki
vim openvpn.conf
docker run --rm -v $PWD:/etc/openvpn -it kylemanna/openvpn easyrsa build-client-full CLIENTNAME nopass
2015-03-14 12:22:28 +00:00
docker run --rm -v $PWD:/etc/openvpn kylemanna/openvpn ovpn_getclient CLIENTNAME > CLIENTNAME.ovpn
2014-07-09 19:18:43 +00:00
* Start the server with:
docker run -v $PWD:/etc/openvpn -d -p 1194:1194/udp --privileged kylemanna/openvpn