# Update OpenVPN

Older OpenVPN builds will have connection issues with newer client releases. To fix this issue run the command below to install the newer OpenVPN package from the Pritunl repository. A TCP server can also be used as a workaround to fix some of the issues.

## RHEL, Oracle Linux, Alma Linux, AmazonLinux

The `pritunl-openvpn` package is available on all the Pritunl RHEL repositories and will provide the latest version of OpenVPN.

```shell
sudo yum swap openvpn pritunl-openvpn
```

```shell
sudo yum --allowerasing install pritunl-openvpn
```

This can be reverted by running the command below.

```shell
sudo yum --allowerasing install openvpn
```

## Ubuntu

For Ubuntu use the [**OpenVPN Debian/Ubuntu repositories**](https://community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos) by running the commands below.

```shell
sudo tee /etc/apt/sources.list.d/openvpn.list << EOF
deb [ signed-by=/usr/share/keyrings/openvpn-repo.gpg ] https://build.openvpn.net/debian/openvpn/stable focal main
EOF
curl -fsSL https://swupdate.openvpn.net/repos/repo-public.gpg | sudo gpg -o /usr/share/keyrings/openvpn-repo.gpg --dearmor --yes
sudo apt update
sudo apt --assume-yes install openvpn
```

```shell
sudo tee /etc/apt/sources.list.d/openvpn.list << EOF
deb [ signed-by=/usr/share/keyrings/openvpn-repo.gpg ] https://build.openvpn.net/debian/openvpn/stable jammy main
EOF
curl -fsSL https://swupdate.openvpn.net/repos/repo-public.gpg | sudo gpg -o /usr/share/keyrings/openvpn-repo.gpg --dearmor --yes
sudo apt update
sudo apt --assume-yes install openvpn
```

```shell
sudo tee /etc/apt/sources.list.d/openvpn.list << EOF
deb [ signed-by=/usr/share/keyrings/openvpn-repo.gpg ] https://build.openvpn.net/debian/openvpn/stable noble main
EOF
curl -fsSL https://swupdate.openvpn.net/repos/repo-public.gpg | sudo gpg -o /usr/share/keyrings/openvpn-repo.gpg --dearmor --yes
sudo apt update
sudo apt --assume-yes install openvpn
```

```shell
sudo tee /etc/apt/sources.list.d/openvpn.list << EOF
deb [ signed-by=/usr/share/keyrings/openvpn-repo.gpg ] https://build.openvpn.net/debian/openvpn/stable buster main
EOF
curl -fsSL https://swupdate.openvpn.net/repos/repo-public.gpg | sudo gpg -o /usr/share/keyrings/openvpn-repo.gpg --dearmor --yes
sudo apt update
sudo apt --assume-yes install openvpn
```

```shell
sudo tee /etc/apt/sources.list.d/openvpn.list << EOF
deb [ signed-by=/usr/share/keyrings/openvpn-repo.gpg ] https://build.openvpn.net/debian/openvpn/stable bullseye main
EOF
curl -fsSL https://swupdate.openvpn.net/repos/repo-public.gpg | sudo gpg -o /usr/share/keyrings/openvpn-repo.gpg --dearmor --yes
sudo apt update
sudo apt --assume-yes install openvpn
```

```shell
sudo tee /etc/apt/sources.list.d/openvpn.list << EOF
deb [ signed-by=/usr/share/keyrings/openvpn-repo.gpg ] https://build.openvpn.net/debian/openvpn/stable bookworm main
EOF
curl -fsSL https://swupdate.openvpn.net/repos/repo-public.gpg | sudo gpg -o /usr/share/keyrings/openvpn-repo.gpg --dearmor --yes
sudo apt update
sudo apt --assume-yes install openvpn
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pritunl.com/kb/vpn/system/openvpn-update.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
