Set Up WireGuard VPN on Ubuntu 18.04

Server Installation

wget -P /etc/wireguard/
bash /etc/wireguard/

Client Installation

wget -P /etc/wireguard/
bash /etc/wireguard/


apt-get update
apt-get install software-properties-common -y
add-apt-repository ppa:wireguard/wireguard -y
apt-get update
apt-get install linux-headers-"$(uname -r)" -y
apt-get install wireguard qrencode haveged resolvconf -y

Run Client

# Install the config file to the WireGuard configuration directory on your
# Linux client:
sudo install -o root -g root -m 600 <username>.conf /etc/wireguard/wg0.conf

# Start the WireGuard VPN:
sudo systemctl start wg-quick@wg0

# Check that it started properly:
sudo systemctl status wg-quick@wg0

# Verify the connection to the AlgoVPN:
sudo wg

# See that your client is using the IP address of your AlgoVPN:

# Optionally configure the connection to come up at boot time:
sudo systemctl enable wg-quick@wg0