OpenVPN Installation Tutorial on Ubuntu 18.04 Only 5 Minutes

When entering this article, it seems that you already understand what OpenVPN is and its uses. If you want to create a private OpenVPN, then what is needed is a server or VPS that has high internet speeds.

In addition, the required server specifications also do not need to be high. Even with 512 RAM it is also strong enough to run OpenVPN as a server. But if you search the internet for tutorials on the OpenVPN installation process, it seems that a lot of people share very long steps, which is a bit tedious to set up for multiple servers at once.

But here I will give a fairly quick and practical step in installing a special OpenVPN on Ubuntu version 18.04. It only takes approx 5 minutes Of course, you can already enjoy Private OpenVPN without any problems.

Installing OpenVPN on Ubuntu 18.04

Before starting, it’s best to set up a VPS server with Ubuntu 18.04 OS first. And I myself use a VPS from Amazon to make it. In addition, the tutorial described here directly uses the terminal, without the need to manage anything on the desktop.

Immediately, follow the steps to install OpenVPN below:

1. Download

By wearing bash script, the installation process can be done very quickly. Here is the command to download the file:

wget -O

Later a file named will appear in the directory you are currently in.

2. Starting the OpenVPN Installation Process

Use the command below to start the installation:

sudo bash

Then several questions will appear to configure OpenVPN configuration. It includes Public IP, Protocol, Port, DNS, and also the client name. Here’s an example image:

OpenVPN Installation Process on Ubuntu 18.04

After finishing setting up the configuration, the installation process package will start and continue setting up the configuration automatically.

3. Copy OVPN Configuration and Run

When the installation process is complete, the configuration with the OVPN format will basically be directly stored in the main directory, which is in ~/ or /home/username/

So there will appear a file with the OVPN format, please use it to run OpenVPN on the client device.

If OpenVPN can connect properly, it means you have successfully installed OpenVPN on Ubuntu 18.04.

And in addition, you can add. delete the client, and so on by using the command sudo bash

OpenVPN Solution Won’t Connect

There are times when the client side has problems, where the connection to the server can’t connect well. And most of it is a firewall problem that exists in the VPS. So please open the port that is used on OpenVPN so that it can be used, it can be done through the firewall settings on the VPS you are using.

For settings iptables there’s nothing to change or add, because the bash script above has set it up automatically pretty well.

Some people sometimes also experience problems where OpenVPN can connect, but does not have an internet connection. This is most likely due to a problem routing on iptables. And I prefer to reinstall.

Also read: How to Create a SOCKS5 Proxy on an Ubuntu VPS


Compared to manually installing OpenVPN, using the method above is much faster. So it is very suitable for those of you who want to install OpenVPN for many servers at once, because it is very practical.

As for the other users who developed bash script almost the same, or maybe some kind of modification. The script brings more features. If you are interested, here is the URL of the script.

If you have any questions regarding the OpenVPN installation tutorial above, please ask questions in the comments column for assistance.

Hopefully useful and good luck