Run PiVPN in a 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.
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/pivpn
Wait until you see PiVPN Service Started
Copy the client ovpn profile under "$HOME"/ovpns
to the machine/device from where you want to connect to the PiVPN server. The name of the client profile is client.ovpn
by default.
Install the OpenVPN
application on the client. On Debian OS, it would be as easy as
sudo apt-get install openvpn
Then you can start the VPN client using
sudo openvpn --auth-nocache --config client.ovpn
The default Private Key Password is vpnpasswd
and you can change it in the configuration file setupVars.conf
.
In case you have any connection problems, try to modify the variables in file setupVars.conf
before restarting the PiVPN server using the same command from step 1
. You can also create an issue and let me know if I can help you.
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