Skip to main content

Setting up PiVPN

Self-hosting VPN on a Raspberry Pi Model 3 B+

Published

I have a backup server that's connected to my home network (NAS) but for obvious reasons I cannot access this server when I'm not connected to my home network. This is annoying, so to solve this problem I decided to set up PiVPN on a Raspberry Pi Model 3 B+.

Installation

According to the documentation it's best to install Raspberry Pi OS Lite, so I did just that. I made sure to enable ssh and disable Wi-Fi as this server will have no GUI (Raspberry OS Lite does not come with a GUI) and be permanently connected via an ethernet cable.

Oddly enough, the PiVPN installer thought I wasn't using a Raspberry Pi OS, perhaps because I'm using the Lite version? Not entirely sure if this a bug or not. Aside from that hiccup, the installation went smoothly and PiVPN was running without any problems.

Setup

Setup was very smooth, no issues whatsoever with the TUI. The steps were clear and descriptive. Adding a client and scanning the QR-code was also effortless.

I got VPN working on both my phone (Android) and laptop (Linux) without any problems whatsoever.

Conclusion

If you have a spare Raspberry Pi, want to have a VPN connection to your home network and are not too familiar with self-hosting, I can highly recommend trying out PiVPN. I think in total I must've spent at most an hour, though some of that time was setting up a VPN connection on my laptop and forgetting to port-forward and such.