How to Install OpenVPN Server on Ubuntu

Created on 13 August, 2023 | How to Linux | 566 views

To install an OpenVPN server on Ubuntu, follow these steps:

OpenVPN is a free, open-source VPN (Virtual Private Network) software that allows you to securely connect to a remote network over the internet. In this article, we will guide you through the process of installing OpenVPN on an Ubuntu server.

Installing OpenVPN using a Script.

First, get the script and make it executable:

$ curl -O
$ chmod +x

Then run it:

$ ./

You need to run the script as root and have the TUN module enabled.

The first time you run it, you’ll have to follow the assistant and answer a few questions to setup your VPN server.

When OpenVPN is installed, you can run the script again, and you will get the choice to:

root@ubuntu:~# ./

Welcome to OpenVPN-install!

The git repository is available at:

It looks like OpenVPN is already installed.

What do you want to do?

1) Add a new user

2) Revoke existing user

3) Remove OpenVPN

4) Exit

Select an option [1-4]:

you can add a new user or revoke an existant user .

Updated on 13 August, 2023