K2 architecture
Guide to server preparation and product deployment
This text describes the preparation of the server infrastructure for the deployment of K2 products. For each typical deployment scenario, the current architecture diagram is given with a description of the servers, their roles, the necessary network communication and the preparation steps. For each server and product, specific installation and configuration requirements are also given – the disk system, installed components, user permissions and recommended settings.
K2 products run on the Microsoft Windows platform, or in combination with Linux for selected servers in the DMZ (web servers for the e-shop, search, cache and Docker containers).
The structure of the text is as follows: the chapter "Common requirements for environment preparation" describes the preparation of the individual types of servers and products independently of a specific deployment scenario. The chapter "Deployment scenarios" then shows, on ten typical examples, how these servers are combined in practice, including the architecture diagram, an overview of the servers and the necessary network communication. The appendices contain a summary overview of the ports and basic parameters of the individual products.
Detailed information on the supported versions of operating systems, database servers and other components is given in the separate document "System requirements of the K2 information system". For settings not described in this document, we recommend following the recommended configuration issued by the manufacturer of the given component (Microsoft, Elastic, Redis, etc.).
This variant of the document describes only the products and components that can be run on the Linux operating system – specifically K2 Weblayer (Web K2), K2 API, K2 e-shop, K2 Image server, K2 SmartSearch, Redis and container services (RabbitMQ, E-mail synchronizer, K2 Backend Service, K2 AI Suggestions). For products that support both Windows and Linux, only the procedure for Linux is given here. Products that can be run exclusively on Microsoft Windows (IS K2, K2 Application server, database server, terminal server, domain controller) remain described without change.
Common requirements for environment preparation
The servers and products described below occur in all or most deployments. Their preparation is always the same regardless of which deployment scenario (see chapter General rules of network communication) is selected. Therefore, only the specific differences and references to the relevant parts of this chapter are given for the scenarios.
General rules of network communication
The following rules apply across all scenarios and server types and summarize the basic directions and protocols of network communication between the individual zones (Internet, DMZ, LAN):
- Terminal server (LAN) › server in DMZ: RDP TCP 3389 for remote desktop, FTP/SFTP TCP 21 (or TCP 22) for data transfer between the terminal server and the web server.
- K2 Application server (LAN) - web server in DMZ: Named Pipe TCP 445 – used for communication of K2 API, K2 e-shop and the Update service with the application server.
- Web server (DMZ) › Internet: HTTP port 80 (typically only redirection to HTTPS) and HTTPS port 443.
- Application server (LAN) › Database server (LAN): MS SQL Server TCP 1433, MS Analysis Services (OLAP) TCP 2383.
- All servers in LAN and DMZ: outgoing communication to DNS and NTP servers and, if applicable, SMTP for sending notification e-mails.
- Servers in LAN: regular outgoing communication to Windows Update for updating the operating system.
- A detailed overview of all ports used in the individual scenarios is given in the appendix "Overview of ports and network communication" at the end of the document.
Domain controller
The domain controller (Microsoft Active Directory) provides central authentication and authorization of users and devices in the network. It also controls user access permissions to shared folders and the permissions of administrators, consultants or service accounts to the Microsoft SQL server.
In IS K2, the domain controller can also be used to delegate the user identity using the Kerberos protocol when displaying outputs from the OLAP analytical service (Microsoft Analysis Services) – typically when connecting to the analytical service via K2 API or Web K2. In these cases, it is necessary to remap K2 users to the corresponding domain users (see the chapter "SQL BI server" in the K2 BI scenario).
As the operating system, we recommend the latest available version of Microsoft Windows Server, regularly maintained using Windows Update. For security reasons, we recommend running the domain controller on a dedicated server.
Interface settings:
- The necessary network communication must be allowed on the server (protocols, ports according to the rules above).
Database server
The server is used to run the database storage. For IS K2, the Microsoft SQL Server product must be used (the latest version is recommended, regularly maintained using Windows Update). As the operating system, we recommend Microsoft Windows Server in the latest available version.
Interface settings:
- The server must be part of the domain (Active Directory).
- The necessary network communication must be allowed on the server – TCP 1433 (SQL), TCP 2383 (Analysis Services).
Preparation of the disk system
We recommend creating separate disks for these file types:
- Database data files (.mdf).
- Database log files (.ldf).
- Database backups.
- Databases for OLAP (Analysis Services) – if used.
- Databases for FileStream (.fs) – used for DMS (document management). We recommend also storing the mdf and ldf files of the DMS database on this disk.
Installation
Installed MS SQL Server components:
- Database Engine Services
- Client Tools Connectivity
- Client Tools Backwards Compatibility
Optional MS SQL Server components (according to the K2 functions used):
- Analysis Services – multidimensional model for OLAP, or tabular model for K2 BI (management evaluation).
- FileStream – for the DMS function (document management).
- Integration Services – for the K2 BI function (management evaluation, ETL processes).
- Full-text search
We also recommend installing SSMS (SQL Server Management Studio) for server and database administration. SSMS is not part of the SQL Server installation; it is downloaded separately from the Microsoft website.
To process data into OLAP, the SQL native client library must be installed on the application server that performs the export – it is automatically part of the "Client Tools Connectivity" component, but it can also be installed separately (see the Microsoft download pages for SQL Server Native Client).
MS SQL Server configuration
- Instance: default (MSSQLSERVER), or another/named instance name.
- DB language: Czech_CI_AS.
- Authentication Mode: Mixed Mode (SQL Server authentication & Windows authentication).
- Analysis Services Configuration: Multidimensional and Data Mining Mode or Tabular mode (according to the BI solution used).
- MS SQL Server communicates in the default instance on port TCP 1433; for a named instance, the port number is different and the MSSQL Browser service must be running.
- MS Analysis Services communicates on port TCP 2383 (another port for an additional instance).
- Allowing communication of the database server with clients in the LAN (or another network) must be set in Windows Firewall.
Recommended parallelism settings (SQL Server properties)
The parallelism setting is recommended – IS K2 will work without it, but with lower performance for larger queries.
- Cost Threshold for Parallelism - set in the range of 100 to 200
- Max Degree of Parallelism - set in the range of 2/3 to 3/4 of the total number of processors (cores)
Permissions
- IS K2 installation: the user performing the installation must have the "sa" role (SQL server administrator) assigned on the SQL server.
- OLAP Export: SSAS connects to the SQL server to the data warehouse database, so it is necessary to add to the SQL server the account under which the SSAS service runs in Windows (by default NT Service\MSSQLServerOLAPService, or an account from Active Directory). This account is given the "db_reader" permission to all data warehouse databases (postfix "_DM").
Regular maintenance
Regular database maintenance has a fundamental impact on the performance of database operations and consists of these parts:
- Database backup.
- Database consistency check.
- Statistics update.
- Index defragmentation.
- Update of system components – SQL Server and the operating system (Windows Update).
File server for IS K2
For the IS K2 installation – storing the application file system – a separate server (file server for IS K2) can be used. The installation and regular reinstallation of IS K2 are performed on this computer, so the main file system of the application and the record of the installed product in Windows, including the installation (MSI) package in the operating system cache, are located here.
As the operating system, we recommend the latest version of Microsoft Windows Server, regularly maintained using Windows Update.
Interface settings
- The server must be part of the domain (Active Directory).
- The necessary network communication must be allowed on the server (protocols, ports).
- The directory with the IS K2 installation must be shared with all users who will use IS K2 – a domain policy can be used that automatically connects the directory as a mapped drive after login.
General information about the IS K2 product
- Type: desktop application.
- Operating system: Microsoft Windows.
- Size of the basic installation: approx. 6.5 GB for the file system, 2 GB for the databases at the start of operation.
- Dependency on other products or services: database server (MS SQL), domain controller (Active Directory).
The file system of the basic installation contains:
- Application binary files – K2 itself, auxiliary tools, dynamic libraries, etc.
- Files containing translations of K2 texts (the so-called localization resources, .lng files).
- Configuration files necessary for running K2 (K2.INI, SYSK2.INI).
- Data files with definitions of code lists, configurations and input data for auxiliary tools (SupportFiles).
- The Demo folder with data for the sample Client DEMO.
- The Conf folder with data for the initialization Client, used when creating a new database (Client) in K2.
Furthermore, user files (outputs of operations, logs, exports, prints), data of the individual Clients registered in K2 and files of customer modifications (database extension definitions, scripts, reports, Object designer definitions, etc.) are gradually created in the file system.
Directory structure
- The base directory contains program files (*.BPL, *.EXE, *.DLL, *.TDS – an overview is in the file "\SupportFiles\K2Components_list.html") and parameter files *.INI.
- The CONF directory contains language forms, bitmaps and vector graphics for running K2 and parameter files *.INI. The ATTACH subdirectory contains user directories U*, in which the information needed for notifications about new events is stored.
- Company directories (individual Clients, e.g. DEMO) contain the DATA directory for export/import of backups generated by K2, user directories U* (registration script, script editor configuration, etc.), the HOMEBAN directory for homebanking input/output files and the ATTACH directory, where e-mail attachments are stored (the attachment name is converted by a hash function into a pair of subdirectories).
- The OLAP directory contains definitions of standard OLAP views.
- The SQL directory contains *.sql scripts for generating tables and views.
- The SERVISW directory is used for the K2 installation.
- The SupportFiles directory contains standard files necessary for running standard reports (LangX subdirectories according to languages).
- The SESTAVYW directory contains definitions of scripts and reports – the SPECIAL subdirectory with special scripts and the STANDARD subdirectory with removed (unsupported) scripts and reports.
Permissions in the file system
K2 service user (administrator):
Directory / file |
Level |
Right |
K2 directory |
Folder, subfolders, files |
Full control |
Regular K2 user:
Directory / file |
Level |
Right |
K2 directory |
Folder, subfolders, files |
Read, traverse |
CONF\ATTACH |
Folder, subfolders, files |
Write, create folders, delete |
OLAP |
Files |
Write |
<client> |
Folder, subfolders, files |
Write, create folders, delete |
<client>\TABLEMOD.XML |
Files |
Disable inheritance, keep read |
<client>\RF_FIRM.PAS |
Files |
Disable inheritance, keep read |
SupportFiles |
Folder, subfolders, files |
Read & execute |
For all folders not listed in the table, the setting according to the main permission for the entire K2 directory applies.
After a new Client is created, the file permissions in its folder must be updated according to the rules above.
Terminal server
The terminal server is used for remote user access to the K2 Desktop application. It offers simpler central administration and updating of the K2 system in an environment where tens to hundreds of users work concurrently, and at the same time allows operation on a cheaper thin-client hardware platform. It is currently the most frequently used way of running K2 in a data centre. Multiple terminal servers forming a terminal farm (Microsoft Remote Desktop Services technology) are also commonly used.
Interface settings
- The server must be part of the domain (Active Directory).
- The necessary network communication allowed – RDP TCP 3389, TCP 1433 (SQL).
- Access to the IS K2 installation directory – a mapped drive or a UNC path can be used.
- For the "K2 local installation" product, a UNC path must be used, not a mapped drive.
Installation of tools
- Microsoft Office (Word, Excel, Outlook) – for exports from K2 to Office documents. Export to Microsoft Excel is also possible without installing MS Office; K2 has its own library implemented for this purpose.
- PDFRegisterTool.exe – run it from the K2 directory and register the PDF libraries so that exports to PDF work.
K2 Desktop product – general information
- Type: desktop application.
- Operating system: Microsoft Windows Server (latest version).
- Size of the basic installation: approx. 6.5 GB for the file system, 2 GB for the databases.
- Dependency: database server (MS SQL), domain controller (Active Directory).
K2 local installation product
For correct functioning, the K2 local installation requires the existence of a shared directory of the main (server) K2 installation, but users access the application installed directly on their computer or on the terminal server, which usually results in a faster response.
- Type: desktop application.
- Operating system: Microsoft Windows.
- Size of the basic installation: approx. 1.6 GB for the file system.
- Dependency on other K2 products: IS K2 – server (full) installation.
The file system of the basic installation contains the application binary files, language files (.lng) and the configuration files K2.INI, SYSK2.INI.
Permissions in the file system – K2 service user (administrator):
Directory / file |
Level |
Right |
Local K2 directory |
Folder, subfolders, files |
Full control |
Permissions in the file system – regular K2 user:
Directory / file |
Level |
Right |
Local K2 directory |
Folder, subfolders, files |
Read, traverse |
Application server
The application server is used to run the Windows service "K2 Application server". Several instances of this service with different roles (Web K2, Task scheduler, Notification, K2 API) can run on one physical or virtual server.
Interface settings
- The server must be part of the domain (Active Directory).
- The necessary network communication must be allowed on the server – TCP 10010–10020 (K2 AS), TCP 1433 (SQL), port 445 (Named Pipe).
- The server must have access to the directory with the IS K2 installation – a UNC path must be used, not a mapped drive.
General information about the product
- Type: Windows service.
- Operating system: Microsoft Windows Server (latest version).
- Size of the basic installation: approx. 1 GB.
- Dependency on other K2 products: IS K2 (server installation).
- The file system contains the application binary files (.exe, .bpl, .dll) and the configuration files K2.INI, SYSK2.INI. Depending on the settings, files with log information are also created.
Setting the Windows service user
Because the service needs access to the K2 installation and other applications, the service must be run under a domain user – we recommend reserving a separate service account. This user must have read and write access to the IS K2 installation directory (in the case of a shared location on another server).
The user's permissions in Windows themselves depend on the functions for which the application server is used. No higher permissions are required for the Notification or K2 API role. If the Task scheduler role is used, additional permissions may be required depending on the tasks performed – for example access to another database server, analytical service or file system.
For the application server itself to log in to IS K2, a user must exist in IS K2 – the default installation contains a dedicated user with the login "AS" and no password set for this purpose. This user does not need to have any permissions assigned in IS K2. Before use, it is necessary to set a password, which is then entered during the AS installation, or directly in the K2.ini file of an already installed application server.
Components and settings according to the application server role
Generating PDF files:
- Run the PDFRegisterTool.exe tool from the K2 directory in "Run as administrator" mode and register the required libraries with the "Register" button.
- Install the Microsoft Visual C++ 2010 SP1 Redistributable Package (x64).
OLAP Export (Task scheduler role):
- The application server as a task scheduler is often used for regularly running the OLAP export – for this task, .NET Framework 4.6.2 must be installed on the server (install it via Server Manager – usually only a newer .NET Framework is available, which is, however, not sufficient).
- The functionality can be verified by running the execxmla.exe tool from the K2 directory.
- The user under which the application server service runs must have a login created on the SQL server (the public role is sufficient) – otherwise the SQL version is detected incorrectly and the OLAP export may fail with an error of the unregistered provider SQLNCLI.
Web server (Linux)
The K2 e-shop, K2 Image server and K2 SmartSearch products (and, in the premium variant, also Redis) run on dedicated servers with the Linux operating system located in the DMZ. This solution is the default for scenarios with the K2 e-shop (see Scenario 03 and 04). The K2 API and Web K2 products run on Linux in the form of Docker containers – see the chapter "Docker server (DMZ) – K2 Weblayer".
K2 e-shop (K2 shop)
The server is used only to run K2 e-shops, or K2 Web. The K2 e-shop is deployed on the preconfigured server using the K2 installer. The SFTP protocol is used for installing and updating the e-shop (a replacement for FTP, which is outdated and blocked by some firewall manufacturers).
- Type: web application (PHP 8.2, 64bit non-thread-safe) running under the Apache web server.
- Application size: approx. 70 MB.
- Dependency on other K2 products: K2 AS, K2 API.
The file system contains the application files (.php, .css, .js) and the configuration files web.config and config.php. In addition, a cache of individual requests, modifications of the website templates and any customer modifications of the source files are gradually created.
Several instances of the K2 e-shop or K2 Web can run on one server – in such a case, the server must be preconfigured in advance during installation (or a request must be sent to K2 later).
- Operating system: Linux (Debian recommended).
- The Apache web server is used to interpret PHP. In the premium variant, Nginx is additionally placed in front of Apache as a reverse proxy (load balancing, SSL termination).
- We recommend running e-shops exclusively on HTTPS – the customer must provide an SSL certificate for the domains on which the e-shop will run.
- The server must be accessible from the internet (via NAT) on a public IP address, ports 80 (HTTP) and 443 (HTTPS). Port 80 is used only for redirection to HTTPS – we recommend having both ports accessible for reliable loading of the e-shop.
- The server must not be part of an Active Directory domain.
K2 Image server
K2 Image server is used to speed up the loading of images and documents on the K2 e-shop. Based on a parameter in the URL, it can resize images, cache them and convert them between formats. K2 imports images to the server storage using the SFTP protocol (port TCP 22). When a request to display an e-shop page is made, the K2 e-shop inserts into the page image URLs with parameters pointing to the Image server; on a repeated request for the same image, the already generated (cached) variant is used.
- Application size: approx. 160 MB, dependency on other K2 products: none.
- Operating system: Linux.
- Port TCP 22 (SFTP) for importing images from K2.
K2 SmartSearch
K2 SmartSearch is used to improve searching on the K2 e-shop. Products and product categories are structured by the K2 application and imported into the Elasticsearch database. Thanks to indexing, it is possible to perform full-text searches on these data, including tolerance of typos and errors in the search expression.
- Operating system: Linux, with Elasticsearch installed (version according to the current K2 recommendation).
- Port TCP 9200 must be accessible from the LAN (for filling data by the K2 application) and from the K2 e-shop web server.
- The server is located in the DMZ so that the communication between the K2 e-shop and SmartSearch is not slowed down by the firewall towards the LAN.
Redis (cache server of the premium e-shop)
In the premium K2 e-shop solution, the file cache is replaced by the Redis Key-Value database, which, unlike the file cache, guarantees immediate loading of the stored data – with a file cache, as the number of small files grows, work with the cache slows down, and so does page loading. In addition to the cache, user sessions are also stored in Redis.
- Operating system: Linux.
- Port TCP 6379 accessible from the LAN (Cache application server) and from the e-shop web server.
- Redis is enclosed within the DMZ and does not need to communicate with the rest of the network.
Preparation and installation of VMs for Linux servers
General rules apply to the preparation of servers running on Linux: each product is located on a separate server (VM), the individual servers must meet the minimum HW requirements and all of them must be located in the DMZ network.
Installation on VMware:
- For customers using VMware version 6.7 and later, a VM (.ova) can be prepared in advance exactly according to the customer's needs – the customer then only deploys and starts the virtual machine.
- For the K2 e-shop, it is necessary to provide: the IP address, mask and gateway from the DMZ range, the IP addresses of DNS and NTP servers accessible from the DMZ, the final domain (domains) of the e-shop and the corresponding SSL certificate.
- For the Image server, SmartSearch and Redis, it is sufficient to provide: the IP address, mask and gateway from the DMZ range and the IP addresses of the DNS and NTP servers.
- After this information has been sent to the K2 HW department, the VM is prepared and exported to the .ova format; the customer is then sent SFTP access to download it.
Installation on another virtualization technology:
- Customers with another virtualization technology are sent a link to a modified ISO image for automatic installation. During the installation, the customer sets the IP address, mask and gateway from the DMZ range (identical to the production setting) and ensures access to DNS and NTP.
- After the OS has been installed, it is necessary to temporarily allow the SSH port from the K2 public range (178.248.11.0/27) to one of the installed servers and contact the K2 HW department, which will remotely complete the installation and configure the individual services.
- To complete the installation, it is necessary to send the K2 HW department: the IP addresses of the individual servers and the passwords set during installation, for the K2 e-shop the final domain name(s) (for a migration from Windows to Linux, the final production domain is set directly) and the corresponding SSL certificates.
Docker server (DMZ) – K2 Weblayer
A server in the DMZ running Docker containers. At a minimum, it contains the K2 Weblayer container, which provides communication between the web browser and the application servers in the LAN. Depending on the scenario, it may also contain other containers (K2 API, K2 Backend Service, K2 AI Suggestions).
Interface settings
- Server in the DMZ network – must not be part of an Active Directory domain.
- Operating system: Linux.
- Docker (or Docker Compose) installed.
- Allowed communication: TCP 443 and TCP 80 (HTTPS/HTTP + WebSocket) from the internet, TCP 10010–10020 to the LAN (communication with K2 application servers).
Containers run (according to the scenario)
- K2 Weblayer – always present in all scenarios.
- K2 API – added in scenarios with API (02, 03, 04, 06).
K2 Weblayer (Web K2)
The K2 Weblayer container provides the web interface of Web K2 and at the same time works as a reverse proxy between the user's browser and the K2 application servers in the LAN. The necessary web and application runtime (Node.js, reverse proxy) is part of the container image – therefore no manual installation of components on the host server is necessary.
- Application size: approx. 115 MB, dependency on other K2 products: K2 AS (application server).
- The container must have communication allowed on port TCP 10010–10020 to the LAN (to the Application server with the Web K2 role).
- Publication to the internet on ports TCP 80 (redirection) and TCP 443 (HTTPS) – a valid SSL certificate for the given domain is required.
K2 API
The K2 API container provides the IS K2 REST API interface for external applications and is deployed next to K2 Weblayer on the same Docker server in the DMZ.
- Application size: approx. 15 MB, dependency on other K2 products: K2 AS (application server).
- In the case of HTTPS, a valid SSL certificate for the given domain is required.
- In the case of publication for access via the internet, ports TCP 80/443 must be allowed.
- Communication with the K2 application server in the LAN must be allowed – by default TCP 10010–10020, or Named Pipe (port 445).
- Anonymous users must be created in IS K2 – 1 user per 1 application server thread. In the default installation, these users are named "AN" + user number.
- A licence file with allowed K2 API communication (number of shared users) must be loaded in K2.
Workstation
Workstation for the K2 full client
As the operating system, we recommend the latest version of Microsoft Windows 11, regularly maintained using Windows Update.
- The computer must be part of the domain (Active Directory).
- The necessary network communication must be allowed on the computer (protocols, ports).
- The computer must have access to the directory with the IS K2 installation – a mapped drive can be used.
- For the "K2 local installation" product, a UNC path must be used, not a mapped drive.
- We recommend installing MS Office (Excel, Word, Outlook) for exports from K2 to Office documents.
Workstation for the K2 web client
Microsoft Windows 11, macOS or Linux with any supported web browser can be used (the list of supported browsers is given in the document "System requirements of the K2 information system").
If the user will access peripheral devices (payment terminal, printer, customer display, barcode reader, etc.) from Web K2, the K2 Device Connector application must be installed on the workstation.
Services settings and system components
Update service
The update service is used to update the "Local K2" product when the server installation has been updated. It is also used for K2 installer functions – remote administration of K2 products and reinstallation plans, i.e. for remote downloading and updating of K2 products, reading output log files from updates and cleaning up temporary files.
The application runs as a Windows service under a selected user:
- To operate the "Local K2" or "Application server" products via remote administration, the service must run under a domain account that has access to the shared directory of the main K2 installation (the so-called "main") and at the same time is a local administrator on the given computer (necessary for running installations and reinstallations).
- For the administration of other products running on Windows servers in the DMZ without a domain controller, it is sufficient for the service to run under the local account "LocalSystem" – this account is also a local administrator.
- To be able to communicate with the service from another computer, port 445 (Named Pipe) must be opened between the computers. This port is also used for communication of the application server with products in the DMZ and for the remote administration and reinstallation plan functions.
Deployment scenarios
Each scenario describes a specific combination of K2 products and infrastructure requirements, supplemented by the current architecture diagram. The basic preparation of the servers (Database server, Application server, Terminal server, Docker server, web servers) is always the same and is described in the previous chapter – this part gives the specifics for each scenario and refers to the relevant subchapters of the common requirements.
Scenario 01 – Basic K2 installation

Scenario description:
Basic K2 installation without extension modules. It contains all key components necessary for running IS K2 – web access via K2 Weblayer, two application servers (Web K2 + Task scheduler and Notification), a database server and a terminal server for desktop access. This is the default architecture on which all other scenarios build.
Overview of servers and their roles
Server |
Zone |
Services/components run |
Docker server |
DMZ |
K2 Weblayer |
Application server 1 |
LAN |
K2 Application server – Web K2 |
Application server 2 |
LAN |
K2 Application server – Task scheduler, Notification |
Database server |
LAN |
SQL database |
Terminal server |
LAN |
K2 Desktop |
Network communication:
- Internet › DMZ (Docker server): TCP 443, TCP 80 (HTTPS/HTTP + WebSocket).
- DMZ › LAN (Application server 1): TCP 10010–10020.
- LAN (Application servers › Database server): TCP 1433.
Specific preparation for this scenario:
- Application server 1: configure the Web K2 role (see the chapter Docker server (DMZ) – K2 Weblayer).
- Application server 2: configure the Task scheduler and Notification role (optionally .NET Framework 4.6.2 for OLAP export – see the chapter Application server).
- Both application servers: set permissions for the K2 domain service user according to the chapter Application server.
- Docker server (DMZ): deploy the K2 Weblayer container, configure the firewall for TCP 443/80 from the internet and TCP 10010–10020 to the LAN.
- Database server: install MS SQL Server with the Database Engine Services and Full-text search components according to the chapter Database server.
- Terminal server: prepare according to the chapter Terminal server, including registration of PDF libraries and installation of MS Office for exports.
Scenario 02 – Basic K2 installation + K2 API

Scenario description:
Extension of the basic installation with K2 API, which allows external applications to access IS K2 data via a REST API. K2 API is deployed in a Docker container in the DMZ. A dedicated Application server 3 is added to handle API requests.
Overview of servers and their roles
Server |
Zone |
Services/components run |
Docker server |
DMZ |
K2 Weblayer, K2 API |
Application server 1 |
LAN |
K2 Application server – Web K2 |
Application server 2 |
LAN |
K2 Application server – Task scheduler, Notification |
Application server 3 |
LAN |
K2 Application server – API |
Database server |
LAN |
SQL database |
Terminal server |
LAN |
K2 Desktop |
Network communication:
- Internet › DMZ: TCP 443, TCP 80 (both Weblayer and K2 API).
- DMZ › LAN Application server 1 (Web K2): TCP 10010–10020.
- DMZ › LAN Application server 3 (K2 API): TCP 10010–10020.
- LAN (Application servers › Database server): TCP 1433.
Specific preparation for this scenario:
- Docker server (DMZ): add the K2 API container next to K2 Weblayer.
- Application server 3 (K2 AS API): install a K2 application server dedicated exclusively to handling K2 API requests and configure the relevant port for communication with the K2 API container in K2.ini.
- In IS K2, create anonymous users for the API (default naming "AN" + number) – 1 user per 1 application server thread; a licence file with K2 API communication enabled must be installed in K2 (see the chapter Docker server (DMZ) – K2 Weblayer, subchapter K2 API).
- Allow port 445 (Named Pipe) between the Docker server and Application server 3.
Scenario 03 – Basic K2 installation + K2 E-shop

Scenario description:
K2 installation with an e-shop in the standard configuration. Dedicated Linux servers are added to the DMZ for the K2 e-shop (web server with Apache, optionally Nginx as a reverse proxy), an Elasticsearch server for search (K2 SmartSearch) and an Image server for image management. K2 API in the DMZ connects the e-shop with the K2 application servers in the LAN.
Overview of servers and their roles
Server |
Zone |
Services/components run |
Docker server |
DMZ |
K2 Weblayer, K2 API |
Web server |
DMZ |
K2 e-shop (PHP/Apache) |
Elasticsearch server |
DMZ |
Elasticsearch (K2 SmartSearch) |
Image server |
DMZ |
K2 Image server, SFTP |
Application server 1 |
LAN |
K2 Application server – Web K2 |
Application server 2 |
LAN |
K2 Application server – Task scheduler, Notification |
Application server 3 |
LAN |
K2 Application server – API |
Database server |
LAN |
SQL database |
Terminal server |
LAN |
K2 Desktop |
Network communication:
- Internet › DMZ Docker server (Weblayer, K2 API): TCP 443, TCP 80.
- Internet › DMZ Web server (K2 e-shop): TCP 443, TCP 80.
- DMZ › LAN (AS 1, AS 3): TCP 10010–10020.
- LAN › DMZ Elasticsearch: TCP 9200.
- LAN › DMZ Image server: TCP 22 (SFTP).
- LAN (Application servers › Database server): TCP 1433.
- Web server › Elasticsearch server: TCP 9200.
Web server (K2 e-shop) – Linux
- Detailed preparation according to the chapter Web server (Linux) – K2 e-shop (K2 shop): PHP 8.2 (64bit, non-thread-safe), Apache, SFTP on port 22, SSL certificate for the e-shop domain, port 80 only for redirection to HTTPS.
- The server must not be in an Active Directory domain.
- VM preparation: for VMware, send the K2 HW department the IP address, mask and gateway from the DMZ, the IP addresses of the DNS/NTP servers, the final e-shop domain and the SSL certificate; for other virtualization, install a clean OS according to the K2 guide and temporarily make the SSH port accessible from IP 178.248.11.5/32.
Elasticsearch server (K2 SmartSearch) – Linux
- Install Elasticsearch (version according to the current K2 recommendation) according to the chapter Web server (Linux) – K2 SmartSearch.
- Port TCP 9200 accessible from the LAN (K2 application server) and from the Web server (K2 e-shop).
- Located in the DMZ – it does not need to communicate with the LAN directly.
- VM preparation for VMware: send the K2 HW department the IP address, mask, gateway and IP addresses of DNS/NTP.
Image server – Linux
- It is used to speed up image loading – caching, resizing and format conversion of images (see the chapter Web server (Linux) – K2 Image server).
- K2 imports images using SFTP (port TCP 22).
- VM preparation for VMware: send the K2 HW department the IP address, mask, gateway and IP addresses of DNS/NTP.
Scenario 04 – Basic K2 installation + K2 E-shop Premium

Scenario description:
Premium version of the e-shop solution. Compared to the standard installation, a Cache server with Redis is added to the DMZ (it replaces the file cache for better performance with large data volumes), Nginx as a reverse proxy in front of Apache, and a dedicated Cache application server in the LAN.
Overview of servers and their roles
Server |
Zone |
Services/components run |
Docker server |
DMZ |
K2 Weblayer, K2 API |
Cache server |
DMZ |
Redis |
Web server |
DMZ |
K2 e-shop (PHP/Apache), Nginx |
Elasticsearch server |
DMZ |
Elasticsearch (K2 SmartSearch) |
Image server |
DMZ |
K2 Image server, SFTP |
Application server 1 |
LAN |
K2 Application server – Web K2 |
Application server 2 |
LAN |
K2 Application server – Task scheduler, Notification |
Application server 3 (E-shop) |
LAN |
K2 Application server – E-shop |
Application server 3 (Cache) |
LAN |
K2 Application server - Cache |
Database server |
LAN |
SQL database |
Terminal server |
LAN |
K2 Desktop |
Network communication:
- Internet › DMZ Docker server: TCP 443, TCP 80.
- Internet › DMZ Web server: TCP 443, TCP 80.
- DMZ › LAN (AS E-shop, AS Cache): TCP 10010–10020.
- LAN › DMZ Redis: TCP 6379.
- LAN › DMZ Elasticsearch: TCP 9200.
- LAN › DMZ Image server: TCP 22 (SFTP)
- LAN (Application servers › Database server): TCP 1433.
Cache server (Redis) – Linux
- Install Redis according to the chapter Web server (Linux) – Redis: a key-value database for the K2 e-shop session and cache; it replaces the file cache and ensures faster access to stored data.
- Port TCP 6379 accessible from the LAN (K2 Cache application server) and from the Web server.
- Redis is enclosed in the DMZ – it does not need communication outside the DMZ and LAN.
- VM preparation for VMware: send the K2 HW department the IP address, mask, gateway and IP addresses of DNS/NTP from the DMZ range.
Web server (K2 e-shop Premium) – Linux
- The same preparation as for the standard e-shop (see Scenario 03 and the chapter Web server (Linux) – K2 e-shop).
- In addition, Nginx is configured as a reverse proxy in front of Apache.
- Nginx provides load balancing and SSL termination.
Scenario 05 – Basic K2 installation – Cache update

Scenario description:
Extension of the basic K2 installation with a cache update mechanism using a message queue. A Docker server with a RabbitMQ container is added to the LAN; it provides asynchronous communication between K2 application servers for cache invalidation and update.
Overview of servers and their roles
Server |
Zone |
Services/components run |
Docker server (DMZ) |
DMZ |
K2 Weblayer |
Application server 1 |
LAN |
K2 Application server – Web K2 |
Application server 2 |
LAN |
K2 Application server – Task scheduler, Notification |
Database server |
LAN |
SQL database |
Terminal server |
LAN |
K2 Desktop |
Docker server (LAN) |
LAN |
RabbitMQ |
Network communication:
- Internet › DMZ Docker server: TCP 443, TCP 80.
- DMZ › LAN Application server 1: TCP 10010–10020.
- LAN (K2 servers › RabbitMQ Docker server): TCP 5672 (AMQP).
- LAN (Application servers › Database server): TCP 1433.
Docker server (LAN) – RabbitMQ
- Operating system: Linux (with Docker).
- Install and start the RabbitMQ container.
- Port TCP 5672 (AMQP) accessible from the LAN (K2 application servers).
- Optionally port TCP 15672 (RabbitMQ Management UI) for administration – accessible only from the internal network.
- Set login credentials for K2 (user/password for the AMQP connection).
- K2 application server configuration: enter the RabbitMQ address and login credentials in K2.ini.
Scenario 06 – Basic K2 installation + E-mail synchronization

Scenario description:
Extension of the installation with e-mail synchronization. K2 API is added to the Docker server (DMZ), and a Docker server with the e-mail synchronization service is added to the LAN; the service is further extended with the RabbitMQ message broker, which ensures faster transfer of information from K2 to the service and makes some functions available.
Overview of servers and their roles
Server |
Zone |
Services/components run |
Docker server (DMZ) |
DMZ |
K2 Weblayer, K2 API |
Application server 1 |
LAN |
K2 Application server – Web K2 |
Application server 2 |
LAN |
K2 Application server – Task scheduler, Notification |
Application server 3 |
LAN |
K2 Application server – API |
Database server |
LAN |
SQL database |
Terminal server |
LAN |
K2 Desktop |
Docker server (LAN) |
LAN |
RabbitMQ, E-mail synchronizer |
Network communication:
- Internet › DMZ Docker server: TCP 443, TCP 80.
- DMZ › LAN (AS 1, AS 3): TCP 10010–10020.
- LAN (K2 servers › RabbitMQ Docker server): TCP 5672 (AMQP).
- LAN (Application servers › Database server): TCP 1433.
- E-mail synchronizer › mail servers: IMAP/SMTP (ports according to the e-mail server configuration).
Docker server (LAN) – RabbitMQ + E-mail synchronizer
- Operating system: Linux (with Docker).
- RabbitMQ container: preparation identical to Scenario 05.
- E-mail synchronizer container: deploy the K2 E-mail synchronizer container and configure the login credentials to the mail server (IMAP/SMTP) and the connection to RabbitMQ and K2 API.
- Ensure network access of the E-mail synchronizer to the mail server (IMAP/SMTP ports).
- Configure K2 API and AS for communication with the E-mail synchronizer via RabbitMQ.
Scenario 07 – K2 + Elastic (for internal search)

Scenario description:
Extension of the basic K2 installation with Elasticsearch for internal full-text search in IS K2 (unlike scenarios 03/04, where Elasticsearch is used for search in the e-shop). The Elastic server is located in the LAN and communicates with the K2 application servers via TCP 9200.
Overview of servers and their roles
Server |
Zone |
Services/components run |
Docker server (DMZ) |
DMZ |
K2 Weblayer |
Application server 1 |
LAN |
K2 Application server – Web K2 |
Application server 2 |
LAN |
K2 Application server – Task scheduler, Notification |
Database server |
LAN |
SQL database |
Terminal server |
LAN |
K2 Desktop |
Elastic server |
LAN |
Elasticsearch |
Network communication:
- Internet › DMZ Docker server: TCP 443, TCP 80.
- DMZ › LAN Application server 1: TCP 10010–10020.
- LAN (K2 AS › Elastic server): TCP 9200 (HTTP – Elasticsearch REST API).
- LAN (Application servers › Database server): TCP 1433.
Elastic server (LAN)
- Operating system: Linux.
- Install Elasticsearch (version according to the current K2 recommendation).
- Port TCP 9200 accessible from the LAN (K2 application servers).
- Elasticsearch is used for internal full-text search in IS K2.
- Configure the JVM heap size according to the available RAM (recommended max. 50 % of RAM).
- Set the network interface to listen only from the LAN (network.host: IP_serveru).
- K2 application server configuration: enter the Elasticsearch server address and port.
Scenario 08 – Basic K2 installation + K2 BI

Scenario description:
Extension of the basic installation with K2 BI (Business Intelligence). An SQL BI server with the Data Warehouse, Integration Services and Analysis Services (SSAS) components is added to the LAN, together with a Power BI Gateway server for connection to the Power BI Cloud Service.
Overview of servers and their roles
Server |
Zone |
Services/components run |
Docker server (DMZ) |
DMZ |
K2 Weblayer |
Application server 1 |
LAN |
K2 Application server – Web K2 |
Application server 2 |
LAN |
K2 Application server – Task scheduler, Notification |
Database server |
LAN |
SQL database |
SQL BI server |
LAN |
Data Warehouse, Integration Services, Analysis Services |
Terminal server |
LAN |
K2 Desktop |
Power BI Gateway |
LAN |
PBI Gateway |
Network communication:
- Internet › DMZ Docker server: TCP 443, TCP 80.
- DMZ › LAN Application server 1: TCP 10010–10020.
- LAN (K2 AS › SQL BI): TCP 1433 (SQL), TCP 2383 (Analysis Services/MSOLAP).
- LAN (Database server - SQL BI): TCP 1433.
- Power BI Gateway › Internet (Power BI Cloud): TCP 80, TCP 443, TCP 5671, TCP 5672, TCP 9350–9354.
SQL BI server
- Operating system: Microsoft Windows Server (latest version); the server must be a member of the domain (Active Directory).
- Install MS SQL Server with the components Database Engine Services (for Data Warehouse databases), Analysis Services (tabular or multidimensional model depending on the BI type) and Integration Services (for ETL processes filling the Data Warehouse) – see the general preparation in the chapter Database server.
- SQL instance: default or named, TCP 1433; Analysis Services TCP 2383.
- The SQL native client (part of Client Tools Connectivity) is required for OLAP processing.
- Set up Kerberos delegation for K2 – it allows the K2 application server to access Analysis Services by delegating the identity of the domain user; K2 users must be remapped to domain users in the K2 settings (see the chapter Domain controller).
- SSAS permissions: add the SSAS service account (NT Service\MSSQLServerOLAPService) to SQL Server with the db_reader permission for the data warehouse databases (postfix "_DM").
- Disk system: see the Database server preparation – separate disks for mdf, ldf, backups, OLAP.
Power BI Gateway server
- Operating system: Microsoft Windows Server or Windows 10/11 (64bit).
- Install the Power BI On-premises Data Gateway from the Microsoft website.
- The gateway must have access to the SQL BI server (TCP 1433, TCP 2383).
- Outgoing communication to the internet allowed on ports TCP 80, 443, 5671, 5672, 9350–9354 (communication with the Power BI Cloud Service).
- Configure the Gateway in the Power BI Service with the Power BI account login credentials and enter the SQL BI server as the data source.
Scenario 09 – K2 + Chat (new backend technologies)

Scenario description:
Extension of the basic K2 installation with chat functionality with a new backend. A Docker server with the K2 Backend Service container is added to the LAN; it provides real-time communication for chat functions in Web K2 and the K2 application.
Overview of servers and their roles
Server |
Zone |
Services/components run |
Docker server (DMZ) |
DMZ |
K2 Weblayer |
Application server 1 |
LAN |
K2 Application server – Web K2 |
Application server 2 |
LAN |
K2 Application server – Task scheduler, Notification |
Database server |
LAN |
SQL database |
Terminal server |
LAN |
K2 Desktop |
Docker server (LAN) |
LAN |
K2 Backend Service |
Network communication:
- Internet › DMZ Docker server: TCP 443, TCP 80 (WebSocket for chat).
- DMZ › LAN Application server 1: TCP 10010–10020.
- LAN (K2 Weblayer › K2 Backend Service): TCP 443, TCP 80.
- LAN (Application servers › Database server): TCP 1433.
Docker server (LAN) – K2 Backend Service
- Operating system: Linux (with Docker).
- Deploy the K2 Backend Service container (K2 chat backend).
- Port TCP 443 / TCP 80 accessible from the LAN (K2 Weblayer in the DMZ and K2 application servers).
- WebSocket support for real-time chat communication.
- Configure the login credentials and the K2 Backend Service endpoint in the K2 Weblayer configuration.
- Ensure container data persistence (volume mount) for configurations and logs.
Scenario 10 – Basic K2 installation + K2 AI

Scenario description:
Extension of the basic K2 installation with K2 AI functions – specifically K2 AI Suggestions. A Docker server with the K2 AI Suggestions container is added to the LAN; it provides AI-based recommendations directly in the IS K2 interface.
Overview of servers and their roles
Server |
Zone |
Services/components run |
Docker server (DMZ) |
DMZ |
K2 Weblayer |
Application server 1 |
LAN |
K2 Application server – Web K2 |
Application server 2 |
LAN |
K2 Application server – Task scheduler, Notification |
Database server |
LAN |
SQL database |
Terminal server |
LAN |
K2 Desktop |
Docker server (LAN) |
LAN |
K2 AI Suggestions |
Network communication:
- Internet › DMZ Docker server: TCP 443, TCP 80.
- DMZ › LAN Application server 1: TCP 10010–10020.
- LAN (K2 AS › K2 AI Suggestions): TCP 44301 (HTTP).
- LAN (Application servers › Database server): TCP 1433.
Docker server (LAN) – K2 AI Suggestions
- Operating system: Linux (with Docker).
- Deploy the K2 AI Suggestions container.
- Port TCP 44301 (HTTP) accessible from the LAN (K2 application servers).
- The container communicates only with the K2 application servers in the LAN – access from the internet is not required.
- Configure the K2 AI Suggestions endpoint in the K2 application server configuration.
- Ensure sufficient HW resources for AI inference (CPU, RAM according to the model requirements).
- Ensure data persistence – volume mount for the model and configuration files.
Overview of ports and network communication
The following table summarizes all ports used across the scenarios.
Port / Protocol |
Direction |
Description |
Scenarios |
TCP 80, 443 |
Internet › DMZ |
HTTP/HTTPS + WebSocket (K2 Weblayer, K2 API, Web server) |
01–10 |
TCP 10010–10020 |
DMZ › LAN |
K2 Weblayer/API › K2 Application server |
01–10 |
TCP 1433 |
LAN internal |
MS SQL Server (communication AS › Database server) |
01–10 |
TCP 2383 |
LAN internal |
MS Analysis Services (MSOLAP) |
08 |
TCP 445 |
LAN internal |
Named Pipe – communication of K2 AS with K2 API, Update service |
02, 03, 04, 06 |
TCP 3389 |
LAN internal |
RDP – access to the Terminal server |
01–10 |
TCP 21 / TCP 22 |
LAN › DMZ |
FTP/SFTP – data transfer from the terminal/application server to the web server |
03, 04 |
TCP 5672 |
LAN internal |
AMQP – RabbitMQ (cache update, e-mail synchronization) |
05, 06 |
TCP 15672 |
LAN internal |
RabbitMQ Management UI (administration, optional) |
05, 06 |
TCP 9200 |
LAN - DMZ |
Elasticsearch REST API (K2 SmartSearch / internal search) |
03, 04, 07 |
TCP 6379 |
LAN › DMZ |
Redis (cache server – premium e-shop) |
04 |
TCP 22 |
LAN › DMZ |
SFTP – transfer of images to the Image server |
03, 04 |
TCP 44301 |
LAN internal |
HTTP – K2 AI Suggestions |
10 |
TCP 80, 443, 5671–5672, 9350–9354 |
LAN › Internet |
Power BI Gateway › Power BI Cloud |
08 |
Overview of K2 products and their basic parameters
Product |
Type |
Operating system |
Basic installation size |
Dependency on K2 products |
IS K2 (server installation) |
Desktop application |
Microsoft Windows |
6.5 GB (FS) + 2 GB (DB) |
Database server, domain controller |
Local K2 installation |
Desktop application |
Microsoft Windows |
1.6 GB (FS) |
IS K2 – server installation |
K2 application server |
Windows service |
Microsoft Windows Server |
1 GB (FS) |
IS K2 |
K2 Weblayer (Web K2) |
Container (Docker) |
Linux |
600 MB (application) |
K2 AS |
K2 API |
Container (Docker) |
Linux |
15 MB (application) |
K2 AS |
K2 e-shop |
Web application (PHP/Apache, Nginx) |
Linux |
70 MB (application) |
K2 AS, K2 API |
K2 Image server |
Web service |
Linux |
160 MB (application) |
- |
K2 SmartSearch |
Linux service (Elasticsearch) |
Linux |
depending on deployment |
K2 e-shop |
Redis (Cache server) |
Linux service |
Linux |
depending on deployment |
K2 e-shop Premium |
K2 Backend Service |
Container (Docker) |
Linux |
depending on deployment |
Web K2 (K2 Weblayer) |
K2 AI Suggestions |
Container (Docker) |
Linux |
depending on deployment |
K2 Application server |