How to autostart Wireguard using systemd (wg-quick)

This post is also available in: deDeutsch (German)

If you’ve added a wg-quick config, e.g. /etc/wireguard/wg0.conf, you can enable autostarting it on system boot using systemd:

sudo systemctl enable --now [email protected]

If you have started Wireguard with this config manually before, you need to shut it down first or systemd will not be able to start it !