Downloading and Installing Factry Historian server
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.
If you are looking to test / evaluate Factry Historian instead, follow this guide: Installing Factry Historian using DockerInstalling Factry Historian using Docker.
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.
Navigate to https://portal.factry.cloud
Login with your credentials
Once logged in, click Downloads in the header menu
In the Downloads panel:
- Select a release channel (Stable)
- Select a product (Factry Historian)
- Select a version
- Select an OS/Platform (Linux/AMD64)
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.
We recommend to also download the Metadata file to verify the signature.
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.
wget https://portal.factry.cloud/download/products.pemThen verify the binary against the provided signature, replacing vx.x.x with the correct version.
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.xIf 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:
sudo chmod a+x factry-historian-server_vx.x.x_linux-x64
sudo ./factry-historian-server_vx.x.x_linux-x64 installThe 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 factry_historian is recommended)
- The postgreSQL host, port and SSL mode to connect to
- A valid JWT secret or leave empty to generate one
Verify if Factry Historian is running
sudo systemctl status factry-historian-serverDefaults
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
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. |