How to autostart Wireguard using systemd (wg-quick)

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

enable_wg_quick.sh
sudo systemctl enable --now wg-quick@wg0

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 !


Check out similar posts by category: Networking, Systemd, Wireguard