Skip to content
  • Bitcoin accepted
  • MMonero accepted
  • DMCA-resilient
  • Anonymous signup
  • ΞEthereum accepted
  • No KYC
  • 99.99% uptime
  • 24/7 support
  • 7-day money-back
  • Provisioned in < 5 min
  • Iceland · Switzerland · Netherlands
  • USDT accepted
Bitcoin accepted. Monero accepted. DMCA-resilient. Anonymous signup. Ethereum accepted. No KYC. 99.99% uptime. 24/7 support. 7-day money-back. Provisioned in under 5 minutes. Iceland, Switzerland, Netherlands. USDT accepted.
MurmurHost
Get started
Networking~15 minUpdated 2026-08-13

How do I set up a WireGuard VPN on a VPS?

Install WireGuard on your VPS, generate a key pair, and configure the server and client with a simple config file. Then start the interface and test the connection.

This guide will help you set up your own WireGuard VPN server on a VPS, giving you secure and fast encrypted tunneling. You'll have full control over your VPN, with no logs and no third-party dependencies.

Prerequisites: a VPS with a public IP address (any MurmurHost VPS plan works, starting at $8/mo), root or sudo access, and a local client (Windows, macOS, Linux, or mobile).

  1. 1

    Install WireGuard

    SSH into your VPS and install WireGuard. On Ubuntu/Debian: sudo apt update && sudo apt install wireguard. On CentOS/RHEL: sudo yum install epel-release && sudo yum install wireguard-tools.
  2. 2

    Generate server keys

    Generate a private and public key pair for the server: wg genkey | tee server_private.key | wg pubkey > server_public.key. Keep the private key secret.
  3. 3

    Create server config

    Create /etc/wireguard/wg0.conf with the following content, replacing ServerPrivateKey with your server's private key and ServerIP with your VPS's public IP:
    [Interface]
    Address = 10.0.0.1/24
    SaveConfig = true
    ListenPort = 51820
    PrivateKey = ServerPrivateKey
    
    [Peer]
    PublicKey = ClientPublicKey
    AllowedIPs = 10.0.0.2/32
  4. 4

    Enable IP forwarding

    Enable IP forwarding on the server: echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.conf && sudo sysctl -p. Also set up NAT with iptables if you want clients to access the internet: sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE (replace eth0 with your main interface).
  5. 5

    Start WireGuard

    Start the WireGuard interface and enable it on boot: sudo systemctl start wg-quick@wg0 and sudo systemctl enable wg-quick@wg0.
  6. 6

    Generate client keys and config

    On your local machine, generate a client key pair: wg genkey | tee client_private.key | wg pubkey > client_public.key. Create a client config file (e.g., client.conf) with:
    [Interface]
    PrivateKey = ClientPrivateKey
    Address = 10.0.0.2/24
    DNS = 1.1.1.1
    
    [Peer]
    PublicKey = ServerPublicKey
    Endpoint = ServerIP:51820
    AllowedIPs = 0.0.0.0/0
  7. 7

    Add client to server

    On the server, add the client's public key to the config: sudo wg set wg0 peer ClientPublicKey allowed-ips 10.0.0.2/32. If you used the config file, restart WireGuard: sudo systemctl restart wg-quick@wg0.
  8. 8

    Test the connection

    Import the client config into your WireGuard client app (or use wg-quick up client.conf on Linux). Ping the server: ping 10.0.0.1. Then check your public IP to confirm traffic is routed through the VPN.

Make sure your VPS firewall allows UDP port 51820. MurmurHost includes DDoS protection, but you may still want to configure a firewall for extra security. Since MurmurHost is offshore and no-KYC, you can set up your VPN with complete privacy, paying with Monero or Bitcoin if you wish.

Frequently asked questions

What is the default port for WireGuard?+
The default port is 51820/UDP, but you can change it to any port you like in the config file.
Can I use WireGuard on a MurmurHost VPS?+
Yes, any MurmurHost VPS plan supports WireGuard. The entry VPS at $8/mo has 1 vCPU, 2 GB RAM, and 25 GB NVMe, which is more than enough for a personal VPN.
How do I make WireGuard start automatically on boot?+
Use systemd: sudo systemctl enable wg-quick@wg0. This will start the VPN interface every time your server boots.
Is WireGuard faster than OpenVPN?+
Yes, WireGuard is generally faster and more efficient because it uses modern cryptography and runs in the kernel. It also has a smaller codebase, making it easier to audit and secure.

Deploy your first offshore server in 60 seconds.

Anonymous signup. Bitcoin & Monero accepted. Provisioned across 8 jurisdictions.

No credit card required · 7-day money-back guarantee