After some more digging, turns out it's not a problem with Netplan. Although, the problem will manifest depending on how Netplan generates the configuration for Network Manager.
When selecting the option to store the private key in the KDE wallet agent, the option "private-key-flags=1" will be added to the resulting .nmconnection file and the private key will be omitted. In this case, all the properties set in the group [wireguard] in the keyfile are not supported by the netplan's keyfile parser and will be left to be added to the keyfile *after* the wireguard peers, like this: ----------------- [connection] id=wg0 type=wireguard ... [wireguard-peer.M9nt4YujIOmNrRmpIRTmYSfMdrpvE7u6WkG8FY8WjG4=] endpoint=10.20.30.40:51820 allowed-ips=0.0.0.0/0; [wireguard] #Netplan: passthrough setting private-key-flags=1 #Netplan: passthrough setting listen-port=51820 ------------------- For some reason, Network Manager will load the connection but *will not* load the wireguard-peer section. Moving the [wireguard] section to above [wireguard-peer...] resolves the issue. I can't find a reference that says that [wireguard] is supposed to come before [wireguard-peer]. A workaround you can use while we work on a fix is not use the option to encrypt the private key and store it in the network manager .nmconnection file. -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to network-manager in Ubuntu. https://bugs.launchpad.net/bugs/2024661 Title: Unable to configure Wireguard connection at NetworkManager interface Status in netplan.io package in Ubuntu: Confirmed Status in network-manager package in Ubuntu: Invalid Bug description: Repro steps: 1) Open NetworkManager GUI. 2) Click "Add new Connection" and select "Wireguard" connection type. 3) Then you have to configure new connection. Basic configuration looks like that: a) Write down connection name, b) Write down local private key, c) Create new peer and populate peer's parameters: public key of the peer, allowed IPs (i.e. 0.0.0.0/0), peer's IP address and port. 4) Click "OK" and "Save". 5) Open "Peers" again. Ensure that settings were not stored. All fields are empty. Found in Kubuntu flavor version 23.10 (development), Plasma Network Manager interface. netplan.io 0.106.1-2 network-manager 1.42.4-1ubuntu7 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2024661/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp