Back to blog
January 13, 2026Guides

How to Host Your Own Private VPN (WireGuard)

Step-by-step guide to setting up a personal, secure WireGuard VPN on your Hiddence VPS for complete privacy.

How to Host Your Own Private VPN (WireGuard)

Digital privacy is more important than ever. Public VPN services are convenient, but they can still log your data or fall victim to breaches. The only way to be 100% sure of your privacy is to host your own VPN. WireGuard is the modern standard: faster, simpler, and more secure than OpenVPN. Here is how to set it up on your anonymous Hiddence VPS.

Why Host Your Own VPN?

  • No Logs Policy: You control the server, so you know exactly what is logged (nothing, if you choose).
  • Better Performance: No sharing bandwidth with thousands of other users.
  • Dedicated IP: Access IP-restricted networks or banking apps without triggering fraud alerts.
  • Cost Effective: A single VPS can serve VPN to all your devices.

Prerequisites

  • A Hiddence VPS (Ubuntu 24.04 or 22.04 recommended)
  • Root access (provided by default)
  • 5 minutes of your time

Server-Side Setup

1. Install WireGuard

bash
sudo apt update && sudo apt upgrade -y
sudo apt install wireguard -y

2. Generate Keys

bash
wg genkey | tee privatekey | wg pubkey > publickey
cat privatekey
# Save this private key!
cat publickey
# Save this public key!

3. Configure Interface

bash
sudo nano /etc/wireguard/wg0.conf
# Add the following content:
[Interface]
PrivateKey = <YOUR_SERVER_PRIVATE_KEY>
Address = 10.0.0.1/24
ListenPort = 51820
SaveConfig = true
PostUp = ufw route allow in on wg0 out on eth0
PostUp = iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
PostDown = ufw route delete allow in on wg0 out on eth0
PostDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

[Peer]
PublicKey = <YOUR_CLIENT_PUBLIC_KEY>
AllowedIPs = 10.0.0.2/32

Client-Side Setup

Install the WireGuard app on your phone or PC. Create a new tunnel and paste the client configuration:

  • Interface PrivateKey: <YOUR_CLIENT_PRIVATE_KEY>
  • Interface Address: 10.0.0.2/32
  • Peer PublicKey: <YOUR_SERVER_PUBLIC_KEY>
  • Peer Endpoint: <YOUR_VPS_IP>:51820
  • Peer AllowedIPs: 0.0.0.0/0 (to route all traffic)