> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrading Anaconda Server

* [Upgrading to a newer version](#upgrading-to-a-newer-version)
* [Upgrading from 6.1.4 to 6.1.5 or 6.1.6](#upgrading-from-6-1-4-to-6-1-5-or-6-1-6)

<Warning>
  Before you upgrade, create backups of the `docker-compose.yml` and `.env` files. These files contain your server’s custom configurations and are overwritten during the upgrade.
</Warning>

## Upgrading to a newer version

Anaconda Server versions 6.1.4 and later support upgrading from your current version without halting the program.

### Upgrade steps

1. Download your installer by running the command:

   ```sh theme={null}
   # Replace <INSTALLER_LOCATION> with the provided installer location
   curl -O <INSTALLER_LOCATION>
   ```

2. Run the upgrade command.

**Default upgrade command**

To upgrade Anaconda Server using the default upgrade command, run:

```sh theme={null}
# Replace <INSTALLER> with the installer you just downloaded
# Replace <PATH_TO_REPO_FOLDER> with the path to your repository - the default path is /opt/anaconda/repo
# Replace <FQDN> with your fully qualified domain name
# Replace <PREVIOUS_INSTALLER> with the location of the previous installer file (where the docker-compose.yml is located)
bash <INSTALLER>  -- -b <PATH_TO_REPO_FOLDER> -d <FQDN> --upgrade-from ../<PREVIOUS_INSTALLER>
```

For example, if your domain name is *website.example.com*, and the previous installer is located at */home/user/installers/ate-installer-6.1.6-7d5m23wl*, then the upgrade command would be the following:

```sh theme={null}
bash as-installer-6.2.0-0fj4r5a1.sh -- -b /opt/anaconda/repo -d website.example.com --upgrade-from ../ate-installer-6.1.6-7d5m23wl
```

**HTTPS setup upgrade command**

The default command will upgrade your software, but your setup may require you to append more arguments to the command in order to complete an upgrade. For example, if your setup uses HTTPS protocol, you’ll need to provide the TLS certificate and key in your installation command:

```sh theme={null}
# Replace <INSTALLER> with the installer you just downloaded
# Replace <PATH_TO_REPO_FOLDER> with the path to your repository - the default path is /opt/anaconda/repo
# Replace <FQDN> with your fully qualified domain name
# Replace <PATH_TO_CERT> and <PATH_TO_KEY> with your TLS certificate and key paths
# Replace <PREVIOUS_DIR> with the location of the previous installation (where the docker-compose.yml is located)
bash <INSTALLER> -- -b <PATH_TO_REPO_FOLDER> --domain <FQDN> --tls-cert <PATH_TO_CERT> --tls-key <PATH_TO_KEY> --upgrade-from ../<PREVIOUS_INSTALLER>
```

You can see a full list of command arguments by running the following commands:

```sh theme={null}
# Replace <INSTALLER> with the installer you just downloaded
cd <INSTALLER>
bash ./install.sh --help
```

**Custom implementation considerations**

If you’re using a custom implementation, verify your `docker-compose.yml` and/or `repo.conf` (nginx configuration) files reflect the upgraded changes.

## Upgrading from 6.1.4 to 6.1.5 or 6.1.6

<Warning>
  Before you upgrade, you must ensure that the correct permissions are set for the service account. If you do not, the Keycloak API will not be able to query user roles and users will lose all their assigned permissions.
</Warning>

1. Open a browser and log in to your Keycloak admin panel using your existing Keycloak credentials. Your Keycloak admin panel can be found at [www.YOUR\\\_DOMAIN/auth/admin](http://www.YOUR\\_DOMAIN/auth/admin).
2. Navigate to the **Clients** page from the left-hand navigation menu, then select *repo-account-sync* from the list.
3. Select the **Service Account Roles** tab at the top of the page, then open the **Client Roles** dropdown menu and select *realm-management*.
4. Add `manage-users` and `manage-realm` to the **Assigned Roles**.

### Upgrade steps

1. Download your installer by running the command:

   ```sh theme={null}
   # Replace <INSTALLER_LOCATION> with the provided installer location
   curl -O <INSTALLER_LOCATION>
   ```

2. Run the upgrade command.

**Default upgrade command**

To upgrade Anaconda Server using the default upgrade command, run:

```sh theme={null}
# Replace <INSTALLER> with the installer you just downloaded
# Replace <PATH_TO_REPO_FOLDER> with the path to your repository - the default path is /opt/anaconda/repo
# Replace <FQDN> with your fully qualified domain name
# Replace <PREVIOUS_INSTALLER> with the location of the previous installer file (where the docker-compose.yml is located)
bash <INSTALLER>  -- -b <PATH_TO_REPO_FOLDER> -d <FQDN> --upgrade-from ../<PREVIOUS_INSTALLER>
```

For example, if your domain name is *website.example.com*, and the previous installer is located at */home/user/installers/ate-installer-6.1.5-6l1f9s7v*, then the upgrade command would be the following:

```sh theme={null}
bash as-installer-6.1.6-7d5m23wl.sh -- -b /opt/anaconda/repo -d website.example.com --upgrade-from ../ate-installer-6.1.5-6l1f9s7v
```

**HTTPS setup upgrade command**

The default command will upgrade your software, but your setup may require you to append more arguments to the command in order to complete an upgrade. For example, if your setup uses HTTPS protocol, you’ll need to provide the TLS certificate and key:

```sh theme={null}
# Replace <INSTALLER> with the installer you just downloaded
# Replace <PATH_TO_REPO_FOLDER> with the path to your repository - the default path is /opt/anaconda/repo
# Replace <FQDN> with your fully qualified domain name
# Replace <PATH_TO_CERT> and <PATH_TO_KEY> with your TLS certificate and key paths
# Replace <PREVIOUS_DIR> with the location of the previous installation (where the docker-compose.yml is located)
bash <INSTALLER> -- -b <PATH_TO_REPO_FOLDER> --domain <FQDN> --tls-cert <PATH_TO_CERT> --tls-key <PATH_TO_KEY> --upgrade-from ../<PREVIOUS_INSTALLER>
```

You can see a full list of command arguments by running the following commands:

```sh theme={null}
# Replace <INSTALLER> with the installer you just downloaded
cd <INSTALLER>
bash ./install.sh --help
```

**Custom implementation considerations**

If you’re using a custom implementation, verify your `docker-compose.yml` and/or `repo.conf` (nginx configuration) files reflect the upgraded changes.
