wg-export
interface/wireguard/wg-export
Type: Command
Export the selected WireGuard interface and its peers in standard WireGuard configuration format. Select the interface with [find name=...]. The export does not include interface IP addresses, routes or firewall rules. For an executable RouterOS script, use the regular /interface/wireguard/export command. See WireGuard.
| Argument | Type | Description |
|---|---|---|
| file | file | Name of the file to export the selected WireGuard interface and its peers to. The file contains [Interface] and [Peer] sections and the private key; store it securely. |