WireGuard Windows setup (2024)

Content

  1. Setup

Setup

1) Download the current version for Windows: https://www.wireguard.com/install/ and install
2) Run C:\Program Files\WireGuard\wireguard.exe and add an empty tunnel (we will configure the server side):
Add tunnel → Add empty tunnel ...

WireGuard Windows setup (1)

We register the settings:
Name - the name of the network connection
Public key - public key of the WireGuard server (needed to configure the client side)

[Interface]
PrivateKey = # private key of WireGuard server
ListenPort = # port that WireGuard will listen to
Address = # desired IP address of WireGuard server
WireGuard Windows setup (2)

Enable settings to allow the WG server to use the main network interface

WireGuard Windows setup (3)

3) Add another empty tunnel (we will configure the client side):Add tunnel → Add empty tunnel
We register the settings:
Name - the name of the network connection
Public key - the public key of the WireGuard client (needed to configure the server side)

[Interface]
PrivateKey = # WireGuard client private key
Address = # desired IP address of WireGuard client
[Peer]
PublicKey = # public key of the WireGuard server (from step 2)
AllowedIPs = # specify the IP addresses for which you want to use the created WG tunnel (specifying the subnet 0.0.0.0/0 will allow you to route all traffic to the WG tunnel)
Endpoint = # Server IP address (real, not WireGuard) and port that WireGuard server listens on (configured in step 2)
WireGuard Windows setup (4)

4) Now we need to add our client to the WireGuard server part, to do this go back to step 2 and add its config:

...
[Peer]
PublicKey = #WireGuard client public key (from step 3)
AllowedIPs = #IPuser address
WireGuard Windows setup (5)

5) Now it is sufficient to export the configuration files Export all tunnels to zip→ Specify location for export→Save

WireGuard Windows setup (6)

Next, open the saved archive, there will be configurations of all our tunnels.
Give the client its configuration file.
6) On the server, select the server config and run the program

WireGuard Windows setup (7)

7) On the client add configuration file to WireGuard.Add Tunnel→Select client configuration file->Open

WireGuard Windows setup (8)

Select client config and run

WireGuard Windows setup (9)

This completes the configuration of the first client, similarly configuring the other clients by adding their data to the server config (step 4)

Auto-start WireGuard after a server restart.

1) Add the startup file to the Windows scheduler autorun:Start→taskschd.msc

WireGuard Windows setup (10)

Click on "Create simple task" → Enter a Name for the task (e.g. wireguard) → Next

WireGuard Windows setup (11)

Select "On computer startup"→ Next

WireGuard Windows setup (12)

Select "Start programme"→ Next

WireGuard Windows setup (13)

In the "Program or Script" field, select our file to run WireGuard (default is "C:\Program Files\WireGuard\wireguard.exe")
Add arguments:

/installtunnelservice "C:\Program Files\WireGuard\wg_server.conf"

where:

C:\Program Files\WireGuard\wg_server.conf - расположение конфигурационного файла *.conf

WireGuard Windows setup (14)

Check "Open the Properties window for this task after you have clicked 'Done'"→ Done

WireGuard Windows setup (15)

In the window that opens, tick the "Run with the highest rights"→OK

WireGuard Windows setup (16)

Done. Do a reboot, check

WireGuard Windows setup (2024)

FAQs

How to set WireGuard on Windows? ›

WireGuard Windows setup
  1. Download the current version for Windows: https://www.wireguard.com/install/ and install.
  2. Run C:\Program Files\WireGuard\wireguard.exe and add an empty tunnel (we will configure the server side): ...
  3. Add another empty tunnel (we will configure the client side): Add tunnel → Add empty tunnel.

How to import WireGuard config windows? ›

Open WireGuard, click on "Import tunnel from file," and select the WireGuard compressed file or . conf file. Alternatively, click on "Add tunnel" at the bottom left corner and manually fill in all the settings.

How do I run WireGuard as non administrator Windows? ›

Logout and login as the non-admin user. Find the WireGuard program, right-click and select "run as admin" one time. Then reboot and it should work for the non-admin user.

How do I setup a built in Windows VPN? ›

Create a VPN profile
  1. Select Start > Settings > Network & internet > VPN > Add VPN.
  2. Under Add a VPN connection, do the following: For VPN provider, choose Windows (built-in). In the Connection name box, enter a name you'll recognize (for example, My Personal VPN). ...
  3. Select Save.

Is WireGuard a good VPN? ›

Is WireGuard secure? WireGuard is considered by many to be one of the safest, most secure VPN protocol options available today. Simplified design using less code equals fewer bugs and security vulnerabilities, while WireGuard's faster state-of-the-art cryptography employs superior default security settings.

Where do I put the config file for WireGuard? ›

The config files are generally stored in the /etc/wireguard folder. Create a new configuration file called wg0. conf in that folder.

How to set up WireGuard VPN client? ›

  1. Step 1: Expose Wireguard VPN Server to the Internet. Your Public IP Address. ...
  2. Step 2: Setup Wireguard VPN Server. Install the wireguard software and dependencies. ...
  3. Step 3: Setup client connections. ...
  4. Step 4: Setup clients. ...
  5. Step 5: Test Connection.
Sep 29, 2023

How do I create a tunnel in WireGuard Windows? ›

Configure a WireGuard Tunnel
  1. Navigate to VPN > WireGuard > Tunnels.
  2. Click. ...
  3. Fill in the WireGuard Tunnel settings as described in WireGuard Package Settings.
  4. Click Save Tunnel.
  5. Add firewall rules on Firewall > Rules, WAN tab to allow UDP traffic to the port for this WireGuard tunnel (WireGuard and Rules / NAT)
May 1, 2023

How do I manually set a WireGuard? ›

I have a key pair
  1. Go to Surfshark's login page and log in. Then, visit VPN > Manual setup. Choose the Desktop or mobile option and click on WireGuard.
  2. In the next window, click on I have a key pair.
  3. Name your key pair and click Next.
  4. Enter your public key and hit Save.
Jun 19, 2024

Which is more secure, WireGuard or OpenVPN? ›

There are no known security flaws in either protocol. If security is your topmost priority, the conservative option is OpenVPN. It has simply been around much longer than WireGuard, gone through more third-party security audits, and has a far longer track record than WireGuard.

Does WireGuard need a public IP address? ›

No. When using WireGuard, your public WireGuard IP address is temporarily left in memory (RAM) during connection. By default, WireGuard deletes this information if this server has been rebooted or if the WireGuard interface has restarted.

How to configure WireGuard? ›

Basic knowledge of networking and command-line tools.
  1. Step 1: Installing WireGuard. The installation process varies depending on your operating system. ...
  2. Step 2: Configuring the WireGuard Server. ...
  3. Step 3: Configuring WireGuard Clients. ...
  4. Step 4: Connecting the Client to the Server. ...
  5. Step 5: Securing Your WireGuard VPN.
Mar 14, 2024

How do I turn on WireGuard? ›

Autostart WireGuard in systemd
  1. Generate a valid and working WireGuard configuration file /etc/wireguard/wg0. ...
  2. Add the WireGuard service to systemd: ...
  3. Start the new service immediately: ...
  4. Reboot your computer system to verify the automatic connection on startup works as expected.
  5. Check the service status:

How do I setup an OpenVPN on Windows? ›

Windows Installation Guide for OpenVPN Connect with Access Server
  1. Open a browser and navigate to your Access Server Client Web UI.
  2. Sign in with your username and password.
  3. Click on the Windows icon.
  4. Wait until the download completes, then open it.
  5. Run the OpenVPN Connect setup wizard.
  6. Agree to the EULA and install.

How to auto start WireGuard? ›

Re: wireguard at startup

This involved placing a configuration file (e.g. wg0. conf) in /etc/wireguard, then using systemctl enable wg-quick@wg0 to start it. Also systemctl start/stop/disable to control it. Disabling it prevents it from starting at boot.

Top Articles
Latest Posts
Article information

Author: Terence Hammes MD

Last Updated:

Views: 6208

Rating: 4.9 / 5 (49 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Terence Hammes MD

Birthday: 1992-04-11

Address: Suite 408 9446 Mercy Mews, West Roxie, CT 04904

Phone: +50312511349175

Job: Product Consulting Liaison

Hobby: Jogging, Motor sports, Nordic skating, Jigsaw puzzles, Bird watching, Nordic skating, Sculpting

Introduction: My name is Terence Hammes MD, I am a inexpensive, energetic, jolly, faithful, cheerful, proud, rich person who loves writing and wants to share my knowledge and understanding with you.