[HowTo] Install OpenVPN Server (not client) on OSMC Pi

I’ve recently set up OpenVPN Server on my Rapsberry Pi running OSMC. It wasn’t a straight forward process so I’ve documented my experience on my blog here …

Note this is OpenVPN Server NOT Client. Setting up your Pi as an OpenVPN server allows you to securely connect to your home network with your phone/tablet/laptop when you are out and about.

I found there were already some good tutorials for installing OpenVPN on Raspbain which I used as a guide. However I also found there were some differences when installing on OSMC which took me some time to resolve.

I’ve also structured my tutorial slightly differently from others as it is quite a long process; in particular I’ve separated out how to set up a device to connect to your VPN server as you will likely need to repeat this at a later date and it can be difficult to pick out the required steps from a single page tutorial.

Hope it’s of use to someone.

5 Likes

Great install guide.
The restarting openvpn after reboot, also was an issue that I experienced, not in the same matter as you though. My openvpn server service was running, I even got connected to the VPN, but I had no connectivity at all when on the VPN.
When I executed an ifconfig, I saw that the VPN tunnel did not receiev the 10.8.0.1 address.
What I did was add this line to the [unit] paragraph of /lib/systemd/system/openvpn@.service
After=network-online.target
Tried a reboot and the tunnel got assigned the address.
Again great guide, I hope my addition can eventually help some people out.