In this article, we will be discussing how to install wireguard VPN on your VPS.
There are a lot of VPS providers who provide servers as cheap as 5$ per month and also some provide them for free. so we can make use of that servers to set up our own private VPN server.
- Plan 5$ per Month
- Free VPS Servers
- Google – Get an e2-micro compute engine for a free per month with free tier (lifetime)
- AWS – Get 1 year of free t3.micro / t2.micro EC2
Let’s continue with the installation process
- Ubuntu 16.04 server or the latest
- Sudo user access
- Firewall enabled
- Static Ipv4 address for your server normally all VPS providers provide 1 IP address.
Method 1: Automatic
sudo apt update
curl -O https://raw.githubusercontent.com/angristan/wireguard-install/master/wireguard-install.sh
chmod +x wireguard-install.sh
Method 2: Manual
sudo apt update sudo apt install wireguard
wg genkey | sudo tee /etc/wireguard/private.key sudo chmod go= /etc/wireguard/private.key
sudo cat /etc/wireguard/private.key | wg pubkey | sudo tee /etc/wireguard/public.key