wg-api
wg-api copied to clipboard
Persistence: WireGuad Interface/Peer Configuration
WG-API currently makes no attempt to persist WireGuard configuration between restarts. The restart may be of the wg-api daemon, or of the system itself.
In the case of the wg-api daemon being restarted, all configuration is persisted as the WireGuard interface itself is used as the source of truth. No persistence nessecary.
In the case of the system restarting, the system may not be configured with wg-quick to load configuration on startup, and thus wg-api will see an empty state. No attempt is made to store configuration changes made by wg-api on termination, this must be done seperately.
WG-API should have a mechanism to snapshot and restore WireGuard's interface/peer configuration, perferably in a format that is compatible with wg-quick.
@jamescun isnt SaveConfig = true
inside server config for that?
@vandot SaveConfig = true
is a feature that is part of wg-quick
rather than wg
, and requires extra configuration to automatically load/save configuration as part of boot/shutdown.
This question is whether or not wg-api should have the same / similar functionality, or if we should simply document how to achieve this with wg-quick
@jamescun for start at least to document that people configure server with SaveConfig = true