For most, a VPN is implemented for security. In my case, I need to access my home network remotely, primarily when I am on the train. Below I will show you how to set up a VPN with a Raspberry Pi. This method is free (excluding the Pi)
When I first tried to set this up it was a long and painful method. Lucky for me some very smart programmers have set up an OpenVPN software that is painfully easy.
curl -L https://install.pivpn.io | bash
That’s it. Follow the install instructions. VPN server has never been so easy.
One area that will be different for everyone is port forwarding on your router. You need to set up forwarding on your router for the port you set up for the VPN (by default, it was 1194).
Now we need to set up a client key:
Copy the key from
to a USB or SFTP it to your client.
Install OpenVPN on your client and import the key and click connect.
Thank you to the guys over at piVPN