Tutorial: Create shortcuts to start and stop Wireguard

As Loki said, you can just get the Wireguard configuration from your provider, and import it directly into the Advanced Network Manager app:

Open the terminal and indicate the name of your Wireguard config file with this command (match the name of your file):
CONF_FILE="wg.conf"

Then import it into Network Manager:
sudo nmcli connection import type wireguard file "$CONF_FILE"

(That assumes the config file is in your home folder; if not, add the path to where it is located.)

Now it appears in your saved network connections, and the wg toggle will be available permanently in the notifications area, unless you delete the saved wg connection:

It should connect automatically at power-on, as well.

7 Likes