Complete & thorough guide on how to get started with Wireguard VPN (Windows, Linux, iOS, & Android)

Complete & thorough guide on how to get started with Wireguard VPN (Windows, Linux, iOS, & Android)

Hi everyone, with the hope of providing a quality resource to the community, I recently learned how to set up a Wireguard VPN server.

I was frustrated in my learning experience because I felt the the tutorials I was following were incomplete or very confusing to follow along. I also had a hard time understanding how certain functionality worked.

So through my frustration, I took a ton of notes and put them all together in a very visual format. I made sure to cover the major platforms:

  • Linux
  • Windows
  • Ubuntu
  • iOS
  • macOS

I hope you can find this guide helpful for yourself or your friends and I hope this guide helps push the community forward. Thanks for everything you’ve been creating :victory_hand:

This is awesome! u/khaberz and u/zx2c4, can we add this to the sidebar PLEASE as required reading before posting for “how-to set up” help?

Couple of things

On the QR codes section you wrote this

We will need to know the contents of the private key is. We can get the contents of our by using the cat
command:

cat /etc/wireguard/clients/mobile.key

should this not be

/etc/wireguard/clients/mobile.key.pub

Also on this section you wrote

This is what we will want our “/etc/clients/mobile.conf” file to look like:

[Interface]
PrivateKey = abcdefghijklmnopqrstuvwxyz1234567890=+
Address = YOUR_VPN_PRIVATE_IP/24
DNS = 1.1.1.1, 1.0.0.1

[Peer] PublicKey = YOUR_SERVER_PUBLIC_KEY
AllowedIPs = 0.0.0.0/0
Endpoint = YOUR_SERVER_WAN_IP:51820

Under Interface PrivateKey What is the key meant to be? I dont see how it was created, or is it meant to be the PrivateKey for the server we generated earlier?

sorry to bother you again. It appears when I reboot I need to run this line every time

sudo wg set wg0 peer YOUR_CLIENT_PUBLIC_KEY allowed-ips YOUR_CLIENT_VPN_IP

Otherwise my clients fail to connect. Any ideas on how to save this setting to survive a reboot?

Old post, but OP, when will the ubuntu tutorial drop?

Please note to people that WireGuard on Windows only works for admin users, on their desktop - regular users cannot run it, even by “Run as administrator”. If they try to run it, they’ll get the following error message:

WireGuard may only be used by users who are a member of the Builtin Administrators group.

You can save some people from a frustrating headache.

Thanks. I have been put off because I tried and failed 3 times using 3 different guide. All the guide I used seemed to be very incomplete or using old versions of Ubuntu server where you had to manually install extra stuff.

I’m going to give this one a shot and see how I go.

Haven’t arched yet, but is this “server” set up or peers?

Thanks for your compliments! I hope this continues to be a helpful guide for everyone.

This how-to blog post explains it: https://cryptsus.com/blog/wireguard-vpn-privacy-server-on-a-vultr-cloud-vps-on-openbsd-6.6-with-full-disk-encryption.html