VPN Server on Ubuntu VPS
Hello there!
Today I will show you how to install OpenVPN server on the latest version of Ubuntu Linux (26.04 as of writing) in a matter of a few minutes. 🙂
I have been working on a series of small projects to run on my virtual private server and, of course, this has me spinning up VPN’s quite often so I figured I would make a quick video on how to do it.
Let’s begin…
Requirement
The only requirement will be either a virtual private server (VPS) or any old laptop, computer, raspberry PI will do.
I highly recommend using a VPS since it can also be useful for other projects. Personally I have been using Hostinger’s KVM 2 virtual private server for a few years and its both reliable and not too expensive (around $15 monthly).
Going with a VPS will give you root access plus a panel with a summary of network usage, storage, etc. which ends up being very useful depending on what projects you are running. Also, since it’s all virtualized, the time to spin up a new fresh copy of Ubuntu or any other Linux is usually just a few minutes.
If you decide to use a computer on your network as a server, just remember you will need to open these ports on your router to allow for incoming connections (port forwarding options).
Installation
We will be using the following community script from angristan’s github.
The commands are very straightforward:
curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh
chmod +x openvpn-install.sh
sudo ./openvpn-install.sh install
This will download the script and install OpenVPN server with default settings. It will also drop a client.ovpn file in the current directory you are operating from. Note this user is unsecured (does not have a password).
If you want to add a new user, revoke a user, view certificates, etc. Check the interactive menu:
sudo ./openvpn-install.sh interactive
I highly recommend adding a new user with a password and revoking the default user.
Client Access
After installing OpenVPN server all we need is a client to access it.
That client will be OpenVPN Connect preferably. You can download it for pretty much any operating system (Windows, Mac, Linux, Android, iPhone and more), check supported systems here.
Make sure you have your .ovpn client file handy so you can import it to OpenVPN Connect and you are good to go.
Final Words
As you may have already noticed, I usually make these short posts also as a brain dump for myself so that if I need to set this up again in the near future I have it all documented in one place and can get it done quickly.
I am planning on continuing a series of projects on my VPS and will be posting them here… if you have any suggestions please drop a comment below and, if possible, I will get it done.





Leave a Comment