Whether you want to hide your identity from prying eyes or access content blocked by geo-restrictions, running a WireGuard server is an excellent solution to run your own VPN server.
- A VPS with Ubuntu 20.04
Step 1: Downloading WireGuard Server and configuring it
Run the following command to install WireGuard Server:
wget https://git.io/wireguard -O wireguard-install.sh && bash wireguard-install.sh
The following prompts should appear, follow the instructions on screen or below:
This will be the port that WireGuard will be listening on, we can just press enter to leave this as default
Welcome to this WireGuard road warrior installer! What port should WireGuard listen to? Port :
This will be the name of the profile for your server configuration, this only matters if you will be creating multiple profiles for users, we can just press enter to leave this as default
Enter a name for the first client: Name [client]:
This option will let you set your DNS servers, this is completely up to you, if you want AdBlocking, use AdGuard but 126.96.36.199 is the DNS server we recommend. Enter the number “3” and press enter to continue
Select a DNS server for the client: 1) Current system resolvers 2) Google 3) 188.8.131.52 4) OpenDNS 5) Quad9 6) AdGuard DNS server : 3
You’re now ready to begin installing the WireGuard server, press ENTER to install.
WireGuard installation is ready to begin. Press any key to continue...
You should be presented with a QR code which can be scanned on the mobile apps for WireGuard or you can get your server config from /root/client.conf for use with desktop versions of Wireguard.
Credit to: https://github.com/Nyr/wireguard-install for the script used in this tutorial.