Easiest way: install the STOSPN DPN app for Linux (.deb for Ubuntu), sign in with your STOSPN account and click Connect. To use the OpenVPN 3 command-line client instead, follow the steps below with the .ovpn profile from My Account → Orders.
To install and set up OpenVPN Connect (OpenVPN 3 Linux Client) on Ubuntu, follow these steps:
1. Install Prerequisites: Prerequisite: Root or sudo access.
- Open your terminal (
Ctrl+Alt+T). - Ensure your package index is updated and install required HTTPS dependencies:
Bash
sudo apt update && sudo apt install -y curl gnupg apt-transport-https ca-certificates
2. Add Official OpenVPN Repository Key:
- Create the keyrings directory:
Bash
sudo mkdir -p /etc/apt/keyrings
- Download and import the OpenVPN GPG repository signing key:
Bash
curl -fsSL https://packages.openvpn.net/packages-repo.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/openvpn-repo.gpg
3. Add OpenVPN 3 Repository:
- Add the official OpenVPN 3 repository targeting your installed Ubuntu release:
Bash
echo "deb [signed-by=/etc/apt/keyrings/openvpn-repo.gpg] https://packages.openvpn.net/openvpn3/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/openvpn3.list
4. Install OpenVPN 3 Client:
- Refresh package lists to include the new repository:
Bash
sudo apt update
- Install the
openvpn3package:
Bash
sudo apt install -y openvpn3
5. Import Profile and Connect:
- Import your downloaded
.ovpnconfiguration file:
Bash
openvpn3 config-import --config /path/to/your/client.ovpn --name "STOSPN"
- Start the VPN connection:
Bash
openvpn3 session-start --config "STOSPN"
- Enter your VPN username and password if prompted.
- Check active sessions at any time using
openvpn3 sessions-listor disconnect usingopenvpn3 session-manage --config "STOSPN" --disconnect.
Alternative 1: Desktop GUI Integration (NetworkManager)
If you are using Ubuntu Desktop and prefer controlling the VPN via the top-right system settings menu:
Bash
sudo apt update && sudo apt install -y network-manager-openvpn-gnome
After installation, go to Settings > Network > VPN, click +, select Import from file…, and upload your .ovpn profile.
Alternative 2: Standard OpenVPN CLI Daemon
If you only need the legacy standalone daemon without the v3 client suite:
Bash
sudo apt update && sudo apt install -y openvpn
sudo openvpn --config /path/to/your/client.ovpn