In this tutorial, we will show you how to set up WireGuard VPN on Ubuntu but first let’s see what are our requirements and recommendations.
You will need an active vpn package. If you don’t have one try our VPN for free
In the field below, you will get the Wireguard configuration for the selected server. Copy the content of the field, you will need it later.
Important! Keep the PrivateKey a closely guarded secret, do not share it with anyone and do not post it on the Internet. This is your personal key, similar to your private username & password on HideIPVPN.
Open the Terminal app by pressing Ctrl + Alt + T.
If you are using Ubuntu 20, run the following commands to install WireGuard:
sudo -ithen enter your password to login as root.
apt-get updateto make sure your system libraries are up to date and you get the latest Wireguard release version
apt-get -y install wireguardto install Wireguard
apt-get install resolvconfto handle your dns queries on Wireguard
If you are using Ubuntu 18 or earlier, run the following commands to install WireGuard:
apt install wireguard
Start the WireGuard interface:
systemctl start wg-quick@wg0
To make sure your interface is up type in console:
and you will see below your configuration file name under network interfaces
To check your external IP address in terminal:
apt update ; apt install curl
Or access this link in browser to check your current IP
To see the connection status:
systemctl status wg-quick@wg0
systemctl stop wg-quick@wg0
where wg0 is your config name
“WireGuard” is a registered trademark of Jason A. Donenfeld.