This comes up a lot from people about to rent a VPS specifically to run a VPN, and it's a fair question — but the answer is less dramatic than the search results usually suggest.
The short answer
In the vast majority of countries — the US, UK, EU member states, Canada, Australia, most of Latin America and Asia — running your own VPN server is completely legal. VPNs are ordinary networking tools used constantly by businesses, remote workers, and anyone who wants a private connection. Renting a VPS and installing WireGuard, AmneziaWG, or VLESS on it is no different, legally, than installing any other server software.
What's illegal is doing illegal things through a VPN — that was already illegal before you added encryption to it. The VPN itself isn't the legal issue.
Where it actually gets complicated
A small number of countries either heavily restrict or effectively ban unauthorized VPN use, most commonly ones with strict state control over internet access: China, Russia, and a few others maintain rules requiring VPNs to be government-approved or banning them outright for general use. Belarus, Turkmenistan, and North Korea are even more restrictive.
If you're in or traveling to one of these countries, "is it legal" isn't a question with a universal answer — it depends on local law and how strictly it's enforced, which is genuinely worth researching for your specific country rather than assuming.
Running one vs. what you do with it
Two separate questions get conflated constantly:
- Is operating VPN server software legal? — Yes, almost everywhere, full stop.
- Is what I'm doing on the internet legal? — Depends entirely on the activity, with or without a VPN.
A VPN changes who can see your traffic. It doesn't change what's legal to do with it. Downloading something you don't have rights to is still infringement whether you do it over a VPN or not; the VPN just means your ISP doesn't see it happening.
Terms of service is a different question from law
Your hosting provider's terms of service is a separate matter from what's legally permitted. Most mainstream VPS providers explicitly allow running a personal VPN — it's an extremely common use case. A few budget or specialty providers restrict it in their acceptable-use policy, so it's worth a quick check of your specific provider's terms before assuming, though this is about contract terms with your host, not law.
The actual point of running your own
For most people asking this question, the honest motivation isn't evading law — it's evading a commercial VPN provider's logging policy, which you have no way to verify. Running your own VPN server means the only party with access to your traffic is you, which is a privacy improvement over a commercial service, not a legal gray area.
Nullsify installs VLESS, AmneziaWG, or WireGuard on a VPS you rent and control — the same category of server software as anything else you'd install, on infrastructure you're already legally entitled to use however you configure it. See how it works →