Enhance your online privacy with a self-hosted OpenVPN or WireGuard VPN. Commercial services like Mullvad or ProtonVPN are convenient, but running your own gives you full control over the server, the protocol, and who has access, without relying on a third party's logging policy or shared infrastructure.
VPNs are primarily used for privacy, security, and a degree of anonymity online. This walkthrough covers how to stand up a private VPN on your own server in a few simple steps, using well-known open-source installers.
You own the stack end to end. That means your traffic stays on infrastructure you control, you get a dedicated egress IP (if your server has one), and you avoid paying extra for dedicated IPs that commercial providers often charge for.
WireGuard is a modern VPN protocol built for high performance, strong cryptography, and a small codebase. It tends to be faster and lighter on resources than older options like OpenVPN or IPsec, making it a good default for a personal VPS.
OpenVPN is mature, flexible, and supports a wide range of encryption options. It is open source and runs everywhere. It may not match WireGuard on raw speed, but it remains a solid, well-tested choice when compatibility or specific cipher requirements matter.
SSH into your server and run:
wget https://git.io/wireguard -O wireguard-install.sh && bash wireguard-install.sh
Follow the prompts:
myVPN
Press any key to start installation. The script installs WireGuard and displays a QR code you can scan with the mobile client. It also writes a config file to /root/myVPN.conf for import on desktop or other devices. Download or copy that file if QR scanning is not an option, import it into your WireGuard app, and connect.
SSH into the server and run:
wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh
Walk through IP, protocol, port, and DNS selections. Defaults are safe when unsure. The script generates an .ovpn file under /root. Copy or download it, import into your OpenVPN client, and connect.
Re-run the same install script anytime to add clients, revoke access, or remove the VPN entirely from the server.
Review any install script before running it on a production box. The WireGuard and OpenVPN installers referenced here are open source and widely used, and still worth a quick look at the source if you are hardening a server.
All rights reserved