How to install WireGuard VPN on VDS by FirstByte

What is WireGuard VPN

The WireGuard VPN protocol has made a splash in the VPN industry. It is simple, fast, safe, not demanding on server resources. Major tech and programmer figures such as Linus Torvalds, the creator of Linux, have called it a “work of art” compared to earlier VPN protocols such as OpenVPN and IPSec, and many VPNs now use this fast and secure protocol.

How to Install WireGuard VPN Server WG-Easy

First we have to access the server and then install “Docker” and run this command:
Disclaimer: This guide is written for Ubuntu 20+ OS.

docker run -d \
--name=wg-easy \
-e WG_HOST=Your_server_IP \
-e PASSWORD=Admin_password \
-v ~/.wg-easy:/etc/wireguard \
-p 51820:51820/udp \
-p 51821:51821/tcp \
--cap-add=NET_ADMIN \
--cap-add=SYS_MODULE \
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \
--sysctl="net.ipv4.ip_forward=1" \
--restart unless-stopped \
weejewel/wg-easy

After a couple of seconds, our “WireGuard VPN” is already installed and we can go to the panel and create a profile for it. We follow the link “http: // server IP: 51821″ and login to the panel with the password that we specified when we created our “Docker” container.

After we are logged in, click on “New” specify the name of the profile and click on “Create”.

After we have created a profile on the home page, we can see it, download the profile, scan the QR code with the phone, delete it, and also see the current load on the channel from client VPN side.

How to connect to WireGuard VPN

The installation is ready and now we can download WireGuard, install it and connect to our VPN. Once installed, we open WireGuard and click on Import tunnel(s) from file.

  • select our vpn.conf configuration file and click on Open

In WireGuard we can now see that the config file has loaded and we can click on the Activate button to connect to the VPN.

You will see information that the connection to the VPN was successful.

To check if our VPN is really working, we go to the MyIP.com page and see that our IP has changed and now we have the same IP as our server.

How to connect via smartphone to WireGuard VPN

To connect using your smartphone to your VPN server, you must first download the WireGuard app from the Apple Store for iOS or the Play Store for Android.
You can download the configuration file itself to your phone, or you can scan the QR code from the control panel.

That’s all, now you can use the Internet even safer!