Connect to a Wireguard VPN on Ubuntu with a .conf file

These steps are assuming you’ve already got wireguard setup and have a .conf file.

Ensure Wireguard is installed

sudo apt install wireguard

Move the .conf file to the Wireguard folder

Your wireguard conf file may be named something else, but mine is wg0.conf

sudo cp Downloads/wg0.conf /etc/wireguard/

Start Wireguard

Use the correct name for your wireguard config file. Note that I use wg0 because my file was wg0.conf.

sudo wg-quick up wg0

Fix wg-quick: line 32: resolvconf: command not found error

This step is optional, you only need to do this if you got the above error.

ln -s /usr/bin/resolvectl /usr/local/bin/resolvconf

Disconnect from Wireguard

sudo wg-quick down wg0

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.