Production setup
sudo apt install wireguard
sudo apt install resolvconf
sudo cp <client_>.conf /etc/wireguard/prod.conf
sudo systemctl enable wg-quick@prod.service
sudo systemctl daemon-reload
sudo systemctl start wg-quick@prod
Client setup -
sudo apt install wireguard
sudo apt install resolvconf
sudo cp <client_>.conf /etc/wireguard/wg0.conf
To start the wireguard tunnel
sudo wg-quick up wg0
To stop the wireguard tunnel
sudo wg-quick down wg0
Add the WireGuard service to systemd:
sudo systemctl enable wg-quick@wg0.service
sudo systemctl daemon-reload
Start the new service immediately:
sudo systemctl start wg-quick@wg0
Reboot your computer system to verify the automatic connection on startup works as expected.