Skip to main content
The tables below list the files and directories of a self-managed ClickHouse server that was installed from the official deb or rpm packages and runs with the default configuration. Every location that the server uses can be changed in the configuration, and other ways of installing ClickHouse (the Docker image, a standalone binary) can use different ones, so see how to check the paths on your server.

Configuration

See Configuration files for the rules of merging.

Logs

The files are rotated; the default configuration keeps ten files of up to 1000 MB each. The paths and the rotation are set in the logger section.

Data

The server stores its data under one directory, set by the path setting. The table data of a MergeTree table is in its directory under store/, one subdirectory per data part, plus a detached/ subdirectory for detached parts.

Binaries and services

The server runs as the clickhouse user and group, which own the data and log directories.

Check the paths on your server

The data directory that the server really uses is the path of the default disk:
The path settings of the server configuration are in system.server_settings:
For a setting that is not set in the configuration (changed = 0), the table shows the built-in default under /var/lib/clickhouse/, while the server places the directory under the configured path. Each table reports where its data and its definition are stored:

Paths that are not on the file system

Some settings in config.xml look like file paths but name nodes in ClickHouse Keeper, for example /clickhouse/task_queue/ddl, the queue of ON CLUSTER queries in the distributed_ddl section.