Handbook compatible with VPS LXC (NAT)
How do I install WireGuard on the VPS LXC NAT?
First connect to the server via an SSH connection.
Installing the WireGuard server
1 First, update the package management system by entering the following commands (may take a while):
apt-get update apt-get upgrade
2. we create a clients folder where we will store our clients' configuration files and go:
mkdir -p /home/wireguard/clients cd /home/wireguard/clients
3. run the command that will download the installation script and run it directly:
wget -4 https://git.io/wireguard -O /home/wireguard/wireguard-install.sh && bash wireguard-install.sh
Installer options:
- This server is behind NAT. What is the public IPv4 address or hostname?
The main IPv4 address will be detected automatically and shown in square brackets, proceed by clicking Enter - What port should WireGuard listen to?
You can find the list of available ports assigned to your server in the VPS panel by going to the Network tab.
Select the first one in the list that serves UDP or that is not occupied by another application on your server. - Enter a name for the first client
Enter your preferred device name from which you will connect to WireGuard - Select a DNS server for the client
We recommend selecting 1, as it has optimised DNS for the server - Should automatic updates be enabled for it?
Select Y (we will receive automatic updates)