How to install your own WireGuard Server in under five minutes

Tony Russo
2 min readJul 30, 2021
WireGuard Server

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.

Requirements

  • A VPS with Ubuntu 20.04

Get a VPS at rawSRV.com starting at $9.50/m!

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 [51820]:

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 1.1.1.1 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) 1.1.1.1
4) OpenDNS
5) Quad9
6) AdGuard
DNS server [1]: 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.

Originally published on https://docs.rawsrv.com. Our knowledgebase is updated first and more frequently than our Medium page! Follow us on Twitter to get notified when we post!

--

--