Installation Guide - Windows on-prem installation
(Last updated: 2025-10-07, Created: 2025.07.02)
Prerequisites
- Install Microsoft SQL Server ODBC Driver 18: learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server
- Might need to install Microsoft Visual C++ Redistributable in order to install Microsoft SQL Server ODBC Driver: learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist
- Install NSSM nssm.cc/download
- The Bliksund Analytics API EWA (analytics-api-ewa) artifacts are downloaded for deployment (both the .exe-file and the wheels folder)
Installation
-
If you already have a Analytics API service running, make sure to stop this by following Stopping the service.
-
Store the unpacked artifacts that you downloaded at the place where you want the installation to take place.
-
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 -
Open a terminal (for example powershell) in administrator mode.
-
Navigate to the folder where the exe-file is stored:
cd <PATH_TO_EXE_FILE>
-
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 -
Install the service. This might take some minutes:
.\analytics_api_service.exe install
-
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 Name | Description | default value |
---|---|---|
AUTHENTICATION__API_KEY | Port for source database | (empty) |
AUTHENTICATION__API_KEY_HEADER | Name of source database | (empty) |
DATABASE__TYPE | Type of target database | (empty) |
DATABASE__USERNAME | Username for target database | (empty) |
DATABASE__PASSWORD | Password for target database | (empty) |
DATABASE__HOST | Host for target database | (empty) |
DATABASE__PORT | Port for target database | (empty) |
DATABASE__NAME | Name of target database | (empty) |
DATABASE__TRUST_SERVER_CERTIFICATE | Trust server certificate option yes og no | yes |
DATABASE__ENCRYPT | Enctyption option yes og no | yes |
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
-
Open a terminal (for example powershell) in administrator mode
-
Navigate to the folder where the old exe-file is stored:
cd <PATH_TO_EXE_FILE>
-
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