# Upgrading the agent

You are strongly encouraged to keep your redirection.io install up-to-date. We regularly push new versions of the agent, which include new features, improvements and fixes. Using the latest version of the agent is always a good idea.

The update can always be run safely, as we do not introduce breaking changes in minor versions of the agent or proxy modules. When breaking changes are required, they are added in a new major version, that can only be used after changing the packages repository URL.

- for the legacy version 2.x, use the repository URLs `https://packages.redirection.io/deb/stable/2` or `https://packages.redirection.io/rpm/stable/2`
- for the current version 3.x, use the repository URLs `https://packages.redirection.io/deb/stable/3` or `https://packages.redirection.io/rpm/stable/3`

## Upgrading to a new major version of the agent and proxy 
Upgrading from a legacy major version to the current version of the agent and the proxy requires to change the APT or RPM packages repositories.

If you use the nginx or Apache module, please note that **the server module must be upgraded to a new major version synchronously with the agent**: when upgrading to the agent 3.x, you must also upgrade the nginx or Apache module to the 3.x branch.

### Debian and APT-based distributions
1. Locate the apt redirection.io configuration files - the should live somewhere under `/etc/apt/sources.list.d` - usually in `/etc/apt/sources.list.d/packages_redirection_io_deb.list`

2. change the repository URL. For example, for the current version (`3.x`) of the agent or the proxies, use:
   
   ```apt
   deb https://packages.redirection.io/deb/stable/3 any main
   deb https://packages.redirection.io/deb/stable/3 bullseye main
   ```

Of course, please choose the right distribution name.

3. Run the other usual upgrade steps, as described below.

4. Once the packages have been updated, please make sure to **restart** both the agent and the web server module services. For example:
   
   ```bash
   sudo systemctl restart redirectionio-agent
   sudo systemctl restart nginx
   ```

### Red Hat and RPM-based distributions
1. Locate the rpm redirection.io configuration files - the should live somewhere under `/etc/yum.repos.d/`

2. change the repository URL. For example, for the current version (`3.x`) of the agent or the proxies, use:

```rpm
   baseurl=https://packages.redirection.io/rpm/any/stable/3

deb https://packages.redirection.io/rpm/stable/3 any main
   deb https://packages.redirection.io/rpm/stable/3/centos_8 main
   ```

Of course, use your distribution name in the repository URL.

## APT-based distributions
1. Update the apt cache

```bash
   sudo apt update
   ```

2. Update only the agent:

```bash
   sudo apt install --only-upgrade redirectionio-agent
   ```

3. Restart the agent service. Depending on your service manager, it can be one of:

```bash
   sudo systemctl restart redirectionio-agent
   sudo service redirectionio-agent restart
   sudo /etc/init.d/redirectionio-agent restart
   ```

## RPM-based distributions
1. Update the agent:

```bash
   sudo yum update redirectionio-agent
   ```

2. Restart the agent service. Depending on your service manager, it can be one of:

```bash
   sudo systemctl restart redirectionio-agent
   sudo service redirectionio-agent restart
   sudo /etc/init.d/redirectionio-agent restart
   ```

## Binary / manual upgrade
Upgrading the manual way is the same as [the manual installation](/content/documentation/agent-documentation/installing-the-agent#manual-installation/index.html). However, we strongly advise, if possible, to use a package manager to streamline the upgrade process.

This page has been updated on Apr 16, 2026.
