[Unit] # Make sure we come up after the LAN is ready. After=network-online.target Wants=network-online.target [Service] # wg-quick@ is Type=oneshot with RemainAfterExit=yes by default. # If `wg-quick up` itself fails (e.g. transient DNS blip resolving the # server endpoint at boot), retry a few times before giving up — the # watchdog takes over from there. Restart=on-failure RestartSec=10s # oneshot needs this for Restart to apply: # (systemd accepts Restart on oneshot in practice)