Skip to main content
Towbar’s clickhouse preset runs ClickHouse 25.8 Alpine on amd64 or arm64. It uses HTTP port 8123, stores data in /var/lib/clickhouse, and performs authenticated checks with clickhouse-client.

Declare the resource

.towbar/resources/clickhouse.resource.yml
Towbar requires CLICKHOUSE_USER and CLICKHOUSE_PASSWORD. CLICKHOUSE_DB makes the initial application database explicit.

Connect from an app

Containers on the application network can use the ClickHouse HTTP interface at clickhouse:8123. Save credentials and the final connection URL in the app’s runtime secrets. The optional tunnel binds 18123 only to server loopback.

Initialization and credential changes

Initialization variables apply to an empty data directory. Replacing them does not reconcile users or databases already stored by ClickHouse. Apply those changes in ClickHouse, verify the new login, and then update Towbar.

Back up and restore

Towbar uses ClickHouse’s native backup archive and restores all non-system databases into a fresh target volume. Recovery requires ClickHouse major version 25. Continue with Database backups and Database restores.
Last modified on September 22, 2026