Setting up wireguard+pihole with Ubuntu and other devices
The simplest+cheapest way I found to get a personal Wireguard VPN with Pihole.

The simplest+cheapest way I found to get a personal Wireguard VPN with Pihole.
./regen-vpn-keys.sh X
where X
is the number of keys you want to generate. This will generate QR codes that you can load into your phone/iPad via the wireguard app./etc/wireguard/wg0.conf
. The full thing looks like:[Interface]
Address = ...
DNS = ...
PrivateKey = ...
[Peer]
Endpoint = ...
PersistentKeepalive = ...
PublicKey = ...
PresharedKey = ...
AllowedIPs = ...
Now install wireguard:
sudo apt update
sudo apt install wireguard
Now, depending on the system you need to fix resolveconf:
sudo ln -s /usr/bin/resolvectl /usr/local/bin/resolvconf
sudo wg-quick up wg0
Get stats with
sudo wg show wg0
Turn it off with
sudo wg-quick down wg0