pivpn-docker
pivpn-docker copied to clipboard
Run PiVPN in a Container!
PiVPN in Docker Container
Setting up an VPN server is easy, but we can make it even easier and you can do it within 1 min. All the prerequisite is just the docker which has been compatible with the Raspberry Pi for a while. If you don't have the docker installed on your little machine, go and check it out here.
Build
Docker Images
Supported Architectures
- x86_64/amd64
- armv7hf (Raspberry Pi 2 and 3)
Usage
-
Launch PiVPN on a machine, which would be the PiVPN server.
docker run -ti --rm \ --privileged \ -p 443:443/udp \ -v "$HOME"/ovpns:/home/pivpn/ovpns \ ljishen/pivpnWait until you see
PiVPN Service Started -
Copy the client ovpn profile under
"$HOME"/ovpnsto the machine/device from where you want to connect to the PiVPN server. The name of the client profile isclient.ovpnby default. -
Install the
OpenVPNapplication on the client. On Debian OS, it would be as easy assudo apt-get install openvpnThen you can start the VPN client using
sudo openvpn --auth-nocache --config client.ovpnThe default Private Key Password is
vpnpasswdand you can change it in the configuration filesetupVars.conf. -
In case you have any connection problems, try to modify the variables in file
setupVars.confbefore restarting the PiVPN server using the same command fromstep 1. You can also create an issue and let me know if I can help you.
Credit
Miscellaneous
Commands to Create the Docker Image Manifest
docker manifest create ljishen/pivpn ljishen/pivpn:amd64 ljishen/pivpn:armv7hf
docker manifest annotate ljishen/pivpn ljishen/pivpn:armv7hf --os linux --arch arm --variant v7
docker manifest annotate ljishen/pivpn ljishen/pivpn:amd64 --os linux --arch amd64
# purge the local manifest after push so that I can
# upgrade the manifest by creating a new one next time.
# https://github.com/docker/for-win/issues/1770
docker manifest push --purge ljishen/pivpn