How to quickly set up WireGuard on a Linux client with wg-quick and a .conf configuration file.
I recently set up WireGuard on unRAID which automatically generates a .conf file for each client. While setting up a Windows client was straightforward, I didn't find setting up the client on Linux nearly as simple, mostly due to a lack of documentation. Today's guide will be a rapid-start guide for setting up a WireGuard client on Linux with a preconfigured .conf file. Note that this guide will work for any WireGuard configuration file, not just one generated by unRAID.
1. Install WireGuard:
sudo apt install wireguard
2. Download your .conf file and move it to the /etc/wireguard/ directory.
3. Bring your WireGuard interface up with the following command:
sudo wg-quick up wg0
The above assumes your .conf file was named wg0.conf. If it had been named something else, you would replace wg0 with whatever the name was of your .conf file. For example, I have an WG tunnel with a Pi-Hole DNS server named pihole.conf. In that case, the way to bring this interface up would be with:
sudo wg-quick up pihole
4. Check the status of your WG connection:
5. When you're done with your WG interface, you can take it down:
sudo wg-quick down wg0
See, I told you this would be a quick guide. As always, if you run into any problems, ask away in the comments below!