You can use
wg conjointly with
wg is a lower-level command, actually the one used by
wg-quick to really do WireGuard-specific configuration on the interface (along various
ip xxx commands for the base networking parts).
wg syncconf used conjointly with
wg-quick strip is intended to update settings without disruption for current peer communication with changed settings in the configuration file as documented in
Use strip to output a configuration file with all
wg-quick(8)-specific options removed, suitable for use with wg(8).
The strip command is useful for reloading configuration files without
disrupting active sessions:
# wg syncconf wgnet0 <(wg-quick strip wgnet0)
syncconf <interface> <configuration-filename>
setconf, but reads back the existing configuration first and only
makes changes that are explicitly different between the configuration
file and the interface. This is much less efficient than
has the benefit of not disrupting current peer sessions. The contents
of must be in the format described by
CONFIGURATION FILE FORMAT below.
So to repeat the example, if the configuration for interface
wg0, usually used with
wg-quick is in
/etc/wireguard/wg0.conf (or any other Distribution-specific place) and a
[Peer] section was just added (resp. removed) to this file, to make this peer available (resp. not available anymore) without disrupting communication with already configured peers, then run as root in a bash shell:
wg syncconf wg0 <(wg-quick strip wg0)
Some parts will have to be completed manually, since they are not handled by
wg, as described in
wg-quick's CONFIGURATION section: additional routes, iptables rules...