Skip to main content

ClickHouse (clickhouse)

Column-oriented analytics database for traces, audit events and usage metrics. Single server or sharded and replicated cluster with ClickHouse Keeper.

Generated from catalog/services/clickhouse.yaml: do not edit by hand.

Summary​

Version25.3.3.42
Useinstall and configure
Layerinfrastructure (shown apart)
CategoryData platforms
Installation methodspodman, package
External connectionclickhouse
Sandbox onlyno

Licence​

SPDX identifierApache-2.0
Licence policycore licence (MIT or Apache-2.0)
Licence exception-
Platform componentclickhouse

Packages and artifacts​

A package the project of the service publishes (its image, its binary archive, its Python or OS package) carries the licence of the service; a third-party package carries the licence written on its row, read from the official upstream metadata.

KindPackageVersionLicenceDetails
container imagedocker.io/clickhouse/clickhouse-server25.3.3.42Apache-2.0image key server, used by keeper, server, digest sha256:cc6b7488017512db99bff97c493030152bb786249afdfec8b6714eaf16a6f4ae
OS packageclickhouse-serverversion of the configured repositoryApache-2.0RHEL family (dnf)
OS packageclickhouse-clientversion of the configured repositoryApache-2.0RHEL family (dnf)
OS packageclickhouse-common-staticversion of the configured repositoryApache-2.0RHEL family (dnf)
OS packageclickhouse-serverversion of the configured repositoryApache-2.0Debian family (apt)
OS packageclickhouse-clientversion of the configured repositoryApache-2.0Debian family (apt)
OS packageclickhouse-common-staticversion of the configured repositoryApache-2.0Debian family (apt)

Images are pinned by tag in the descriptor, and by digest when the descriptor declares one (the offline bundle then refuses a pulled image that does not carry it); the digest is recorded in the mirror of the Manager when the offline bundle is imported, and every pull or load is checked against it.

Supported systems and architectures​

MethodOperating systemsArchitectures
podmanRHEL family (dnf), Debian family (apt), Arch Linux (pacman)x86_64, aarch64 (not restricted by the descriptor)
packageRHEL family (dnf), Debian family (apt)x86_64, aarch64 (not restricted by the descriptor)

Certified host systems: RHEL 8/9/10, Rocky Linux 8/9/10, AlmaLinux 8/9/10, Oracle Linux 8/9, CentOS Stream 9/10, Ubuntu 22.04/24.04, Debian 12, Arch Linux (rolling). The host preflight accepts these systems (other releases of a known family give a warning, end of life releases are refused) and the x86_64 and aarch64 architectures.

Prerequisites​

Host​

  • at least 4096 MB of memory (blocking, memory).
  • at least 2 CPU (warning, cpu).

Network and ports​

ComponentPort namePortOpened in the host firewall
keeperkeeper9181/tcpyes
keeperraft9234/tcpyes
serverhttp8123/tcpyes
servernative9000/tcpyes
serverinterserver9009/tcpyes
servermetrics9363/tcpyes

Services and connections needed​

This service has no dependency.

Installation methods and modes​

MethodDefaultWhat the method uses
podmanyesthe container images of the descriptor, run by Podman under systemd
package-the OS packages of the descriptor, installed by the package manager of the host

Components​

ComponentKindInstallation methodsPorts
ClickHouse Keeper (keeper)masterpodman, package9181/tcp, 9234/tcp
ClickHouse server (server)masterpodman, package8123/tcp, 9000/tcp, 9009/tcp, 9363/tcp

Single server (standalone) (default)​

One ClickHouse server without Keeper.

What the mode deploys:

ComponentPlacement
keepernot used
servermin 1, max 1

Sharded and replicated (cluster)​

Shards of replicas (servers count multiple of the replicas) coordinated by 3 or 5 Keeper nodes.

What the mode deploys:

ComponentPlacement
keepermin 3, max 5, odd number, recommended 3
servermin 2, recommended 4

Install this service​

The install wizard of the Navin Manager plans, validates and runs the installation; you need the services:install permission on the cluster.

  1. Open the wizard. In Clusters, choose the row action Install services of the target cluster. The wizard opens on its first step, Service.

  2. Choose the service. On the Service step, select ClickHouse. The card shows the licence Apache-2.0. Pick the Method among podman, package (default podman). To register an existing clickhouse service of your organisation instead, turn on Use an existing external service.

  3. Choose the hosts and the mode. On the Hosts step, tick the hosts, then choose the Mode: standalone (default), cluster. Each mode deploys the components listed in Installation methods and modes. With several components, place each one on its hosts in Component placement (Suggest placement proposes a placement that respects the cardinalities).

  4. Bindings. This service has no dependency: the Bindings step has nothing to bind.

  5. Configure. On the Configure step, review the parameters (see Configuration parameters). Passwords left empty with a generated default are generated and sealed by the Manager.

  6. Review and install. On the Install step the Manager validates the plan and shows the installation order; when it says "The plan is valid. Ready to install.", choose Install. A highly available mode is installed only when its HA checks pass.

  7. Verify. The operation ends when the health checks of every instance pass (see Health checks); the service then shows as running in Services.

High availability​

Clusternative (native)
High availabilitynative (native)
Failoverclient side (client)
Replicationnative (native)
QuorumClickHouse Keeper (keeper)
Discoverystatic (static)
Entry pointany node (any-node)
Official documentationhttps://clickhouse.com/docs/guides/oss/deployment-and-scaling/keeper
Peer TLS parametertls_enabled
Cluster status commandsystem_clusters

Topology per mode​

ModesHighest catalog levelDistributionQuorum componentFault domainsDescription
standalonestandalone (standalone)single (single)-1One server without Keeper, no replication.
clustercluster (cluster)active-active (active-active)keeper3Shards of 2 or more replicas coordinated by 3 or 5 ClickHouse Keeper nodes.

Notes​

  • Only Replicated*MergeTree tables are copied between replicas; a plain MergeTree table lives on one server.
  • Place the Keeper nodes in distinct fault domains: losing the Keeper majority makes the replicated tables read only.

Configuration parameters​

Network​

ParameterTypeDefaultAllowed valuesRequiredSecretRestartDescription
HTTP port (http_port)port8123-nononoPort of the HTTP interface (HTTPS only when TLS is on).
Native port (native_port)port9000-nononoPort of the native TCP protocol (native protocol over TLS only when TLS is on).
Interserver port (interserver_port)port9009-nononoPort used by replicas to fetch parts (HTTPS only when TLS is on).
Metrics port (metrics_port)port9363-nononoPort of the Prometheus endpoint. Unused when TLS is on: /metrics is then served over HTTPS on the HTTP port.

Cluster​

ParameterTypeDefaultAllowed valuesRequiredSecretRestartDescription
Keeper client port (keeper_port)port9181-nononoPort of ClickHouse Keeper for the servers (TLS only when TLS is on).
Keeper Raft port (keeper_raft_port)port9234-nononoPort of the Raft protocol between Keeper nodes (secure Raft when TLS is on).
Cluster name (cluster_name)stringnavin^[a-z][a-z0-9_]{0,40}$nononoName of the cluster in remote_servers (ON CLUSTER).
Replicas per shard (replicas)int2min 1, max 5nononoServers per shard; the servers are grouped in topology order.

Tuning​

ParameterTypeDefaultAllowed valuesRequiredSecretRestartDescription
Memory ratio (max_server_memory_ratio)float0.8min 0.1, max 0.95nononoShare of the host memory the server may use.

Security​

ParameterTypeDefaultAllowed valuesRequiredSecretRestartDescription
Administrator password (admin_password)passwordgenerated-noyesnoPassword of the navin_admin user (access management, operator commands).
Interserver password (interserver_password)passwordgenerated-noyesnoCredential shared by the replicas.
TLS (tls_enabled)boolfalse-nonoyesServe HTTPS, the native protocol over TLS, interserver HTTPS and, in cluster mode, Keeper and its Raft over TLS with the certificate issued by the manager CA; the plaintext ports are closed.

Endpoints​

EndpointSchemeComponentPortPathTLS parameterBinding parametersBinding secretsProvisioning command
httphttpserver8123 (http_port)-tls_enabledusername, database, tlspasswordprovision_consumer
nativeclickhouseserver9000 (native_port)-tls_enabledusername, database, tlspasswordprovision_consumer

Commands​

CommandComponentTargetDescription
Provision a consumer database (provision_consumer)serverfirst hostCreates or updates the user and the database of one consumer service on the whole cluster (idempotent).
Provision the telemetry database (provision_telemetry)serverfirst hostCreates the database navin_manager of the real-time telemetry of the machines and services, its writer navin_manager (NM_CLICKHOUSE_USER of the Manager) and the read only user navin_reader of the SQL analyses and of the dashboards run by the client (idempotent).
Cluster layout (system_clusters)serverfirst hostLists system.clusters (shards, replicas, errors).
Replication queue (replication_queue)serverevery hostShows the pending replication tasks of every server.

Command parameters​

CommandParameterTypeDefaultRequiredDescription
provision_consumerDatabase (database)string-yesDatabase of the consumer.
provision_consumerUser (username)string-yesUser of the consumer.
provision_consumerPassword (password)password-yesPassword of the user (derived per consumer).
provision_telemetryWriter password (writer_password)password-yesPassword of navin_manager, the user the Manager exports with (NM_CLICKHOUSE_PASSWORD_FILE).
provision_telemetryReader password (reader_password)password-yesPassword of navin_reader, read only user of the dashboards (SELECT on navin_manager only).

Health checks​

Liveness (per instance)​

ComponentCheckDetails
keeperTCP {{ host.ip or '127.0.0.1' }}:{{ config.keeper_port }}-
serverHTTP {{ ('https://' ~ host.fqdn) if config.tls_enabled else ('http://' ~ (host.ip or '127.0.0.1')) }}:{{ config.http_port }}/pingExpected 200; Expected Ok.; 60 retries

Readiness (service check)​

CheckDetails
HTTP {{ ('https://' ~ host.fqdn) if config.tls_enabled else ('http://' ~ (host.ip or '127.0.0.1')) }}:{{ config.http_port }}/pingExpected 200

Preflight checks​

CheckTypeMeaningSeverityComponents
memorymemory_mb {"min": 4096}at least 4096 MB of memoryblockingevery component
cpucpu_count {"min": 2}at least 2 CPUwarningevery component
http_port_freeport_free {"param": "http_port"}port 8123 free on the hostblockingserver

Backup and restore​

Native BACKUP of every non system database to the local disk navin_backups, archived; the restore drops the non system databases and runs RESTORE (P5C-008, engines clickhouse_backup and clickhouse_restore). Mode standalone only: the sharded mode needs BACKUP ON CLUSTER to a shared disk and is refused by the script with an explicit message.

Formatclickhouse-native
Componentserver
Files{{ backup.dir }}/clickhouse.tar.gz
Restore testno
Instances stopped for the restoreno

Uninstall​

Paths removed when the data is purged: {{ paths.data }}, {{ paths.log }}.

  • Play (SQL console): {{ 'https' if config.tls_enabled else 'http' }}://{{ host.fqdn }}:{{ config.http_port }}/play

Upstream documentation​