Skip to content


You can use an external ClickHouse database instance outside the PMM Server container running on other hosts.

Environment variables

PMM predefines certain flags that allow you to use ClickHouse parameters as environment variables:


The PERCONA_TEST_* environment variables are experimental and subject to change. It is recommended that you use these variables for testing purposes only and not on production.

To use ClickHouse as an external database instance, use the following environment variables:

PERCONA_TEST_PMM_CLICKHOUSE_ADDR -> hostname:port : Name of the host and port of the external ClickHouse database instance.

Optional environment variables

PERCONA_TEST_PMM_CLICKHOUSE_DATABASE -> database name : Database name of the external ClickHouse database instance.

​​PERCONA_TEST_PMM_CLICKHOUSE_POOL_SIZE -> pool size : The maximum number of threads in the current connection thread pool. This value cannot be bigger than max_thread_pool_size.

PERCONA_TEST_PMM_CLICKHOUSE_BLOCK_SIZE -> max block size : The number of rows to load from tables in one block for this connection.


To use ClickHouse as an external database instance, start the PMM docker with the specified variables for external ClickHouse: ​​



To troubleshoot issues, see the ClickHouse troubleshooting documentation.

Last update: 2022-11-23