Configure WireGuard VPN
From Organic Design wiki
We've recently changed from OpenVPN to WireGuard for our VPN solution. We use a VPN so that we can be sure our local browsing traffic's private even when we're on an insecure connection like a hotel or airport. Of course there are many solutions available such as ProtonVPN or RiseupVPN, but we like to be independent for our security, and also this allows us to customise the ports and locations and have higher bandwidth than a shared solution.
These first steps need to be done on the same way on the server and on the clients. First install WireGuard which is in the default Debian repositories, and we'll also need resolvconf.
sudo apt install wireguard resolvconf
Then create a key-pair that are called privatekey and publickey in the /etc/wireguard directory.
wg genkey | sudo tee /etc/wireguard/privatekey | wg pubkey | sudo tee /etc/wireguard/publickey