Skip to main content
Datawizz uses ClickHouse to store inference logs, feedback signals, and other data items. By default, the Docker Compose setup runs ClickHouse locally via the clickhouse profile. For production deployments, we recommend moving ClickHouse to a dedicated instance or managed service for better data redundancy and independent scaling.

Option 1: Standalone ClickHouse via Docker

Run ClickHouse on a separate machine using Docker:
This exposes:
  • Port 8123 — HTTP interface (used by the Datawizz app and logging services)
  • Port 9000 — Native TCP interface (used by the PostgreSQL FDW and migrations)
In production, restrict network access to these ports. Only the Datawizz instance and any services that need to query ClickHouse should be able to reach them.

Option 2: Managed ClickHouse Service

You can use a managed ClickHouse provider such as ClickHouse Cloud or any other hosted ClickHouse offering. Ensure the service exposes both HTTP and native TCP interfaces, and note the connection credentials for the next step.

Updating the Main Instance

Once your external ClickHouse is running, update the .env file on your main Datawizz instance:

1. Set the ClickHouse connection variables

2. Disable the local ClickHouse profile

Do not use the clickhouse or full profile when starting services. Instead, start with only the profiles you need:
If you previously ran with the clickhouse profile, the local container may still exist. You can remove it with docker compose --profile clickhouse down.

3. Run database migrations

The ClickHouse migrations need to run against your external instance. You can trigger them manually:
This uses the same CLICKHOUSE_HOST, CLICKHOUSE_USER, CLICKHOUSE_PASSWORD, and CLICKHOUSE_DATABASE env vars from your .env file. Check the logs to confirm success:

4. Restart services

Restart the Datawizz app and any gateway services so they pick up the new ClickHouse connection:

Verifying the Connection

You can verify the connection by checking the health of the Datawizz app and confirming data flows into the external ClickHouse: