Skip to main content

Configuration Reference

All configuration surfaces in Konsolidat, from the .env file to the Frappe doctypes to the dbt project. Each table names the file or doctype it was read from on 2026-11-05.

Environment Variables (.env)​

Read by docker-compose.yml (${VAR:-default} substitutions), deploy.sh, and docker-compose.cluster.yml. Copy .env.example to .env, or run ./deploy.sh, which generates .env with random secrets on the first run and keeps it on later runs.

Required secrets

Three variables are guarded in docker-compose.yml with ${VAR:?...} and have no fallback. The stack refuses to start until they are set: CLICKHOUSE_PASSWORD, DB_ROOT_PASSWORD and ADMIN_PASSWORD. ./deploy.sh generates them. The placeholder values in .env.example are not meant to work.

Frappe​

VariableDefault in .env.exampleRequiredConsumer
ADMIN_PASSWORDadmin123 (placeholder; replaced by deploy.sh)yesconfigurator creates the site with it; written to .credentials
SITE_NAMEkonsolidat.localAll Frappe services; the backend health check and Caddy send it as the Host header
FRAPPE_PORT8069Host port of frappe_backend

FRAPPE_BRANCH is not in .env.example any more. The image is built for Frappe version-16 only (Python 3.14, Node 24). deploy.sh runs scripts/check-frappe-branch.sh, which refuses a .env whose FRAPPE_BRANCH names any other branch; delete the line or set it to version-16. Compose no longer passes it as a build argument.

MariaDB​

VariableDefaultRequiredConsumer
DB_ROOT_PASSWORDrootpassword (placeholder)yesmariadb, configurator, backup, deploy.sh restore

ClickHouse​

VariableDefaultRequiredConsumer
CLICKHOUSE_USERdefaultclickhouse, all Frappe services, backup
CLICKHOUSE_PASSWORDopen_epm_dev (placeholder)yesSame; deploy.sh replaces it with a random secret on first run
CLICKHOUSE_MEASURE_CHECK_PASSWORDblankPassword of konsol_measure_check, the read-only ClickHouse user konsol runs a Measure expression as (SELECT on epm_silver.silver_gl_entries only, at most 5 seconds; konsol#229). Read by clickhouse (clickhouse/set-password.sh defines the user) and configurator (docker/configurator/init.sh passes it to konsol). deploy.sh generates it for a new and an existing .env. Blank: no such user, and konsol reports expressions "not checked"
CLICKHOUSE_HTTP_PORT8123Host port for the HTTP API
CLICKHOUSE_NATIVE_PORT9000Host port for the native protocol
EXCEL_ODBC_PORT15432Host port for the PostgreSQL wire protocol (clickhouse/postgres_compat.xml)
CLICKHOUSE_BIND127.0.0.1Host interface the three ports bind to. Loopback by default; set 0.0.0.0 only with TLS and a strong password
DBT_TARGETdevdbt profile target: dev (plaintext loopback), prod (TLS, CLICKHOUSE_PORT default 8443), cluster (TLS plus ON CLUSTER konsol_cluster). konsol's own TLS is set in EPM Settings

Inside the Compose network the Frappe services reach ClickHouse at clickhouse:8123; the host port variables only change the published ports.

Caddy reverse proxy​

VariableDefaultRequiredConsumer
HTTP_PORT80caddy
HTTPS_PORT443caddy
SITE_DOMAINlocalhostcaddy site address; deploy.sh --domain sets it
SITE_SCHEMEhttphttp serves plain HTTP (correct for localhost, an IP, a LAN or a VM); https enables Caddy auto-HTTPS with Let's Encrypt for a real DNS name. deploy.sh --domain picks it from the value (konsolidat#59)

Backup​

VariableDefaultRequiredConsumer
BACKUP_RETENTION_DAYS7backup deletes older directories
BACKUP_PATH./backupsHost directory mounted at /backups in backup
BACKUP_S3_BUCKETunset (commented out)backup runs aws s3 sync when set and the aws CLI is present (it is not in the image today)

Optional overrides (commented out in .env.example)​

VariableConsumer
KONSOL_REPOdeploy.sh step 2: Git URL of the konsol app (default https://github.com/grynn-in/konsol.git)
KONSOL_BRANCHdeploy.sh step 2: branch to stage (default main)
D365_TENANT_ID, D365_CLIENT_ID, D365_CLIENT_SECRET, D365_ENVIRONMENT_URLNothing in the stack reads them. ERP credentials live on the Connector document; these lines remain in .env.example as a reminder
AIRBYTE_API_URLNothing in the stack reads it. The Airbyte URL lives in EPM Settings. Airbyte is a second stack installed by scripts/setup-airbyte.sh

Side-by-side upgrade stack​

docker-compose.v16.yml is an overlay that runs a second, independent stack from the same checkout for verifying an upgrade: docker compose -p konsolidat16 --env-file .env.v16 -f docker-compose.yml -f docker-compose.v16.yml up -d. Copy .env to .env.v16 and change every host port; the overlay renames the containers, moves the network to 172.31.0.0/24, and puts Caddy behind a profile. See the Deployment Guide.

Frappe EPM Settings​

A Single DocType named EPM Settings in the Pipeline module (konsol/pipeline/doctype/epm_settings/epm_settings.json). Permission: System Manager only. The configurator writes the ClickHouse connection on every deploy (konsol.install.setup_epm_settings), so edit those fields only on a bare-metal install.

ClickHouse tab​

FieldTypeDefaultDescription
clickhouse_hostDatalocalhostSet to clickhouse by the configurator
clickhouse_portData8123HTTP port
clickhouse_userDatadefault
clickhouse_passwordPassword-
clickhouse_secureCheck0HTTPS to ClickHouse. Required over any non-loopback network
clickhouse_verify_tlsCheck1Verify the certificate; shown when clickhouse_secure is on

Airbyte tab​

FieldTypeDefaultDescription
skip_airbyte_syncCheck0Pipeline Runs skip the extract phase
airbyte_api_urlDatahttp://localhost:8000Airbyte base URL
airbyte_connection_idData-Site-wide connection, used when a run has no Connector
airbyte_client_id, airbyte_client_secretData, Password-Airbyte application credentials (public API token)
airbyte_workspace_id, airbyte_destination_idData-Used by Connector Test & Provision Airbyte
airbyte_clickhouse_hostData172.30.0.10ClickHouse address as seen from Airbyte pods
airbyte_clickhouse_portInt8123
airbyte_clickhouse_databaseDataepm_rawLanding database for raw rows
airbyte_d365_source_definition_id, airbyte_erpnext_source_definition_idData-Custom connector definitions in Airbyte
webhook_secretPassword-X-Webhook-Secret for konsol.api.airbyte_sync_complete

D365 Write-Back tab (legacy)​

The section is labelled "D365 F&O Budget Write-Back (Legacy)". New setups put write-back credentials on the Connector (writeback_enabled, writeback_*).

FieldTypeDefaultDescription
enable_d365_budget_writebackCheck0Master switch
d365_resource_url, d365_tenant_id, d365_client_id, d365_client_secretData, Password-OAuth client credentials
d365_fiscal_year_start_monthInt1Maps budget periods to AccountingDate; shown when write-back is enabled

Airbyte Sync Status tab (read-only)​

last_airbyte_sync_at (Datetime), last_airbyte_sync_status (Success, Failed, Partial, Running), last_airbyte_sync_rows (Int). Written by the webhook.

dbt & Access Control tab​

FieldTypeDefaultDescription
dbt_project_pathData/home/frappe/dbt_projectThe bind mount of ./dbt_project in every Frappe container
entity_permission_doctypeLink (DocType)-DocType whose User Permissions scope entities for the API. Blank allows all
restrict_entities_by_defaultCheck0Deny entities to a user with no User Permission instead of allowing all
account_permission_doctypeLink (DocType)-DocType whose User Permissions scope account categories for budget writes. Blank allows all

Close tab​

FieldTypeDefaultDescription
tb_accepts_opening, tb_accepts_closing, tb_accepts_adjustmentCheck0Whether Opening, Closing and Adjustment periods accept trial balances
default_amount_basisSelectblankPeriod movement, Year-to-date movement, or Period-end balance; the basis used when an upload does not declare one

Close policy itself (first close period, self_approval, rate_move_threshold, deadlines, holidays) is in the separate Close Settings single doctype (module Consolidation).

dbt project (dbt_project/dbt_project.yml)​

konsol-managed vars​

Between the markers # --- BEGIN konsol-managed vars (regenerated; do not edit by hand) --- and # --- END konsol-managed vars ---, konsol/dbt_config.py rewrites exactly five keys whenever a Dimension or Measure is published or an EPM Fiscal Year changes: dimensions, base_measures, fiscal_extra_periods, fiscal_quarter_mapping, fiscal_half_mapping. Everything outside the markers is preserved byte for byte. Because ./dbt_project is a bind mount, a publish in Desk edits the file in your checkout; commit the result.

vars:
dimensions: # one entry per Published Dimension
- name: dim_cost_center
source_column: dim_cost_center
label: Cost Center
cube_type: string
in_budget: true
allocation_role: cost_center # Dimension field kept for compatibility; nothing reads it since konsol#264
base_measures: # one entry per Published Measure
- name: period_net_amount
expression: sum(debit_amount) - sum(credit_amount)
label: Net Amount
cube_type: sum
fiscal_extra_periods:
- { period: 0, label: OPN, quarter: OPN, half: OPN }
- { period: 13, label: CLS, quarter: CLS, half: CLS }
fiscal_quarter_mapping: { 1: Q1, 2: Q1, 3: Q1, 4: Q2, ... 12: Q4 }
fiscal_half_mapping: { 1: H1, ... 6: H1, 7: H2, ... 12: H2 }

The default Measures seeded on install (create-if-missing, konsol/defaults/measure.json) are period_debit, period_credit, period_net_amount, transaction_count, ytd_net_amount and the budget, variance, cash-flow and consolidated measures. Dimensions ship empty: a site declares its own.

Hand-maintained vars​

VarDefaultMeaning
erp_sources[]Which ERP adapters build and union into the canonical staging models. Empty means trial-balance uploads are the only source (konsolidat#207). Set [d365_fo], [erpnext] or both, and commit; or pass --vars at run time. Deliberately not derived from Connectors (konsolidat#139)
cluster_enabledfalseSwitch the cluster_* macros to ReplicatedMergeTree and ON CLUSTER; needs the cluster profile target and a real cluster

Materialization and tags​

LayerSchemaMaterializationTags
staging (canonical, d365_fo, erpnext)stagingviewstaging, plus the folder name
bronzebronzetablebronze
silversilvertablesilver
goldgoldtablegold, plus a konsol-managed domain:<name> tag per model (actuals, consolidation, reporting, scenarios, staging)

Schemas are prefixed with the profile schema epm, so the databases are epm_staging, epm_bronze, epm_silver and epm_gold. The domain tags are regenerated from the Build Scope and Build Model fixtures; scripts/check_gold_domains.py asserts every gold model carries one.

on-run-start​

Two CREATE TABLE IF NOT EXISTS statements run before every build: epm_staging.sync_watermark (with reconcile_run_id, konsolidat#246) and epm_staging.intercompany_accounts. They are kept identical to konsol's DDL by tests.

Profile (dbt_project/profiles.yml)​

Shipped inside the project and selected with --profiles-dir /home/frappe/dbt_project. Targets dev, prod, cluster read CLICKHOUSE_HOST, CLICKHOUSE_PORT, CLICKHOUSE_USER, CLICKHOUSE_PASSWORD, CLICKHOUSE_SCHEMA and DBT_TARGET from the environment; the Frappe containers get them from compose.

ClickHouse databases​

clickhouse/init-db.sql and clickhouse/raw-schema.sql run on the first start of an empty volume.

DatabaseWritten byPurpose
epmdbt profile schema rootRarely holds tables
epm_rawAirbyte, Trial Balance SubmissionRaw ERP rows (raw-schema.sql creates the 14 D365 landing tables empty) and trial_balance_submissions plus its control table
epm_stagingkonsol write-through, dbt viewskonsol-owned reference tables (entities, main_accounts, fiscal_periods, group_exchange_rates, ownership_periods, consolidation_hierarchy, ic_elimination_rules, dimension_mappings, reporting_hierarchies, business combinations and disposals, sync_watermark, and others), and the dbt staging views
epm_bronzedbtBronze tables
epm_silverdbtSilver tables
epm_golddbt, konsol budget tablesGold tables read by the API and Excel

Docker Compose services​

ServiceImageHost portsProfile
mariadbmariadb:10.11nonedefault
redis_cache, redis_queueredis:7-alpinenonedefault
clickhouseclickhouse/clickhouse-server:24.8-alpine8123, 9000, 15432 on CLICKHOUSE_BINDdefault
frappe_backend<project>-frappe:latest (the only build:)FRAPPE_PORTdefault
frappe_worker, frappe_schedulersame imagenonedefault
caddycaddy:2-alpineHTTP_PORT, HTTPS_PORTdefault
configurator, dbt_initsame image as backendnonesetup
backupsame image as backendnonebackup

All containers log to json-file with max-size: 100m, max-file: 3. Volumes: mariadb_data, clickhouse_data, clickhouse_logs, frappe_sites, frappe_logs, caddy_data, caddy_config. Network: open_epm, subnet 172.30.0.0/24, ClickHouse pinned at 172.30.0.10.

Environment passed to every Frappe container: DB_HOST=mariadb, REDIS_CACHE_HOST=redis_cache, REDIS_QUEUE_HOST=redis_queue, SITE_NAME, CLICKHOUSE_HOST=clickhouse, CLICKHOUSE_PORT=8123, CLICKHOUSE_USER, CLICKHOUSE_PASSWORD, DBT_PROJECT_DIR=/home/frappe/dbt_project.

Excel add-in​

The add-in is served by Frappe from /assets/konsol/excel-addin/ (konsol/public/excel-addin/ in the konsol repository). Its worksheet functions are registered in the K namespace (functions.json: PING, EPM, EPM_BUDGET, EPM_VARIANCE, EPM_DEBIT, EPM_CREDIT, CF, EPMSAVE), so a cell calls =K.EPM(...). The shipped manifest.xml points every URL at https://demo.konsolidat.com; replace them with your SITE_DOMAIN before sideloading, because the functions call the server the add-in was loaded from. Signing in on the task pane stores the session the functions use. Caddy adds the frame-ancestors * and CORS headers Excel Online needs for those paths. See the Excel Custom Functions and Task Pane guides.

Airbyte connectors​

Two custom Airbyte sources ship in the repository: source-d365-fno/ (14 OData streams) and source-erpnext/ (6 doctype streams). Both land in epm_raw at 172.30.0.10:8123. Their settings are on the D365 Integration and ERPNext Integration pages.