PiVPN in the Cloud

Login to Google Cloud Platform

Create a new Project

Name Project & Select Location

Validate Project Creation

VM Creation
Select Compute Engine

Select Project from Dropdown

Wait for instance to be initiated

Create VM

Name your VM instance “pivpn”, select f1 CPU, and make sure the region selected is within the free tier. Boot disk type should be Debian and at least 10GB, but you should take advantage of the full free tier (30GB). 


Network Config Select the three dots next to your VM Instance then, select “View network details”

Select External IP addresses

Change the External Address Type from Ephemeral to Static

Set the name and reserve

Firewall Rules Select “Firewall rules”

Delete default-allow-rdp, we don’t need RDP and RYUK is a bitch. 


Configuration of PiVPN & Pi-HoleYou can now SSH into the VM instance

Now, you can start having fun. 
Go into elevated root and update

$ sudo su
$ apt-get update && apt-get upgrade -y

Run PiVPN Install command 

$ curl -L https://install.pivpn.io | bash

Confirm the installation

Confirm all prompts, it’s almost 100% “enter” except for this: 

Allow the system to reboot after installation and reconnect via SSH. 

To add a profile

$ pivpn add
: <name>
: <days of certificate validation>
: <password>
: <validate password>

You will then want to export the config to your device. 

$ cat ~/ovpns/home.ovpn

You will then press “CTL -” to zoom out, copy the ENTIRE CONFIG. If you scroll, you will not be able to pull the entire config. Paste the copied config to a txt file and save as <name>.ovpn Import the file into OpenVPN on your device, plug in the password and you’re good to go! 

If you want to add additional layers of security, remove the HTTP firewall rule (delete port 80 allow any).


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s