Setup Guide
Complete installation of Konsolidat: the Docker stack (ClickHouse, MariaDB, Redis, Frappe with the konsol app, dbt, Caddy), Airbyte for ERP extraction, and the Excel add-in. The Quickstart is the short version of sections 1, 2 and 6.
Prerequisites
| Component | Version | Needed for |
|---|---|---|
| Docker Engine with Compose v2 | 24+ | The whole stack |
| Host | 4 vCPU, 8 GB RAM, 80 GB SSD; Ubuntu 22.04 tested | Image build needs the memory |
| Excel | Microsoft 365 desktop or Excel on the web | The K. worksheet functions and the task pane |
| ERP | D365 F&O or ERPNext | Optional. Entities can upload trial balances instead |
For a native bench only: Python 3.14, Node 24, MariaDB 10.11, Redis 7, pkg-config and libmariadb-dev | Frappe version-16 | Section 5 (alternative) |
1. Clone the repository
git clone https://github.com/grynn-in/konsolidat.git
cd konsolidat
Do not copy .env.example by hand unless you want to set every secret yourself: ./deploy.sh generates .env with random passwords on the first run. If you do copy it, set ADMIN_PASSWORD, DB_ROOT_PASSWORD and CLICKHOUSE_PASSWORD; the stack refuses to start with the placeholders. Do not add a FRAPPE_BRANCH line; the image is Frappe version-16 only, and deploy.sh rejects any other value.
2. Deploy the stack
./deploy.sh # or: ./deploy.sh --domain epm.yourcompany.com
docker compose up -d starts the whole stack (12 services, see the Deployment Guide), not only ClickHouse. The first time, use deploy.sh: it also stages the konsol app, builds the image, runs the configurator that creates the site and installs konsol, and runs the dbt build. The steps, run by hand, are:
docker compose up -d mariadb redis_cache redis_queue clickhouse
docker compose build frappe_backend # the one Frappe image
docker compose --profile setup run --rm configurator # site setup, or bench migrate
docker compose up -d
docker compose --profile setup run --rm dbt_init # dbt build
ClickHouse listens on 127.0.0.1 (CLICKHOUSE_BIND): HTTP 8123, native 9000, PostgreSQL wire 15432. clickhouse/init-db.sql creates six databases: epm, epm_raw, epm_staging, epm_bronze, epm_silver, epm_gold, plus the konsol-owned reference tables in epm_staging; clickhouse/raw-schema.sql creates the 14 empty D365 landing tables in epm_raw.
Verify:
./deploy.sh status
curl -s "http://localhost:8123/?query=SHOW+DATABASES" -u "default:$(grep ^CLICKHOUSE_PASSWORD= .env | cut -d= -f2)"
curl -s -H "Host: konsolidat.local" http://localhost:8069/api/method/konsol.api.health
Frappe answers on http://localhost:8069 and through Caddy on port 80 (443 with a real domain). Log in as Administrator with the password in .credentials.
3. Load data
There is no demo data. Data comes from trial balance uploads, from an ERP connector, or both.
- Trial balances: one entity-period through the Trial Balance Submission form, or one file for many entities and periods through Trial Balance Upload (Check file, then Load). The required columns are
data_area_id, fiscal_year, fiscal_period, main_account, debit, credit, currency; optionaldescription,partner,amount_basis. - ERP connector: section 4.
Before either, declare the entities, the fiscal year and the chart of accounts in Desk. The Initial Setup Guide is the walk-through.
4. Set up Airbyte (ERP extraction)
Skip this section if your entities upload trial balances.
4.1 Install Airbyte
bash scripts/setup-airbyte.sh
The script installs abctl, runs abctl local install (Airbyte in its own local kind cluster), and attaches that cluster to the open_epm Docker network so sync pods can reach ClickHouse. It prints the UI URL (http://localhost:8000), the login (abctl local credentials), and the destination settings. This is a development posture; a production Airbyte is an open decision (konsolidat#90).
4.2 Register the ERP credentials
- D365 F&O: an Azure app registration with application permissions on D365, registered in D365 under Microsoft Entra ID applications. Steps on the D365 Integration page.
- ERPNext: an API key and secret from User, Settings, API Access. Steps on the ERPNext Integration page.
4.3 Create the Connector
In Desk, create a Connector (module Pipeline): erp_type d365_fo or erpnext, the credentials in the Extract Credentials tab, the legal entities it serves, and the dimension column mappings. Click Test Extract, then Test & Provision Airbyte. Provisioning needs the Airbyte application credentials, workspace, destination and source definition ids in EPM Settings (Airbyte tab); the destination is ClickHouse at 172.30.0.10:8123, database epm_raw.
The D365 connector ships 14 streams, the ERPNext connector 6; both pages list them.
4.4 Enable the adapter in dbt
In dbt_project/dbt_project.yml, set the hand-maintained var:
vars:
erp_sources: [d365_fo] # or [erpnext], or both
It defaults to [], so no ERP staging model builds until you set it (konsolidat#207). Commit the change.
4.5 Run a sync
Open Pipeline Run, click New, then Run Pipeline. The run extracts through Airbyte, then builds dbt. Set the Airbyte webhook to /api/method/konsol.api.airbyte_sync_complete with the X-Webhook-Secret header so sync status reaches konsol and the Connector Health list.
5. Alternative: a native Frappe bench
The Docker image is the supported runtime. For development you can run konsol on a bench on the host. konsol runs on Frappe v16, which needs Python 3.14, Node 24, and pkg-config with the MariaDB client headers (libmariadb-dev) to build mysqlclient.
pip install frappe-bench
bench init frappe-bench --frappe-branch version-16
cd frappe-bench
bench get-app https://github.com/grynn-in/konsol.git
bench new-site konsolidat.local --db-type mariadb --admin-password admin
bench --site konsolidat.local install-app konsol
./env/bin/pip install dbt-core dbt-clickhouse # dbt in the bench venv, as the image does
bench start
Then open EPM Settings and set the ClickHouse host, port, user and password, and dbt_project_path to your checkout's dbt_project/. The configurator does this for you in Docker; on a bench you do it by hand. Run dbt with ./env/bin/dbt build --profiles-dir <checkout>/dbt_project --project-dir <checkout>/dbt_project with CLICKHOUSE_HOST, CLICKHOUSE_PASSWORD and so on in the environment; the profile is in the project.
6. Install the Excel add-in
The konsol Office add-in provides the K. worksheet functions (K.EPM, K.EPM_BUDGET, K.EPM_VARIANCE, K.EPM_DEBIT, K.EPM_CREDIT, K.CF, K.EPMSAVE, K.PING) and the Konsolidat task pane. There is no VBA module to import.
- Set the site's public https address:
bench --site <site> set-config host_name https://<public address>. The manifest is built from it, and without it the download is refused. Then download the manifest from your site: in Desk, Close Settings → Excel Add-in → Download Excel add-in, or openhttps://<your site>/api/method/konsol.excel_addin.manifest. The file iskonsolidat-<site>.xml, and every address in it is your site's, built from the site'shost_name. Frappe serves the add-in files at/assets/konsol/excel-addin/. If you installed an older staticmanifest.xml, remove that add-in first. - In Excel, choose Insert, My Add-ins, Upload My Add-in and select the manifest.
- The Konsolidat button appears on the Home tab. Open the task pane and sign in with your Frappe user and password. The task pane also shows the latest pipeline run and can start a new one.
- In any cell:
=K.EPM("<entity_code>", 2025, 1, "<account>").
The manifest needs no editing: every address in it, AppDomains included, is the site's own. See the Excel Task Pane Guide.
Verification checklist
./deploy.sh statusshows every serviceUp, infrastructurehealthySHOW DATABASESon ClickHouse returns the sixepm*databaseskonsol.api.healthreturns"status": "ok"- Frappe Desk opens at
http://localhost:8069and/desk/konsolshows the Konsol workspace - A Trial Balance Upload or a Pipeline Run has completed, and
epm_gold.gold_trial_balancehas rows =K.EPM("<entity_code>", <year>, <period>, "<account>")returns a number
Next steps
- Initial Setup Guide: entities, chart, fiscal calendar, rates, connectors, pipelines
- Configuration Reference: every variable and setting
- Excel Custom Functions: building reports with the
K.functions - Deployment Guide: production, backup, upgrade