Overview
What is WireGuard?
WireGuard is a fast, modern, secure VPN tunnel that uses state-of-the-art cryptography.
WireGuard is a fast, modern, secure VPN tunnel that uses state-of-the-art cryptography.
Before You Begin
You'll need:
- A configuration file (.conf) from the tunnel configuration
- Or a QR code to scan (for mobile devices)
- WireGuard client software installed on your device
Basic Setup Process
- Download and install WireGuard for your platform
- Import your configuration file or scan QR code
- Activate the tunnel connection
- Test your connection
Download WireGuard: wireguard.com/install/
Windows Setup
Step 1: Download WireGuard
- Go to wireguard.com/install/
- Click "Windows 7, 8, 10, 11" to download the installer
- Run the installer as Administrator
- Follow the installation wizard
Screenshot Placeholder: Windows WireGuard installer will appear here
Step 2: Import Configuration
- Open WireGuard from the Start menu
- Click "Import tunnel(s) from file"
- Browse to your
.conffile and select it - The tunnel will appear in the left panel
Screenshot Placeholder: Windows WireGuard client with import dialog will appear here
Step 3: Connect
- Select your tunnel from the list
- Click "Activate"
- The status should change to "Active"
- You'll see data transfer statistics
Windows Defender: You may need to allow WireGuard through Windows Firewall
macOS Setup
Step 1: Install WireGuard
Choose one method:
Method A: Mac App Store
- Open the Mac App Store
- Search for "WireGuard"
- Install the official WireGuard app
Method B: Direct Download
- Go to wireguard.com/install/
- Click "macOS" to download
Step 2: Import Configuration
- Open WireGuard from Applications
- Click "Import tunnel(s) from file"
- Select your
.conffile - The tunnel will appear in the sidebar
Screenshot Placeholder: macOS WireGuard client will appear here
Step 3: Activate Tunnel
- Select your tunnel
- Toggle the switch to "On"
- Confirm any security prompts
System Permissions: macOS may prompt for keychain access and network extension permissions
Linux Setup
Installation
Ubuntu/Debian:
sudo apt update
sudo apt install wireguard
CentOS/RHEL/Fedora:
# CentOS/RHEL
sudo yum install epel-release
sudo yum install wireguard-tools
# Fedora
sudo dnf install wireguard-tools
Arch Linux:
sudo pacman -S wireguard-tools
Configuration
- Copy your config file to WireGuard directory:
sudo cp your-config.conf /etc/wireguard/wg0.conf - Set proper permissions:
sudo chmod 600 /etc/wireguard/wg0.conf - Start the tunnel:
sudo wg-quick up wg0
Auto-start on Boot
sudo systemctl enable wg-quick@wg0
sudo systemctl start wg-quick@wg0
Useful Commands
| Command | Description |
|---|---|
sudo wg show |
Show active WireGuard interfaces |
sudo wg-quick up wg0 |
Start tunnel |
sudo wg-quick down wg0 |
Stop tunnel |
ip addr show wg0 |
Show interface details |
iOS & Android Setup
Installation
iOS (iPhone/iPad):
- Open the App Store
- Search for "WireGuard" by WireGuard Development Team
- Install the official app
Android:
- Open Google Play Store
- Search for "WireGuard" by WireGuard Development Team
- Install the official app
Screenshot Placeholder: Mobile app store listings will appear here
Adding a Tunnel
Method 1: QR Code (Recommended)
- Open the WireGuard app
- Tap the "+" button
- Select "Create from QR code"
- Point camera at QR code from web interface
- Give the tunnel a name
- Tap "Save"
Method 2: Import File
- Email or transfer the
.conffile to your device - Open the WireGuard app
- Tap "+" → "Create from file or archive"
- Browse and select your config file
- Tap "Save"
Screenshot Placeholder: Mobile QR code scan interface will appear here
Connecting
- Select your tunnel from the list
- Toggle the switch to connect
- Allow VPN permissions if prompted
- Look for the VPN icon in your status bar
Mobile Tips
Battery Optimization: Disable battery optimization for the WireGuard app to prevent disconnections
- iOS: Enable "Connect On Demand" for automatic connections
- Android: Enable "Always-on VPN" in system settings
- Monitor data usage if on a limited plan
Advanced Configuration
Understanding the Config File
[Interface] PrivateKey = your-private-key-here # Your device's private key (keep secret!) Address = 44.190.40.10/24 # Your IP address in the VPN network DNS = 1.1.1.1, 1.0.0.1 # DNS servers to use [Peer] PublicKey = server-public-key-here # Server's public key Endpoint = 203.0.113.1:51820 # Update with PoP node's IP AllowedIPs = 0.0.0.0/0 # Which traffic to route through VPN PersistentKeepalive = 25 # Keep connection alive (NAT traversal)
Common Configuration Options
| Setting | Description | Example |
|---|---|---|
AllowedIPs |
Traffic to route through VPN | 0.0.0.0/0 (all traffic)44.0.0.0/9, 44.129.0.0/10 (44net only) |
DNS |
DNS servers to use | 1.1.1.1, 8.8.8.8 |
PersistentKeepalive |
Keep connection alive (seconds) | 25 (recommended) |
MTU |
Maximum packet size | 1420 (default) |
Split Tunneling
Route only specific traffic through the VPN:
AllowedIPs = 44.0.0.0/9, 44.128.0.0/10 # Route only 44.0.0.0/9 & 44.128.0.0/10 through VPN AllowedIPs = 0.0.0.0/0 # Route everything
Troubleshooting Commands
Linux:
# Check interface status
sudo wg show
# View logs
journalctl -u wg-quick@wg0 -f
# Test connectivity (Example, use your IP)
ping 44.190.40.1
# Check routing
ip route show
Windows:
# Command Prompt (Example, use your IP)
ping 44.190.40.1
ipconfig /all
route print
Security Best Practices
Important Security Notes:
- Never share your private key
- Use strong, unique keys for each device
- Regularly rotate keys
- Only connect to trusted servers
- Monitor your connections regularly