« Back to all guides

Install OpenVPN for Raspbian (Wheezy)

1. Update and restart the Raspberry Pi
sudo rpi-update && sudo reboot
2. Install OpenVPN
sudo apt-get install openvpn unzip
3. Make sure the time zone is correct

Run the command below and go through the configuration prompt to select the correct time zone.

sudo dpkg-reconfigure tzdata
4. Download the configuration you want
5. Enter your login credentials
echo  "username"  >> /etc/openvpn/credentials
echo "CHANGE TO YOUR PASSWORD" >> /etc/openvpn/credentials
6. Start OpenVPN and see that everything works
sudo openvpn --config /etc/openvpn/ovpn.conf --daemon
7. Verify that the connection was successful

Wait for about a minute after running the last command, then run:

curl https://www.ovpn.com/v1/api/client/ptr | python -m json.tool

You should see something like:

{
    "ip": "46.227.67.132",
    "ptr": "cliXXX.ovpn.com",
    "status": true
}
8. Done

Congratulations! Now your Raspberry Pi will run behind OVPN. The Raspberry Pi will connect automatically when it is started.