Skip to content

Setting up WireGuard client with GNOME

Posted on:September 8, 2023

If you’ve ever used WireGuard on Windows or Mac, you’re probably familiar with the intuitive GUIs that make the setup process a breeze. Unfortunately, Linux doesn’t have a WireGuard GUI that’s under active development. But don’t lose hope yet!

For GNOME users, there’s a silver lining: GNOME has WireGuard integration built right into the Network Manager. If you’re not aware, Network Manager is the heart of GNOME where all network configurations are centralized. It took me quite a bit of time to Google how to set it up, so let me save you the hassle and break it down for you.

Note: I’m using PiVPN to set up WireGuard on my homelab server, and it exports a .conf file with all the necessary settings. You might be using a different tool, but for the purposes of this guide, I’m going to assume you have this configuration.

Setup

Once you have your .conf file, rename it to a valid WireGuard interface name. For example: wg0.conf. For better organization and easy access, move the renamed file to /etc/wireguard/.

If you’re on GNOME, you should already have the nmcli utility, which is the Network Manager command-line interface. But it never hurts to check. Just type nmcli in the terminal. If it’s there, you’re good to go.

Now, to import your configuration file into Network Manager, use the following command:

nmcli connection import type wireguard file "/etc/wireguard/wg0.conf"

The last step is to set up a menu item for your WireGuard connection and display its details. Run these commands:

nmcli connection modify wg0 connection.id "homelab-vpn"
nmcli connection show homelab-vpn

That’s it! You should now have WireGuard up and running on your Debian with GNOME.