Home / Guides / How to self-host a WireGuard VPN on a VPS
How-to

How to self-host a WireGuard VPN on a VPS

Deploy a no-KYC VPS, install WireGuard from the official quick start, and keep the UDP port and keys on a box you control.

WireGuard VPN on a BitCloudVPS - you run the tunnel
Short answer

Rent a VPS, install WireGuard from the official quick start, and keep keys and the UDP port on a machine you administer. BitCloudVPS does not operate the VPN.

Why a VPS instead of a consumer VPN app

A rented VPS is just Linux with a public IP. You install WireGuard official site yourself. Public VPN brands document the same protocol: Mullvad: WireGuard, Proton VPN: WireGuard configs, IVPN: WireGuard on Linux. They sell an app and a fleet. If you buy a no-KYC VPS with crypto, you keep the private key on a box you control. Outline (Jigsaw) is the same idea with a simpler installer. BitCloudVPS does not operate the VPN; you get root.

Business $24/mo (6 vCPU / 16 GB DDR5) is the production size. Crypto invoice, no KYC.

Launch now

What you do

Playbook
  1. Order a VPS (Starter is enough for a few peers). Amsterdam if users are in the EU; Iceland if jurisdiction is the reason.
  2. Follow WireGuard quick start: generate keys, set Address/ListenPort, add peers, enable wg-quick.
  3. Open the UDP port you chose (51820 is the default). Editable PTR is optional.
  4. Pay the host with USDT if you want a stable bill, or BTC if that is the wallet you hold.

Limits

A self-hosted VPN hides the path from your ISP to the VPS. It does not hide you from the VPS provider, the datacenter, or a court that can reach the rack. The AUP still bans scanning, spam, and attacks through the tunnel.

Prerequisites: kernel module, UDP port, and key hygiene

WireGuard needs three things from a VPS before the first config line: a modern kernel with the WireGuard module (any current Linux image qualifies - it has been in-tree since 5.6), one open UDP port for the listener - 51820 by default, and nothing on the BitCloudVPS network side filters it - and a plan of key hygiene. The hygiene part is where self-hosters cut corners: generate keypairs on the server with umask 077, never reuse a keypair across peers, and treat the server's private key as the thing that, once leaked, lets an attacker decrypt past sessions captured by a passive observer. For a personal tunnel this is a five-minute discipline, not an architecture. Sizing is equally undramatic: WireGuard forwarding saturates far below what any plan's CPU can push, so Nano at $5.49/mo list ($3/mo effective on the flat $36/yr annual) is a genuine option for one or two devices, and Starter at $8.50/mo with 4 GB ECC RAM is the pick the moment the box does anything else. Unmetered 1-10 Gbps ports mean the tunnel's throughput conversation is between your line and the EPYC core, not a bandwidth cap.

Numbered install: from empty server to first handshake

  1. Deploy the VPS - about 60 seconds to a root shell - and update the system.
  2. Install wireguard-tools and generate the server keypair: wg genkey for private, wg pubkey for public, written to /etc/wireguard/ with restrictive permissions.
  3. Write /etc/wireguard/wg0.conf: the server's Address (a private /24 like 10.0.0.1/24), ListenPort 51820, and a PostUp/PostDown NAT pair if clients should reach the internet through the tunnel.
  4. Enable IP forwarding in sysctl, bring the interface up with wg-quick up wg0, and enable it at boot.
  5. On each client device, generate a keypair, add the server as peer with its public key and endpoint IP:51820, then add the client's public key to the server's config and reload.
  6. Verify with wg show: a recent handshake and transfer counters moving both directions confirm the tunnel end to end.

Fifteen minutes on a clean box, most of it typing on the client. The official quick-start documents every command verbatim.

Adding peers, DNS, and split tunneling

Peer management is the ongoing life of a self-hosted VPN, and it is all text-file edits. Each device gets one keypair and one AllowedIPs entry on the server side - revoke access by deleting the peer line, no passwords to rotate. AllowedIPs on the client side is the routing decision: 0.0.0.0/0 sends everything through the tunnel (full tunnel), while specific ranges - your homelab subnet, the server's private /24 - give split tunneling where only chosen destinations ride the VPN. DNS is the detail that breaks full tunnels: set the interface's DNS to a resolver that is reachable through the tunnel - Unbound on the VPS itself is a common pairing - or your client leaks queries to the local resolver around the route. IPv6 peers get addresses from the server's /64 block, which every plan includes, so dual-stack tunnels need no extra purchase. A Keepalive of 25 seconds on roaming devices keeps NAT mappings alive. Finally, decide the policy question explicitly: friends on your box means their traffic exits your IP and falls under the AUP - issuing keys is taking responsibility for what leaves the server.

Hardening the endpoint after the first handshake

A VPN endpoint is internet-facing by design, so the rest of the box needs the standard pass: keys-only SSH with password auth disabled, default-deny firewall that admits SSH, the WG port and whatever the box serves, and unattended security updates. Fail2ban on SSH is cheap insurance. Change the SSH port only if you prefer quieter logs - it is cosmetic, not security. Keep an eye on wg show during the first weeks: peers you did not create are a compromised-config alarm, not a curiosity. Snapshot before config experiments so a broken wg0.conf is a two-minute rollback rather than a console session. And re-generate the server keypair if there is any reason to believe it left the box - rotating is deleting two lines and pushing new client configs. That is the whole maintenance story: WireGuard has no daemon to crash, no logs to manage beyond what you choose to keep, and no subscription to renew - just a $3-$8.50/mo invoice payable in any of 19 crypto assets with no KYC, renewed quarterly at -10% or yearly at -20%.

Choosing the exit rack: latency, jurisdiction, and what the endpoint exposes

The direct answer: pick the WireGuard exit location the way you would pick any production endpoint — by who needs to reach it and under which legal flag you want it to sit, not by price, because the tunnel plan itself is rarely the expensive part. If your users are European, the Amsterdam rack (NL-AMS, under 1 ms to AMS-IX) or Frankfurt (DE-FRA, ~8 ms to AMS) answers handshake pings before your client finishes rendering the spinner; Zurich sits ~9 ms away on a 100 Gbps uplink; Reykjavik trades ~18 ms for an Iceland flag. If your users are in Southeast Asia, Singapore (~40 ms to HKG, SGIX peering) or Tokyo (JPIX/JPNAP, 100 Gbps) are the honest picks; an EU exit for APAC users adds 180-230 ms to every packet and no MTU tuning fixes that.

What the endpoint exposes is the second half of the decision. A WireGuard server has exactly one open UDP port and no web surface, so the fingerprint scanners see is minimal — but the IP itself inherits the rack's reputation, and everything the tunnel carries exits from that one address. BitCloudVPS gives each VPS a dedicated IPv4 plus a /64 IPv6 block with no NAT sharing, which matters twice: your tunnel traffic never mixes with another tenant's, and the IPv6 block lets you hand each peer its own outbound address instead of funnelling everyone through the v4. Jurisdiction is a per-rack property — 21 sites under 21 legal overlays, with Harborline Node Ltd. (Saint Kitts and Nevis) as the contracting entity everywhere — so the flag you want is a dropdown choice at deploy time, not a different product.

Sizing the tunnel: why Nano covers a personal VPN and Starter covers a team

The direct answer: encryption overhead is small and WireGuard holds no state between handshakes, so the plan that fits is decided by throughput and peer count, not by RAM. A personal tunnel — one or two devices, browsing and remote access — runs comfortably on the Nano line: $5.49/mo list, or the flat $36/yr annual price that works out to $3/mo. WireGuard's crypto is kernel-side (ChaCha20-Poly1305), and an EPYC-class shared vCPU saturates far more bandwidth than a home connection can pull, so the honest bottleneck is the port and your own uplink, not the VM.

A team tunnel changes the arithmetic in two places. First, peer count: twenty colleagues with always-on connections want routing table hygiene, DNS forwarding, maybe an nginx front for internal dashboards — the Starter plan (2 vCPU EPYC 7443P, 4 GB ECC, 60 GB NVMe, 1 Gbps port, $8.50/mo) is the comfortable fit. Second, exit bandwidth: every plan ships an unmetered 1-10 Gbps port, so a dozen heavy users do not trip a traffic counter, but they do share one IPv4 exit unless you split them across the IPv6 /64 or across two cheap boxes. If you also tunnel site-to-site — an office network to a private rack in another jurisdiction — put the second endpoint on its own Nano and keep the two tunnels independent; at $36/yr per side, redundancy is cheaper than debugging a single point of failure. ECC RAM on every plan is a quiet benefit for a long-lived router box: memory errors on a month-old gateway look exactly like flaky handshakes and waste an evening.

BitCloudVPS Nano · your own WireGuard endpoint · $36/yr flat

Deploy in 60 seconds

Troubleshooting handshakes: symptom, cause, fix

The direct answer: nearly every WireGuard failure is one of four things — a firewall eating UDP, a stale key after redeploy, a clock too far off for the handshake window, or an MTU black hole. Work them in that order.

  1. Symptom: latest handshakes stays at 0 on both sides. Cause: the UDP port is filtered. Fix: confirm the listener with wg show and ss -ulnp | grep 51820, then from outside run nc -u -v SERVER_IP 51820. On BitCloudVPS inbound filtering is not applied by default, so a silent port almost always means your own ufw/nftables ruleset — add ufw allow 51820/udp before you blame the host.
  2. Symptom: it worked yesterday, dead after you rebuilt the server. Cause: the private key changed with the reinstall; the peers still carry the old public key. Fix: either restore the original /etc/wireguard/wg0.conf from backup (see the keys section below) or push the new public key to every peer. Handshakes are mutual — half a key pair matches nothing.
  3. Symptom: handshake succeeds, TCP connects, large transfers stall at a few KB. Cause: MTU. Tunnel overhead eats 60-80 bytes, and PMTUD breaks through some client networks. Fix: set MTU = 1380 in the interface config and test with ping -M do -s 1350 10.0.0.1; raise until it breaks, then back off.
  4. Symptom: peers drop exactly every two minutes of idle. Cause: no PersistentKeepalive behind NAT'd client networks. Fix: PersistentKeepalive = 25 on the client side; the server side never needs it.

How to verify a fix end to end: sudo wg show must list a fresh handshake (seconds, not minutes), then curl ifconfig.me from a peer must print the exit server's IP, not your home address. Both checks green means the tunnel, not just the control plane, is working.

Throughput, latency and DNS: what a 1-10 Gbps port actually delivers to peers

The direct answer: expect the tunnel to run at roughly wire speed minus 5-15% for encryption, provided you fix three things that regularly cap it — MTU, single-queue interrupts on tiny instances, and DNS that resolves over the wrong path. Unmetered means no traffic cap, not infinite instantaneous bandwidth; the port on your plan (1 Gbps on Starter-class, up to 10 Gbps on larger lines) sets the ceiling per stream.

Measure before tuning: from a peer, iperf3 -c 10.0.0.1 over the tunnel against the same test to the public IP tells you exactly what encryption costs on your instance. Single-stream results on a 1-core Nano will read a few hundred Mbps — that is a CPU ceiling, and parallel streams (-P 4) recover most of it thanks to WireGuard's per-peer parallelism. If a 10 Gbps-class plan still benches low, check ethtool -k wg0-style offloads are not the culprit and that you are not testing through a congested client-side uplink; the exit side on AMS-IX/DE-CIX-connected racks is rarely the constraint. Latency is rack geography, full stop: an Amsterdam exit answers European peers in single-digit milliseconds, Tokyo answers Hong Kong in ~30 ms, and no config change moves packets across continents faster.

DNS deserves its own paragraph because it is where 'the VPN leaks' complaints actually come from. Push DNS explicitly in the peer config (DNS = 10.0.0.1, 1.1.1.1 with a local unbound or dnsmasq on the box if you want queries inside the tunnel), verify with a resolver that echoes your exit IP, and remember split-DNS: a tunnel that force-routes all DNS will break corporate SSO on work laptops. Route what needs the tunnel with AllowedIPs precision — 0.0.0.0/0 is a declaration, not a default.

BitCloudVPS Starter · 2 vCPU EPYC · 1 Gbps unmetered · $8.50/mo

Deploy in 60 seconds

Keys, backups and the payment trail: keeping the endpoint yours and unnamed

The direct answer: back up the private key and peer list outside the server, snapshot the config before every reinstall, and pay for the box in a way that does not tie the exit IP to a card statement — on this checkout that part is structural, not an add-on.

Operationally, /etc/wireguard/wg0.conf plus each peer's config is the whole state of your VPN; a 2 KB tarball stored in an encrypted vault makes any server disposable. The one mistake that costs a weekend is regenerating the server key casually: every device peer must be re-touched by hand. Rotate keys deliberately — for example when a laptop leaves the team — not as routine hygiene, because the handshake crypto already rotates session keys internally on a timer. If you redeploy often, script it: write the config from a template with the server key injected at boot, keep the key in your secret manager, and the 'stale key after redeploy' failure mode from the troubleshooting section disappears.

On the payment trail: signup works with a token only and email is optional, checkout is crypto-only across 19 assets — BTC, XMR, ETH, BNB, SOL, LTC, TRX, XRP, DOGE, DASH, ADA, GRAM on TON, and USDT on seven networks — and no tier asks for documents. XMR is the pick when the on-chain link between your identity and the exit IP is what you are avoiding; USDT on TRC-20 when you want a stable price and low fees on a $36 Nano renewal. Billing terms apply the same as everywhere: month at list, quarter -10%, year -20%. One practical note: because the exit IP is shared by everyone you tunnel through it, treat the server key, the payment method and the account token as one identity cluster — if those must be separated for a given threat model, run a second Nano under a separate token rather than complicating one.

A private WireGuard endpoint on this sheet: sizing and rack logic

WireGuard is the lightest serious service on this network — kernel-space, a handful of UDP packets per connection, no state to speak of — and the sizing reflects it. The $36/yr Nano is the canonical personal endpoint: one user, a few devices, full line-rate forwarding on the unmetered 1–10 Gbps port. A household or small team shares a Starter at $6.80/mo annual with room for other services alongside. Anything heavier — a site-to-site tunnel with real throughput, a multi-user egress with per-peer accounting — wants Business at $24 annual, and the honest bottleneck there is the uplink class (10 Gbps at IS-RKV, 40–100 Gbps at CH-ZRH, DE-FRA, NL-AMS), not the plan's CPU.

Rack selection is the actual design decision, because a VPN endpoint is where jurisdiction and route quality meet. Latency-first: NL-AMS under 1 ms to AMS, DE-FRA ~8 ms, CH-ZRH ~9 ms — a European egress that feels local worldwide when the route is good. Law-first: IS-RKV (Tier IV / N+1, FICIX, outside the 14 Eyes) is the privacy default; KZ-ALA and AE-DXB extend the map where Western egress is unwanted. Regional egress for geo-particular workloads: BR-SAO on IX.br, SG-SIN on SGIX, MX-MEX — and since every pin prices identically, running two endpoints in different jurisdictions is a $72/yr decision, not a sales conversation. Each VM carries a dedicated IPv4 and a /64 IPv6, which matters for an egress IP's reputation; DDoS scrubbing ships included against the retaliation endpoints sometimes attract. The checkout stays identity-free end to end — token signup, optional email, XMR or any of 19 assets at settlement, Harborline Node Ltd. of Saint Kitts and Nevis behind the invoice. The honest limit: the endpoint moves your traffic's exit point; what your devices broadcast above the tunnel remains yours.

Where the limits are (October 2026)

Keep the threat model precise. Anonymous-adjacent hosting removes the host-side identity trail: token-only signup, optional email, no KYC review, crypto invoices that record a txid rather than a name. It does not blind the host to traffic it must carry, it does not make a logged-in panel session anonymous, and it does not protect workloads that identify themselves — an admin login from your home IP defeats the whole design. Exact limits of no-KYC anonymity. OPSEC guide. Full checklist. Payment-side note: chain analysis happens on public blockchains, not at the host. Coin choice and network choice are your OPSEC knobs, and the checkout keeps 19 of them open.

Do you sell a VPN app?

No. You install WireGuard, OpenVPN, or Outline on the VM.

Is KYC required?

No. Email, password, crypto invoice.

Why does my handshake fail after redeploying the VPS?

A redeploy generates a new server keypair, so every client config now holds a stale server public key. Regenerate and redistribute the server's public key to each peer, or restore your backed-up /etc/wireguard directory before starting the interface.

Can WireGuard share port 443 with a web server?

Not the same protocol-port pair - WireGuard is UDP and a web server is TCP, so udp/443 and tcp/443 coexist fine. Some restrictive networks only pass TCP, where WireGuard genuinely cannot run and a TCP-based wrapper is the fallback.

Which plan should a five-person team tunnel run on?

Starter at $8.50/mo (2 vCPU, 4 GB ECC, 60 GB NVMe, 1 Gbps unmetered port) is the comfortable fit for five always-on peers plus routing and DNS duties. Nano at $5.49/mo — or $36/yr flat — handles a personal two-device tunnel without strain, since WireGuard's kernel-side crypto leaves plenty of headroom on a shared EPYC core.

How do I keep the same WireGuard config after reinstalling the VPS?

Back up /etc/wireguard/wg0.conf and each peer config outside the server. After a reinstall, restore the same server private key and the peers reconnect with no device-side changes — handshakes fail only when the reinstall generates a new key that peers do not recognize.

Where should a WireGuard exit server live?

Pick from 21 datacenters with real peering — Reykjavik, Zurich, Tokyo, Singapore, Sao Paulo and Almaty among them, with exchanges like AMS-IX, DE-CIX, SGIX and HKIX on the network. Choose the site closest to your clients; the port stays unmetered either way.

What does the host actually know about me?

Whatever you hand over: a signup token, an optional email address, the invoice you paid and the service traffic. No ID documents, no phone number, no KYC step exists to hand anything else over.

What won't an anonymous VPS protect against?

Self-inflicted links: personal logins from a home IP, leaked cookies, services that publish your address, and on-chain patterns that tie wallets together. The server removes one identifier; it does not fix operational mistakes.

Primary sources

Ready to launch?

Configure a VPS or dedicated server, set a password, then pay the invoice.

Network

Edge RTT

Uptime · 36h

Complaints · 36h

Pick a city