Setting up your own VPN server fails in a handful of predictable ways. Almost every error falls into one of four stages, and once you know which stage you're in, the fix is usually short. This page lists the common failures in the order you'll meet them, with a link to the full fix for each.
If you'd rather see the whole process first, how to make your own VPN walks through it from renting the server to a working connection.
Stage 1: Logging in to the server
You can't install anything until SSH works. Start with the exact error text, because each one means something different:
- "Connection timed out": your packets never reach the server. Wrong IP, a firewall at the host, or a stopped server. Fix: SSH connection timed out.
- "Connection refused": the server answered, but nothing accepts connections on that port. Fix: SSH connection refused.
- "Permission denied (publickey)": wrong username, wrong key, or a key with the wrong permissions. Fix: SSH permission denied.
- "REMOTE HOST IDENTIFICATION HAS CHANGED": you rebuilt the server and your computer remembers the old one. Fix: SSH host identification changed.
If none of those fit, can't SSH into your new VPS is a step-by-step diagnosis that covers all of them in order.
Stage 2: Preparing the server
- "Could not get lock /var/lib/dpkg/lock-frontend": the server is busy with its own first-boot updates. Wait a few minutes. Fix: apt lock error.
- The operating system isn't supported: use Ubuntu, Debian or a Red Hat family system on a 64-bit server. Pre-flight checklist.
- No IPv4 address: some cheap plans are IPv6-only, and a VPN you install there can't be reached from most networks. VPN on an IPv6-only VPS.
- "Operation not supported" or "Protocol not supported" when creating the interface: a container VPS without the kernel feature WireGuard needs. Fix: Operation not supported, and VPNs on OpenVZ and LXC.
Stage 3: Installing the VPN
- "Address already in use": another program, usually a web server, holds port 443. Fix: address already in use, and VPN and website on one VPS.
- "resolvconf: command not found" from wg-quick: a DNS line in the config needs a tool the server lacks. Fix: resolvconf not found.
- The Xray service fails or restarts in a loop: a config error, a bad key or a missing data file. Fix: Xray service won't start.
- Setup fails on AlmaLinux, Rocky or CentOS: usually firewalld or SELinux. VPN on the Red Hat family.
- Oracle Cloud setup "works" but nothing connects: two firewalls, both closed. Oracle Cloud VPN not working.
- An error from Nullsify's own setup: setup errors explained.
Stage 4: Connecting
The install finished, but the app won't connect, or connects with no internet. A 10-minute debugging checklist finds the cause in order. The usual suspects, each with a fix page:
- Handshake did not complete: almost always a blocked UDP port.
- Connected but no internet: forwarding, NAT, DNS or MTU.
- The app won't import the config: an AmneziaWG config opened in the plain WireGuard app.
- AmneziaWG not connecting and VLESS connected but no internet.
- Works on Wi-Fi but not mobile data: the network is blocking your protocol.
To check a port instead of guessing, see how to check whether your VPN port is open.
The pattern behind most failures
Look at that list again and notice how few causes repeat: a firewall that's closed, a port that's taken, a login that doesn't match, or a server type that can't do the job. That's why a quick check of those four things solves most installs.
Every common problem also has its own page in the Fix my VPN section, searchable by error message.