Network Manager

How To

Import WireGuard VPN to Network Manager

vpnconfigfile="/path/to/your/wg0.conf"
vpnName="myvpn"

sudo nmcli connection import type wireguard file "${file}"
nmcli connection modify wg0 connection.id "${vpnName}
nmcli connection modify wg0 connection.interface.name ${myVPN} # if you want to change the interface name from wg0 to something else. 

nmcli connection up ${vpnName}
nmcli connection down ${vpnName}