How to set up OpenVPN Access Server on any VPS
Easily turn any VPS into a VPN server
There are many benefits to running your own VPN server on a VPS, such as saving money, having additional privacy and control, or just getting more out of your existing service. Today we’ll go over how to do it, even if you’re a beginner. It will only take a few minutes.
First, install Debian 11 on a VPS
For this guide, we’ll be using Debian 11. If you have Ubuntu, this guide should still work, but for other distributions you may have to make some modifications. We will be using our $1.50 a month Value+ VPS with our standard Debian 11 minimal template, but you can use any other VPS. We recommend at minimum 384MB of RAM.
Connect via SSH
Not sure how? View our other tutorial here.
Add the OpenVPN Repository & Install OpenVPN-AS
First, run an apt update. Then, install the pre-requisites.
apt update && apt -y install ca-certificates wget net-tools gnupg
Add the OpenVPN repository.
wget https://as-repository.openvpn.net/as-repo-public.asc -qO /etc/apt/trusted.gpg.d/as-repository.asc echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/as-repository.asc] http://as-repository.openvpn.net/as/debian bullseye main">/etc/apt/sources.list.d/openvpn-as-repo.list
Run another update & install OpenVPN-AS
apt update && apt -y install openvpn-as
The above command will output the Admin UI URL, the Client UI URL, as well as the default “openvpn” username and provided password.
Visit the Client UI URL & Download OpenVPN Connect
In your browser, copy/paste the URL provided after installation is successful. There will be a security error. We can safely ignore this warning as you are connecting to your own server but if you’d like for it to go away, you just need to install an SSL certificate after pointing a domain to your server (we will not be covering that on this guide.)
Click “Proceed” (on Chrome) and then click “Proceed” again.
Enter the username & password provided to you after the installation. and click “Sign In”
Now, you’ll be presented with an option to download OpenVPN connect. Click the button for recommended device, and the download will begin. Once complete, open and complete the installation.
On OpenVPN connect, click the “+” button to add a server if it did not already automatically get added during the installation. You can enter the IP address of your VPS on the “URL” and then use the same username and password, and click “Import”
Then click the toggle button to activate the VPN, and enter your password one more time. You’re done!