---
title: Upgrading Factry Historian
slug: how-tos/rHSX-upgrading-factry-historian
createdAt: 2025-09-05T07:31:35.272Z
---

## Prerequisites

- Access to the Factry Historian portal, which is granted when purchasing a license.

## Download Factry Historian installation executable

Login to the Factry Historian Portal and download the Factry Historian installation executable for your CPU architecture.

1. Navigate to [https://portal.factry.cloud](https://portal.factry.cloud)
2. Login with your credentials
3. Once logged in, click Downloads in the header menu
4. In the Downloads panel:
   - Select a release channel (`Stable`)
   - Select a product (`Factry Historian`)
   - Select a version
   - Select an OS/Platform (`Linux/AMD64`)
5. For an offline installation, click **Download** to download the binary and manually copy it to the host system. For installation on a system with internet access, click **Copy URI** to copy the link and download it with e.g. `wget`.
6. We recommend to also download the Metadata file to verify the signature.
7. Place to executable (and metadata file) on a location where you have write access e.g. your home folder.

## Verify Signature

Download Factry's public key from our portal.

```bash
wget https://portal.factry.cloud/download/products.pem
```

Then verify the binary against the provided signature, replacing `vx.x.x` with the correct version.

```bash
openssl dgst -sha256 \
  -verify products.pem \
  -signature <(sed -n 's/.*"Signature": "\(.*\)".*/\1/p' factry-historian-server_vx.x.x.meta \
    | sed 's/\\n/\n/g' \
    | base64 -d) \
  factry-historian-server_vx.x.x
```

If the output is `Verified OK`, then proceed with the next steps. If not, retry downloading the binary / signature file.

## Upgrade PostgreSQL

Historian version 8 increases the minimum supported PostgreSQL version from 11 to 12. As this is a major version increase, this requires a manual upgrade step for PostgreSQL. Instructions for this can be found in the official [PostgreSQL documentation](https://www.postgresql.org/docs/current/upgrading.html).

## Upgrade Factry Historian

To upgrade an existing historian installation you can use the upgrade command.

```bash
sudo chmod a+x factry-historian-server_vx.x.x_linux-x64
sudo ./factry-historian-server_vx.x.x_linux-x64 upgrade
```

### Command-line flags

| Name                               | Description                                                              | Default value |
| ---------------------------------- | ------------------------------------------------------------------------ | ------------- |
| --clone                            | Clone the database to a new database before migrating                    | true          |
| --keep-old                         | Keep the old database after successfully migrating when clone is enabled | false         |
| --skip-reading-release-notes or -s | Skip release notes confirmation before upgrading                         | false         |
