Don't use VPN Services, roll your own.
8 steps to setup a private on demand VPN. With this setup you can spin up (and shutdown) a private VPN with just two buttons.
- Digitalocean account (Signup using referral or don't)
- Shortcuts (iOS 12+)
- OpenVPN app
- (Optional) Domain name
You pay $0.007/hr for the server. That's 5$ if you let it run all month.
Snapshots are charged at a rate of
Go to OpenVPN Access Server and click 'Configure OpenVPN Access Server Droplet'.
From there:
- You'd want to select the smallest machine (5$/mo)
- Don't enable backups
- Select a region of you liking (you can add more later on), but do make note of what region you choose right now.
- Select or add a SSH key
- Hit create
From here on you'd want to follow the marketplace steps
I'd advice to create a seperate account on the Access Server to access the VPN using a non admin account.
You can login with your phone/pc/table on the instance by going directly to the https://$IP, download the profile and import it into the OpenVPN app.
How to Create Snapshots of Droplet
How to Delete a Droplet from the DigitalOcean Control Panel
How to Create a Personal Access Token
You can get the snapshot ID from the API,
but you can also get it by using the inspect element developer feature. Right click and hit inspect when you
hover over VPN the snapshot. Copy the data-id
.
<div data-value="openvpn" data-type="snapshot" data-id="50734616" ...
This is the snapshot/image id and you'll need to recreate the Droplet.
There are three Shortcuts
- VPNUp: it ups the VPN server and copies the IP of the server to your clipboard. It will only boot the server once; pressing the button multiple times won't have effect.
- VPNDown: it shuts the VPN server off
- VPNStatus: checks if the VPN server is up or not
I had to delete all my static variables like my API Key from the shortcuts to share them.
You can just remove the 'ask'-prompts and replace them with text.
You may also choose to add the shortcuts to you widgets or homescreen.
It will take around 2 minutes for your VPN Server to have fully booted. You can check the progress in the Droplet dashboard if you'd like.
I've used this setup for some time now and it works like a charm. Sometimes the vpn
domain record gets bugged,
but you can always access to server using the IP.
You can add SSH-Keys by altering the ssh_keys
contents in VPNUp.
VPNDown will terminate all Droplets with tag openvpn-shortcuts
, so if you came up with the exact same tag
for a different Droplet, change the tag in VPNUp, VPNDown and VPNStatus.
If you (1) up, (2) down and (3) up it again your DNS record will still point to the old server as long as the TTL (1800seconds default). If the Droplet is on, try connecting using IP instead.
Questions? 👇