If you’ve tried importing a standard Wireguard config through the NetworkManager UI in recent years (such as those generated for your by ProtonVPN), chances are you’ve encountered an error message about a missing connection.id property. In the past, I’ve resorted to manually setting it up, but I wanted a more efficient solution.

Luckily the issue seems limited to the GUI as the NetworkManager CLI can still import the config without issue, like so:

nmcli connection import type wireguard file <path to your config file>

While this eliminates the connection.id issue, you might encounter a new error message:

The name of the WireGuard config must be a valid interface name followed by “.conf”.

This probably is trying to tell you that your filename is too long. NetworkManager uses wg-quick under the hood, which expects the filename to be a valid Linux interface name ending with the .conf extension. What this is trying to tell you, in an ideal example of bad error messages, is that your file name should have no more than 16 alphanumeric characters, hyphens, and underscores, followed by the .conf extension.

Hope this helps someone else!