How to install OpenVPN Client on OMV (openmediavault)

OMV (openmediavault) is an open source NAS operating system based on Debian. If you're not familiar with it, head here and check it out. 

This tutorial assumes basic knowledge of Linux and root access to your OMV server. Lets get started.

  1. Install OpenVPN (as root)
apt-get install openvpn
  1. After installing OpenVPN, you'll want to obtain the VPN certificate files. These should be provided to you by your VPN provider. My personal recommendation is PIA. If you choose to utilize PIA, you can download the necessary files here.
  2. At this point you'll want to transfer the certificate files over to your server either using SCP or some other mechanism. I personally recommend directly downloading it on the server with wget and then unzipping it with unzip.
  3. From your extracted files, move ca.crtcrl.pemvpn.ovpn to /etc/openvpn/ (Note: vpn.ovpn refers to whatever VPN server you're looking to connect to)
  4. Edit the vpn.ovpn file using whatever editor you prefer and replace the line 


auth-user-pass login.txt

Save and close the file.

  1. Next, create login.txt in /etc/openvpn and place your username on the first line, and your password on the second line. These should be provided to you by your VPN provider. 
  1. Now change the extension of vpn.ovpn file to vpn.conf
mv vpn.ovpn vpn.conf
  1. To ensure that OpenVPN connects to this VPN on start, we must edit the openvpn configuration file. Open /etc/default/openvpn in your editor of choice and add the entry AUTOSTART=vpn where vpn refers to the vpn.conf file in /etc/openvpn/. Adding this entry will allow openvpn to search for this configuration file on start and run it.
  2. Lets test our handywork. Start and run openvpn
openvpn /etc/openvpn/vpn.conf
  1. Now test the connection using
curl -s

You should see a different WAN IP which represents your VPN IP.

  1. Now restart openvpn and be set
/etc/init.d/openvpn restart