How to setup Wireguard on Server and configure local systems
A simple guide and list of resources to setup Wireguard.
Watch this Video to understand how to setup Wireguard the easiest way. https://www.youtube.com/watch?v=yvPL_9cPYD4
Install WireGuard on the VPS / Windows Server
On your VPS, go to https://www.wireguard.com/install/ and download the Windows installer
- Run the installer
- Open WireGuard → click Add Tunnel → Add empty tunnel
- WireGuard generates a public/private key pair automatically
- Configure the tunnel (this is the server config — save it):
ini[Interface]
PrivateKey = <auto-generated, leave as is>
Address = 10.0.0.1/24
ListenPort = 51820
[Peer]
PublicKey = <your laptop's WireGuard public key — generated in next step>
AllowedIPs = 10.0.0.2/32
Save and Activate the tunnel
Install WireGuard on Your Laptop
Download and install WireGuard on your laptop from the same site
- Click Add Tunnel → Add empty tunnel
- Note the public key shown — this goes into the server config’s [Peer] section above
Configure your laptop’s tunnel:
ini[Interface]
PrivateKey =
Address = 10.0.0.2/24
[Peer]
PublicKey =
Endpoint = YOUR_VPS_IP:51820
AllowedIPs = 10.0.0.1/32
PersistentKeepalive = 25
Activate the tunnel
Open Port 51820 Instead of 445
In your hosting provider’s firewall, open UDP port 51820 (WireGuard’s port) instead of TCP 445. Port 445 should remain closed.
Setup Network Drive
Once WireGuard is connected on both ends, map the drive using the VPN’s internal IP instead of the public IP: \10.0.0.1\SharedFiles This is now fully encrypted and safe.
Other resources
https://www.youtube.com/watch?v=Gm-jE_4E7Y0 How to setup a Windows File Server Share with Security Permissions
https://www.youtube.com/watch?v=dFqX0Y0xt3g How to Setup a Shared Folder on Windows Server 2022
https://www.youtube.com/watch?v=FDhndiAEyxs How to Setup Active Directory Domain on Windows Server 2022 | A Step by Step Guide