---
title: Downloading and Installing Factry Historian server
slug: how-tos/sWKC-install
createdAt: 2025-09-05T07:13:52.288Z
---

This guide describes how to download and install the Factry Historian server binary on a host system. It is part of a larger guide with [complete installation instructions](docId\:C1i5Q5n3P8RMlJj5LVhxe).

:::hint{type="info"}
If you are looking to test / evaluate Factry Historian instead, follow this guide: [Installing Factry Historian using Docker](docId\:MYrFSdThXLh5xQK06iK-m).
:::

## 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.

::::WorkflowBlock
:::WorkflowBlockItem
Navigate to [https://portal.factry.cloud](https://portal.factry.cloud)
:::

:::WorkflowBlockItem
Login with your credentials
:::

:::WorkflowBlockItem
Once logged in, click Downloads in the header menu
:::

:::WorkflowBlockItem
In the Downloads panel:

1. Select a release channel (`Stable`)
2. Select a product (`Factry Historian`)
3. Select a version
4. Select an OS/Platform (`Linux/AMD64`)
:::

:::WorkflowBlockItem
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`.
:::

:::WorkflowBlockItem
We recommend to also download the Metadata file to verify the signature.
:::

:::WorkflowBlockItem
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.

## Installing Factry Historian

Replace the `factry-historian-server_vx.x.x_linux-x64` filename with the filename of your executable. Perform the command(s) in the CLI:

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

The Factry Historian installation prompts you for a few questions (Leave empty and press `Enter` to use the default value):

- The postgreSQL admin `username` and `password` (created when installing PostgreSQL)
- The postgreSQL `database name` to create **(use default&#x20;**`factry_historian`**&#x20; is recommended)**
- The postgreSQL `host`, `port` and `SSL mode` to connect to
- A valid JWT secret or leave empty to generate one

:::BlockQuote
Provide a username to connect to the postgres server with. Leave empty for default (factry) value.
Username \[factry]:
Provide a password to connect to the postgres postgres server with.
Password:
Confirm password:
Provide a name for the database. Leave empty for default (factry\_historian) value.
Database name \[factry\_historian]:
Provide a host to connect to the postgres with. Leave empty for default (localhost) value.
Host \[localhost]:
Provide a port to connect to the postgres with. Leave empty for default (5432) value.
Port \[5432]:
Provide an SSL mode to connect to the postgres with (disable|require|verify-ca|verify-full). Leave empty for default (disable) value.
SSL mode \[disable]: :
Provide a secret to sign the JWT with. Leave empty to generate one.
Secret:
Confirm secret:
:::

**Verify if Factry Historian is running**

```bash
sudo systemctl status factry-historian-server
```

**Defaults**

Factry Historian has the following defaults:

- **Default systemd service file**: `/etc/systemd/system/factry-historian-server.service`
- **Default environment file**: `/etc/systemd/system/environments/factry-historian-server`
- **Default user**: `factry-system-user`

:::hint{type="warning"}
Make sure the environment file is only readable by the file owner, as it contains usernames, passwords and secrets.
:::

### Configuration

The Factry Historian server can be configured using environment variables. If left empty, the server will use the listed default values.

All variables starting with ‘DB\_’ refer to the main Postgresql configuration database.

| **Name**                 | **Default value**      | **Description**                                                                                                                                                |
| ------------------------ | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| DB\_HOST                 | 127.0.0.1              | PostgreSQL host                                                                                                                                                |
| DB\_NAME                 | factry\_historian      | Name of the database to connect to                                                                                                                             |
| DB\_USER\_NAME           | factry                 | User to connect to the database with                                                                                                                           |
| DB\_PASSWORD             |                        | Password for the user                                                                                                                                          |
| DB\_PORT                 | 5432                   | Port number to connect to at the server host                                                                                                                   |
| DB\_SSL\_MODE            | disable                | SSL mode to use, one of: ‘disable’, ‘require’, ‘verify-ca’, ‘verify-full’                                                                                      |
| PORT                     | 8000                   | Port number for the REST API                                                                                                                                   |
| GRPC\_PORT               | 8001                   | Port number for GRPC collector communication                                                                                                                   |
| JWT\_SECRET              |                        | JWT token used to sign the collector API token. Which is used to authenticate in the REST/GRPC communication. The JWT is also used to encrypt certain settings |
| BUFFER\_PATH             | /var/opt/factry/buffer | Path for the time series database client buffer                                                                                                                |
| LOG\_LEVEL               | info                   | The log level of the historian                                                                                                                                 |
| GRPC\_MAX\_MESSAGE\_SIZE | 64MB                   | The maximum message size for GRPC messages.                                                                                                                    |

##
