Skip to main content

Installation Guide - Windows on-prem installation

(Last updated: 2025-10-07, Created: 2025.07.02)

Prerequisites

Installation

  1. If you already have a Analytics API service running, make sure to stop this by following Stopping the service.

  2. Store the unpacked artifacts that you downloaded at the place where you want the installation to take place.

  3. Set the Path of the folder where the exe-file is stored as a system variable named BLIKSUND_ANALYTICS_API_INITIAL_PATH. This will be the path to the log folder and to the .env file mentioned later

  4. Open a terminal (for example powershell) in administrator mode.

  5. Navigate to the folder where the exe-file is stored:

    cd <PATH_TO_EXE_FILE>
  6. Add and update needed configurations

    Create a file named .env in the same folder as the exe-file using New-Item -Path ".env" -ItemType File and add the following infromation to it:

    LOGGING__LEVEL=INFO
    LOGGING__SENTRY__ENABLED=False #Not used for on-prem
    LOGGING__SENTRY__DSN="" #Not used for on-prem

    APP__ROOT_PATH=/analytics/api/ewa #Do not change

    AUTHENTICATION__API_KEY= #Select your own API key
    AUTHENTICATION__API_KEY_HEADER=BLIKSUND-X-API-KEY

    # Database connection details (Analytics database)
    DATABASE__USERNAME=
    DATABASE__PASSWORD=
    DATABASE__HOST=
    DATABASE__PORT=1433
    DATABASE__NAME=
    DATABASE__TRUST_SERVER_CERTIFICATE=yes
    DATABASE__ENCRYPT=yes
  7. Install the service. This might take some minutes:

    .\analytics_api_service.exe install
  8. Start the service. The service will start right away, but it will take some munites before the API is up and running:

    .\analytics_api_service.exe start

    Note: A log folder (Logging) will be created and placed at the same location as the .exe file during the installation

Configuration options

The service can be configured with the following options:

Setting NameDescriptiondefault value
AUTHENTICATION__API_KEYPort for source database(empty)
AUTHENTICATION__API_KEY_HEADERName of source database(empty)
DATABASE__TYPEType of target database(empty)
DATABASE__USERNAMEUsername for target database(empty)
DATABASE__PASSWORDPassword for target database(empty)
DATABASE__HOSTHost for target database(empty)
DATABASE__PORTPort for target database(empty)
DATABASE__NAMEName of target database(empty)
DATABASE__TRUST_SERVER_CERTIFICATETrust server certificate option yes og noyes
DATABASE__ENCRYPTEnctyption option yes og noyes

Logging

Logs are placed under logs/, and if you are running the code as a windows service, the log file will be placed in the same folder as analytics_api_service.exe.

Stopping the service

Follow this guide if you want to stop an already running service

  1. Open a terminal (for example powershell) in administrator mode

  2. Navigate to the folder where the old exe-file is stored:

    cd <PATH_TO_EXE_FILE>
  3. Stop the service:

    .\analytics_api_service.exe stop

Setting up proxy layer

It is the customers responsibility to host the solution. Here is our recomondation based on standard practice and handeling of certificates for all web services on the server

  • Option 1: Same server, Install Analytics API on the same server as Insights API (EWA API). They will then communicate locally.
  • Option 2: Separate servers with secure communication, Set up HTTPS certificates between the servers. This is standard server setup.

Regardless of which option you choose, we recommend using a reverse proxy (nginx on Linux or IIS on Windows):

  • Let Analytics API listen only on localhost
  • Set up HTTPS in the reverse proxy
  • Route all requests through the proxy

The setup that you choose here will at the end define the URL of the API