How to install OpenVPN on a Cloud VPS
Updated 7/18/2026
OpenVPN gives you a private VPN server for secure remote access and encrypted browsing, with full control over who connects.
Running the network service on your own VPS keeps traffic inside your infrastructure, with a dedicated IP and no third-party restrictions.
One-click install on cloudlinux.ro
The fastest way: OpenVPN installs automatically at the first boot of a new server.
- Create a Cloud VPS from the control panel.
- In the configuration step, pick OpenVPN from the app catalog.
- Start the server. The install runs in the background for a few minutes and its status shows on the server page.
- Access details and generated passwords are saved on the server in
/root/app-credentials.txt.
Manual install on any Ubuntu server
If you prefer doing it yourself, below is the exact script our automatic install runs. Execute it as root on a fresh Ubuntu server (24.04 recommended). It stops at the first error, and when it finishes you will find the access details in /root/app-credentials.txt.
export DEBIAN_FRONTEND=noninteractive
curl -fsSL https://get.docker.com | sh
IP=$(hostname -I | awk '{print $1}')
docker volume create ovpn_data
docker run -v ovpn_data:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u "udp://${IP}"
docker run -v ovpn_data:/etc/openvpn --rm -e EASYRSA_BATCH=1 -e EASYRSA_REQ_CN=cloudlinux-vpn kylemanna/openvpn ovpn_initpki nopass
docker run -d --name openvpn --restart=always -v ovpn_data:/etc/openvpn \
-p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn
docker run -v ovpn_data:/etc/openvpn --rm -e EASYRSA_BATCH=1 kylemanna/openvpn easyrsa build-client-full client1 nopass
docker run -v ovpn_data:/etc/openvpn --rm kylemanna/openvpn ovpn_getclient client1 > /root/client1.ovpn
printf 'OpenVPN: %s:1194/udp\nProfilul de client este in /root/client1.ovpn, descarca-l prin SFTP si importa-l in aplicatia OpenVPN.\nClienti noi: docker run -v ovpn_data:/etc/openvpn --rm -e EASYRSA_BATCH=1 kylemanna/openvpn easyrsa build-client-full NUME nopass\n' "$IP" > /root/app-credentials.txt
You can also save this script as a recipe in your account and reuse it on any new server.
Put this guide into practice on your own VPS
EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.
See pricingRelated tutorials
How to install WordPress on a Cloud VPS
Complete WordPress guide: one-click install on cloudlinux.ro or manual setup on any Ubuntu server, step by step.
Updated 7/18/2026ApplicationsHow to install ProjectSend on a Cloud VPS
Complete ProjectSend guide: one-click install on cloudlinux.ro or manual setup on any Ubuntu server, step by step.
Updated 7/18/2026ApplicationsHow to install Prometheus + Grafana on a Cloud VPS
Complete Prometheus + Grafana guide: one-click install on cloudlinux.ro or manual setup on any Ubuntu server, step by step.
Updated 7/18/2026