OpenVPN 3 KDE Connection Manager Integration (openvpn3-kde-nm)
Native integration between OpenVPN 3 Linux (openvpn3) and KDE Connection Manager (plasma-nm / NetworkManager).
Manage, connect, disconnect, and monitor your OpenVPN 3 profiles directly from KDE System Settings -> Connections and the KDE Plasma Networks System Tray Applet, just like OpenVPN 2—with full support for OpenVPN Cloud / CloudConnexa, WebAuth / SSO browser login, and bidirectional CLI synchronization.
Why This Exists
KDE Connection Manager (plasma-nm) and network-manager-openvpn are built around classic OpenVPN 2.x (/usr/sbin/openvpn), which:
- Strips directives required by OpenVPN Cloud / CloudConnexa such as
setenv USERNAME "..."andsocket-flags TCP_NODELAYwhen importing.ovpnfiles. - Does not integrate with OpenVPN 3's D-Bus architecture (
net.openvpn.v3.configuration,net.openvpn.v3.sessions,net.openvpn.v3.netcfg). - Does not show sessions started via
openvpn3 session-startas Connected inside the KDE Networks tray applet or KDE System Settings.
openvpn3-kde-nm bridges org.freedesktop.NetworkManager.openvpn to OpenVPN 3 so KDE's built-in VPN (openvpn) UI and system tray widget natively control openvpn3.
Architecture
flowchart TB
subgraph KDE["KDE Plasma Desktop"]
KCM["System Settings -> Connections<br/>(plasmanetworkmanagement_openvpnui.so)"]
Tray["KDE System Tray Networks Applet"]
Browser["Web Browser & KDE Notifications<br/>(WebAuth / SSO)"]
end
subgraph NM["NetworkManager (System Bus)"]
NMDaemon["NetworkManager Daemon"]
Plugin["nm-openvpn3-service<br/>(NM.VpnServicePlugin)"]
end
subgraph Sync["User Session Service"]
Watcher["openvpn3-kde-sync.service<br/>(KdeOpenVpn3SyncDaemon)"]
CLI["openvpn3-kde-cli / openvpn3 CLI"]
end
subgraph O3["OpenVPN 3 Linux (D-Bus)"]
CfgMgr["net.openvpn.v3.configuration"]
SessMgr["net.openvpn.v3.sessions"]
NetCfg["net.openvpn.v3.netcfg (tun0)"]
end
KCM <--> NMDaemon
Tray <--> NMDaemon
NMDaemon <--> Plugin
Plugin <--> CfgMgr
Plugin <--> SessMgr
Watcher <--> NMDaemon
Watcher <--> CfgMgr
Watcher <--> SessMgr
Watcher --> Browser
CLI <--> CfgMgr
CLI <--> SessMgr
SessMgr --> NetCfg
Key Features
- Native KDE Connections & System Tray Control:
- Existing
openvpn3profiles (openvpn3 configs-list) automatically appear under VPN in KDE System Settings -> Connections and the KDE Networks tray widget. - Clicking Connect or Disconnect in KDE starts or stops the OpenVPN 3 session.
- Already-running sessions started from the terminal (
openvpn3 session-start --config <name>) automatically attach and display as Connected in KDE without dropping packets or resetting routes.
- Existing
- Bidirectional Deletion & Profile Sync:
- Deleting a VPN connection in KDE System Settings -> Connections automatically disconnects any active session and removes the configuration from
openvpn3(openvpn3 configs-list). - Removing a profile via
openvpn3 config-removeremoves it from KDE Connection Manager.
- Deleting a VPN connection in KDE System Settings -> Connections automatically disconnects any active session and removes the configuration from
- CloudConnexa / OpenVPN Cloud & X.509 CN Recovery:
- Preserves
setenv USERNAME "...",socket-flags TCP_NODELAY,push-peer-info,persist-tun, and inline certificates (<ca>,<cert>,<key>,<tls-auth>,<tls-crypt>). - If a profile is imported via KDE's built-in "Import VPN connection..." button (which strips
setenv USERNAME),openvpn3-kde-nmautomatically recovers the CloudVPN username from the X.509Subject CNof the extractedcert.pem.
- Preserves
- Automatic WebAuth / SSO Browser Login:
- Listens for
StatusMajor.SESSION / StatusMinor.SESS_AUTH_URLD-Bus signals, opens the authentication URL in your default browser, and displays a native KDE desktop notification.
- Listens for
- Live Traffic Statistics & Logs CLI (
openvpn3-kde-cli):- Inspect integration status, watch real-time session byte/packet counters, and tail session logs.
Prerequisites
- OS: Linux with KDE Plasma (
plasma-nm) and NetworkManager (network-manager-openvpn) - OpenVPN 3 Linux:
openvpn3-client(includingpython3openvpn3D-Bus bindings) - Python 3.10+ with system packages:
python3-gi(gi.repository.NM,GLib,Gio)python3-dbus(dbus-python)opensslCLI
Installation
Option 1: Install from PyPI (via pipx)
Because openvpn3, gi (PyGObject), and dbus come from system packages (/usr/lib/python3/dist-packages/), install with --system-site-packages and then run openvpn3-kde-cli install to register the systemd user daemon and NetworkManager root plugin hook:
pipx install --system-site-packages openvpn3-kde-nm
openvpn3-kde-cli install
Option 2: Install from Source
git clone git@github.com:gerosalesc/openvpn3-kde-nm.git
cd openvpn3-kde-nm
./install.sh
What openvpn3-kde-cli install / ./install.sh Does
- Installs and enables the user systemd service
~/.config/systemd/user/openvpn3-kde-sync.service. - Synchronizes your existing
openvpn3configurations (openvpn3 configs-list) with KDE Connection Manager. - Uses PolicyKit (
pkexec) orsudoto:- Install the Python package to
/usr/local/lib/openvpn3-kde-nm(so NetworkManager can execute it inside itsProtectHome=read-onlysystemd sandbox). - Back up
/usr/libexec/nm-openvpn-serviceand/usr/lib/NetworkManager/VPN/nm-openvpn-service.nameto/var/backups/. - Register
/usr/local/libexec/nm-openvpn3-serviceas NetworkManager's OpenVPN service plugin.
- Install the Python package to
Usage
Managing Connections in KDE
- Connect / Disconnect: Open the KDE Networks system tray icon (or System Settings -> Connections), find your OpenVPN 3 profile, and click Connect or Disconnect.
- Remove a Profile: Right-click or select the profile in System Settings -> Connections and click Delete. It will be removed from both KDE Connection Manager and
openvpn3.
CLI Reference (openvpn3-kde-cli)
# Check integration status, synced profiles, and active sessions
openvpn3-kde-cli status
# Watch live traffic statistics (refreshes every second)
openvpn3-kde-cli stats --watch
# Show statistics for a specific profile
openvpn3-kde-cli stats --config ClassMiami4
# Follow live service and session logs
openvpn3-kde-cli logs -f
# Manually trigger profile synchronization
openvpn3-kde-cli sync
# Import a new .ovpn file into both OpenVPN 3 and KDE Connections
openvpn3-kde-cli import /path/to/profile.ovpn --name MyVPN
# Register / update NetworkManager hook and systemd daemon
openvpn3-kde-cli install
# Remove NetworkManager hook and restore OpenVPN 2
openvpn3-kde-cli uninstall
# Display version
openvpn3-kde-cli --version
Uninstallation
To remove the integration and restore the original OpenVPN 2 NetworkManager service:
openvpn3-kde-cli uninstall
(Or ./uninstall.sh from the source checkout.)
If installed via pipx, you can also remove the package afterwards with pipx uninstall openvpn3-kde-nm.
Project Layout
openvpn3-kde-nm/
├── bin/
│ ├── nm-openvpn3-service # NetworkManager VPN service executable
│ ├── openvpn3-kde-cli # CLI management utility
│ └── openvpn3-kde-sync # User session sync & WebAuth daemon
├── openvpn3_kde_nm/
│ ├── data/
│ │ └── openvpn3-kde-sync.service # Bundled systemd user unit template
│ ├── __init__.py # Package version metadata
│ ├── cli.py # CLI implementation (status, stats, logs, sync, import, install, uninstall)
│ ├── config_sync.py # Bidirectional OpenVPN 3 <-> NetworkManager sync
│ ├── installer.py # Self-contained installer & uninstaller logic
│ ├── nm_vpn_service.py # NM.VpnServicePlugin D-Bus implementation
│ ├── ovpn_parser.py # .ovpn parser, PEM extractor, X.509 CN recovery
│ └── session_watcher.py # Session event watcher & WebAuth handler
├── systemd/
│ └── openvpn3-kde-sync.service # systemd user unit
├── CHANGELOG.md
├── LICENSE
├── README.md
├── install.sh
├── pyproject.toml
└── uninstall.sh
License
Released under the MIT License.
Metadata
Release files for openvpn3-kde-nm 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| openvpn3_kde_nm-1.1.0.tar.gz | 29.4 kB | With provenance | Details for openvpn3_kde_nm-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openvpn3_kde_nm-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for openvpn3_kde_nm-1.1.0-py3-none-any.whl |
Total release size: 59.8 kB
Release files / openvpn3_kde_nm-1.1.0.tar.gz
| Download URL | openvpn3_kde_nm-1.1.0.tar.gz |
|---|---|
| Size | 29.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef173210c385c96d552b9b41611e73cda26c37c1c7615c4ba5d942c14588cf10
|
|
BLAKE2b-256 checksum How to use checksums |
6e68236ca97e4befceda1769e5c442037cf65edf277e48363e0a3f3940ac203b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logRelease files / openvpn3_kde_nm-1.1.0-py3-none-any.whl
| Download URL | openvpn3_kde_nm-1.1.0-py3-none-any.whl |
|---|---|
| Size | 30.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a8958a10b9edcac641ad7f005cd02a87f22500e82d47d01e759334034a8b2b1
|
|
BLAKE2b-256 checksum How to use checksums |
6e4506fa1272f1bd67dbe04a54980f77874bbc21819f2b9c52751135e45ac114
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logSecurity for openvpn3-kde-nm 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for openvpn3_kde_nm-1.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.