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.
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
| Variable | Default in .env.example | Required | Consumer |
|---|---|---|---|
ADMIN_PASSWORD | admin123 (placeholder; replaced by deploy.sh) | yes | configurator creates the site with it; written to .credentials |
SITE_NAME | konsolidat.local | All Frappe services; the backend health check and Caddy send it as the Host header | |
FRAPPE_PORT | 8069 | Host 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
| Variable | Default | Required | Consumer |
|---|---|---|---|
DB_ROOT_PASSWORD | rootpassword (placeholder) | yes | mariadb, configurator, backup, deploy.sh restore |
ClickHouse
| Variable | Default | Required | Consumer |
|---|---|---|---|
CLICKHOUSE_USER | default | clickhouse, all Frappe services, backup | |
CLICKHOUSE_PASSWORD | open_epm_dev (placeholder) | yes | Same; deploy.sh replaces it with a random secret on first run |
CLICKHOUSE_MEASURE_CHECK_PASSWORD | blank | Password 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_PORT | 8123 | Host port for the HTTP API | |
CLICKHOUSE_NATIVE_PORT | 9000 | Host port for the native protocol | |
EXCEL_ODBC_PORT | 15432 | Host port for the PostgreSQL wire protocol (clickhouse/postgres_compat.xml) | |
CLICKHOUSE_BIND | 127.0.0.1 | Host interface the three ports bind to. Loopback by default; set 0.0.0.0 only with TLS and a strong password | |
DBT_TARGET | dev | dbt 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
| Variable | Default | Required | Consumer |
|---|---|---|---|
HTTP_PORT | 80 | caddy | |
HTTPS_PORT | 443 | caddy | |
SITE_DOMAIN | localhost | caddy site address; deploy.sh --domain sets it | |
SITE_SCHEME | http | http 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
| Variable | Default | Required | Consumer |
|---|---|---|---|
BACKUP_RETENTION_DAYS | 7 | backup deletes older directories | |
BACKUP_PATH | ./backups | Host directory mounted at /backups in backup | |
BACKUP_S3_BUCKET | unset (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)
| Variable | Consumer |
|---|---|
KONSOL_REPO | deploy.sh step 2: Git URL of the konsol app (default https://github.com/grynn-in/konsol.git) |
KONSOL_BRANCH | deploy.sh step 2: branch to stage (default main) |
D365_TENANT_ID, D365_CLIENT_ID, D365_CLIENT_SECRET, D365_ENVIRONMENT_URL | Nothing in the stack reads them. ERP credentials live on the Connector document; these lines remain in .env.example as a reminder |
AIRBYTE_API_URL | Nothing 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
| Field | Type | Default | Description |
|---|---|---|---|
clickhouse_host | Data | localhost | Set to clickhouse by the configurator |
clickhouse_port | Data | 8123 | HTTP port |
clickhouse_user | Data | default | |
clickhouse_password | Password | - | |
clickhouse_secure | Check | 0 | HTTPS to ClickHouse. Required over any non-loopback network |
clickhouse_verify_tls | Check | 1 | Verify the certificate; shown when clickhouse_secure is on |
Airbyte tab
| Field | Type | Default | Description |
|---|---|---|---|
skip_airbyte_sync | Check | 0 | Pipeline Runs skip the extract phase |
airbyte_api_url | Data | http://localhost:8000 | Airbyte base URL |
airbyte_connection_id | Data | - | Site-wide connection, used when a run has no Connector |
airbyte_client_id, airbyte_client_secret | Data, Password | - | Airbyte application credentials (public API token) |
airbyte_workspace_id, airbyte_destination_id | Data | - | Used by Connector Test & Provision Airbyte |
airbyte_clickhouse_host | Data | 172.30.0.10 | ClickHouse address as seen from Airbyte pods |
airbyte_clickhouse_port | Int | 8123 | |
airbyte_clickhouse_database | Data | epm_raw | Landing database for raw rows |
airbyte_d365_source_definition_id, airbyte_erpnext_source_definition_id | Data | - | Custom connector definitions in Airbyte |
webhook_secret | Password | - | 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_*).
| Field | Type | Default | Description |
|---|---|---|---|
enable_d365_budget_writeback | Check | 0 | Master switch |
d365_resource_url, d365_tenant_id, d365_client_id, d365_client_secret | Data, Password | - | OAuth client credentials |
d365_fiscal_year_start_month | Int | 1 | Maps 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
| Field | Type | Default | Description |
|---|---|---|---|
dbt_project_path | Data | /home/frappe/dbt_project | The bind mount of ./dbt_project in every Frappe container |
entity_permission_doctype | Link (DocType) | - | DocType whose User Permissions scope entities for the API. Blank allows all |
restrict_entities_by_default | Check | 0 | Deny entities to a user with no User Permission instead of allowing all |
account_permission_doctype | Link (DocType) | - | DocType whose User Permissions scope account categories for budget writes. Blank allows all |
Close tab
| Field | Type | Default | Description |
|---|---|---|---|
tb_accepts_opening, tb_accepts_closing, tb_accepts_adjustment | Check | 0 | Whether Opening, Closing and Adjustment periods accept trial balances |
default_amount_basis | Select | blank | Period 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
| Var | Default | Meaning |
|---|---|---|
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_enabled | false | Switch the cluster_* macros to ReplicatedMergeTree and ON CLUSTER; needs the cluster profile target and a real cluster |
Materialization and tags
| Layer | Schema | Materialization | Tags |
|---|---|---|---|
staging (canonical, d365_fo, erpnext) | staging | view | staging, plus the folder name |
| bronze | bronze | table | bronze |
| silver | silver | table | silver |
| gold | gold | table | gold, 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.
| Database | Written by | Purpose |
|---|---|---|
epm | dbt profile schema root | Rarely holds tables |
epm_raw | Airbyte, Trial Balance Submission | Raw ERP rows (raw-schema.sql creates the 14 D365 landing tables empty) and trial_balance_submissions plus its control table |
epm_staging | konsol write-through, dbt views | konsol-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_bronze | dbt | Bronze tables |
epm_silver | dbt | Silver tables |
epm_gold | dbt, konsol budget tables | Gold tables read by the API and Excel |
Docker Compose services
| Service | Image | Host ports | Profile |
|---|---|---|---|
mariadb | mariadb:10.11 | none | default |
redis_cache, redis_queue | redis:7-alpine | none | default |
clickhouse | clickhouse/clickhouse-server:24.8-alpine | 8123, 9000, 15432 on CLICKHOUSE_BIND | default |
frappe_backend | <project>-frappe:latest (the only build:) | FRAPPE_PORT | default |
frappe_worker, frappe_scheduler | same image | none | default |
caddy | caddy:2-alpine | HTTP_PORT, HTTPS_PORT | default |
configurator, dbt_init | same image as backend | none | setup |
backup | same image as backend | none | backup |
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.