(because you can't trust shady VPN providers)
- Create a VPS (virtual private server)
- Login to your VPS
- Clone the wireguard-install github repo and Run the script
- Copy the client configuration file to your computer
- Use your VPN
"A virtual private server (VPS) is a virtual machine sold as a service by an Internet hosting service" (Amazon)
There are many different options for setting up a VPS, however, I have chosen digital ocean as they are the cheapest provider and the only one that I could sign up to for some reason.
To create a droplet, first, sign-in and click the create button in the top right and select droplets:
Now choose your favourite Debian based image, basic plan, Regular intel with SSD and the $5/month plan. You do not need to select a block storage
You can choose anyone you want, however the cheapest one will suffice as it only uses 250Mb ram and up to 3% of the CPU, so the only thing you would need to get more of is bandwidth if you need it but 1TB should suffice.
You can choose the closest location for the datacenter region, although bear in mind that the closest one may not be the fastest (internet routing is done based on cost, not distance) so most of your traffic will probably be routed through the US
The VPC Network can be the default one unless you need to setup one for your own other purposes
For me in Australia, singapore is the closest:
For additional options, select IPv6 and Monitoring
For authentication you will need to create an ssh private key pair (password auth is less secure but go ahead if you want that)
To do this select the SSH keys option and click New SSH Key:
You can follow the tutorial on the window that pops up but one thing I might add is to run
ssh-keygen -t rsa -b 4096
instead of just plain old ssh-keygen
I would also recommend setting a password for your private key.
Next, you can choose a hostname (anything you want) and keep the auto generated project selected. You do not need to enable backups.
Now just wait for it to be online and then go to the next step!
To login, on windows you can use PuTTy and on mac or linux you can type
ssh -i ~/.ssh/your_private_key root@[2400:6180:0:d0::f9d:7001]
or just
ssh root@[2400:6180:0:d0::f9d:7001]
If you setup password authentication instead of ssh keys.
If you want to avoid all the hastle, you can just click the console button in the top right:
Now you should be in the command line for your VPS.
First, you will need to update it and install git
:
apt update && apt install -y git nano
To clone the repo type this command:
git clone https://github.com/angristan/wireguard-install.git
cd wireguard-install
This will get all the files, copy them to your VPS and then change directory (cd
) into the folder where they were copied to
Now you can run the installer with:
bash ./wireguard-install.sh
First it will prompt you for an IPv4 or IPv6 address, use the default IPv4 address for your VPS (in the middle at the top of the droplet dashboard):
Keep the public interface and wireguard interface name, wireguard ipv6 and ipv4, wireguard port as their defaults and set the DNS resolvers as cloudflares fast DNS servers
Then let it install!
Now choose a name for your client (anything you want)
Now you can copy the wireguard configuration to your computer with scp on mac or linux:
scp -i ~/.ssh/path_to_your_private_key root@[2400:6180:0:d0::f9d:7001]:/root/wg0-client-CLIENTNAME.conf .
Or with PuTTy on windows.
If you want to use it on your phone just download the wireguard app for your app store and scan the QR code then switch it on!
To use your VPN on windows you will need to install it from their website https://www.wireguard.com/
Once you have done that you can add your configuration file and click activate.
On linux:
Run sudo apt install wireguard && sudo cp path/to/config/file /etc/wireguard/wg0.conf && wg-quick up wg0
Now you have your very own fast VPN!