HostOnNet Blog

Install OpenVPN Server On Ubuntu

Looking for Linux Server Admin or WordPress Expert? We can help.

To install OpenVPN, go to

Download software for your OS.

For Ubuntu download and install it with

dpkg -i openvpn-as-2.1.4b-Ubuntu16.amd_64.deb

You will see

root@backup:~# dpkg -i openvpn-as-2.1.4b-Ubuntu16.amd_64.deb
Selecting previously unselected package openvpn-as.
(Reading database ... 91797 files and directories currently installed.)
Preparing to unpack openvpn-as-2.1.4b-Ubuntu16.amd_64.deb ...
Unpacking openvpn-as (2.1.4b-Ubuntu16) ...
Setting up openvpn-as (2.1.4b-Ubuntu16) ...
The Access Server has been successfully installed in /usr/local/openvpn_as
Configuration log file has been written to /usr/local/openvpn_as/init.log
Please enter "passwd openvpn" to set the initial
administrative password, then login as "openvpn" to continue
configuration here:
To reconfigure manually, use the /usr/local/openvpn_as/bin/ovpn-init tool.

Access Server web UIs are available here:
Admin  UI:
Client UI:

Before you can access Admin UI, you need to set password for user “openvpn”.

To change password, run

passwd openvpn


root@backup:~# passwd openvpn
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Now you can access OpenVPN Admin area at

User = openvpn
Pass = the one you set in above step.

You can login to client area and download cliient.ovpn from


Once logged in to OpenVPN client area, you will see

Click on “user-locked profile” link to download your OpenVPN configuration file – client.ovpn

On Ubuntu Desktop, you need to install OpenVPN with command

apt install openvpn

Now to connect, run

openvpn --config /path/to/client.ovpn

To disconnect from OpenVPN, type CTRL+C or just close the terminal that is running openvpn.

To configure OpenVPN through NetworkManager, you need to install

sudo apt-get install network-manager-openvpn-gnome

Stop/Start OpenVPN

OpenVPN systemd service file located in /etc/systemd/system/openvpnas.service

To start OpenVPN, run

systemctl start openvpnas

To stop, run

systemctl stop openvpnas

Posted in Ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.