diff --git a/wiki/docker-images/kylemanna_-_openvpn.md b/wiki/docker-images/kylemanna_-_openvpn.md index e1bd7cf..bdc4818 100644 --- a/wiki/docker-images/kylemanna_-_openvpn.md +++ b/wiki/docker-images/kylemanna_-_openvpn.md @@ -8,7 +8,33 @@ The official container and documentation was made by ## Set-up Create the file `rebuild.sh`. -Change the settings according to your needs and run `./rebuild.sh` afterwards. +Change the settings according to your needs. + +Then run the following commands. +Change `` to the URL the VPN is accessible at. +If not already done set a port forward or something similar. + +```sh +docker volume create --name openvpn +docker run -v openvpn:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u udp:// +docker run -v openvpn:/etc/openvpn --rm -it kylemanna/openvpn ovpn_initpki +``` + +Afterwards run `./rebuild.sh`. + +## Usage + +### Create Certificates + +Each device that connects to the [OpenVPN](/wiki/vpn.md#openvpn) server should +have a certificate to connect by. +Create a certificate and retrieve it by running the following commands. +Change all occurences of `` to the name of the client. + +```sh +docker run -v openvpn:/etc/openvpn --rm -it kylemanna/openvpn easyrsa build-client-full nopass +docker run -v openvpn:/etc/openvpn --rm kylemanna/openvpn ovpn_getclient > .ovpn +``` ## Volumes