Skip to main content
Version: 5.3

Deploying ClickHouse

Hardware and Software Requirements

Hardware specifications are described in the ClickHouse hardware requirements section. The list of software requirements can be found in the corresponding Software requirements section.

Information on Supported ClickHouse Versions

VersionType/SupportRecommendation
25.7MinimumRequired minimum.
25.8LTSRecommended.
Version Selection Policy

For installation, use the VERSION environment variable or explicitly specify the version number in the package name/parameter.

Installation from TGZ Archive

The official ClickHouse documentation recommends the following installation methods:

  • using deb packages for Debian/Ubuntu
  • using the rpm repository for RedHat-like systems
  • from tgz archives for Linux distributions

Adapted instructions are provided below for:

  • Debian / Ubuntu
  • RedHat / CentOS and other rpm-based distributions
  • Linux distributions (installation from tgz archives)

In all cases, it is separately described how to view available versions and select the required one.


Installing on Debian / Ubuntu from the Official Repository

Connecting the ClickHouse Repository

# Prerequisite packages
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg

# Download the ClickHouse GPG key and save it to the keyring
curl -fsSL 'https://packages.clickhouse.com/rpm/lts/repodata/repomd.xml.key' | sudo gpg --dearmor -o /usr/share/keyrings/clickhouse-keyring.gpg

# Determine the system architecture
ARCH=$(dpkg --print-architecture)

# Connect the ClickHouse repository (stable branch)
echo "deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg arch=${ARCH}] https://packages.clickhouse.com/deb stable main" | sudo tee /etc/apt/sources.list.d/clickhouse.list

# Update the package list
sudo apt-get update
Note

You can replace stable with lts if you need to use the LTS release line. The current list of releases and their types (LTS, fast, etc.) is available in the ClickHouse changelog.

Viewing Available ClickHouse Versions (Debian / Ubuntu)

After connecting the repository, you can list the available package versions using the following commands:

apt-cache madison clickhouse-server

or:

apt-cache policy clickhouse-server

The output will contain several lines with versions; select the required version (e.g., 25.7.4.11 or a newer LTS/Stable release).

Version Consistency

For correct operation, it is recommended to install all core packages with the same version: clickhouse-common-static, clickhouse-server, clickhouse-client. When installing a specific version, you need to specify it for all these packages.

Installing a Specific ClickHouse Version (Debian / Ubuntu)

Once the version is selected, assign it to the VERSION variable:

Example
export VERSION=25.7.4.11 

Install the packages of this version using the following command:

sudo apt-get install -y   clickhouse-common-static=${VERSION}   clickhouse-server=${VERSION}   clickhouse-client=${VERSION}

Alternatively, you can specify the version directly in the command without using a variable:

sudo apt-get install   clickhouse-server=25.7.4.11   clickhouse-client=25.7.4.11   clickhouse-common-static=25.7.4.11

Starting ClickHouse Server and Client (Debian / Ubuntu)

Starting the server
sudo service clickhouse-server start
Connection
# Connect via the client:
clickhouse-client
# or, if a password is configured:
clickhouse-client --password

Installing and Starting ClickHouse Keeper on Dedicated Nodes (Optional)

After preparing the Keeper configuration file on each dedicated node, execute the following commands in order:

sudo apt-get install -y clickhouse-keeper

sudo systemctl enable clickhouse-keeper
sudo systemctl start clickhouse-keeper
sudo systemctl status clickhouse-keeper

Installing on RedHat / CentOS and Other RPM‑Based Distributions

Connecting the ClickHouse RPM Repository

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://packages.clickhouse.com/rpm/clickhouse.repo

For systems with zypper (openSUSE, SLES), use the following commands:

sudo zypper addrepo -r https://packages.clickhouse.com/rpm/clickhouse.repo -g
sudo zypper --gpg-auto-import-keys refresh clickhouse-stable

Viewing Available ClickHouse Versions (RedHat / CentOS)

After connecting the repository, you can list all available package versions:

sudo yum list clickhouse-server --showduplicates

or, if necessary, filter and sort the output:

sudo yum list clickhouse-server --showduplicates | sort -r

Select the required version, e.g., 25.7.4.11 or the current LTS release. Installing a specific version is supported by appending the version number to the package name.

Installing a Specific ClickHouse Version (RedHat / CentOS)

Assign the selected version:

Example
export VERSION=25.7.4.11 

Install the server and client of this version using the following command:

sudo yum install -y   clickhouse-server-${VERSION}   clickhouse-client-${VERSION}

If needed, you can add clickhouse-common-static-${VERSION} and other packages (e.g., clickhouse-common-static-dbg).

Starting ClickHouse (RedHat / CentOS)

sudo systemctl enable clickhouse-server
sudo systemctl start clickhouse-server
sudo systemctl status clickhouse-server

clickhouse-client
# or if a password is set:
clickhouse-client --password

Installing ClickHouse Keeper (Optional)

sudo yum install -y clickhouse-keeper
sudo systemctl enable clickhouse-keeper
sudo systemctl start clickhouse-keeper
sudo systemctl status clickhouse-keeper
Important Note!

To ensure fault tolerance and stability of production clusters, ClickHouse Keeper should be deployed on separate servers, not co-located with ClickHouse Server.


Installation from TGZ Archives (Other Linux)

This method is recommended for distributions without full deb/rpm package support, as well as in cases where full control over the directory structure and installation process is required.

Viewing Available ClickHouse Versions (tgz)

Available tgz archives are published in the repository:

  • https://packages.clickhouse.com/tgz/stable/ — stable releases
  • https://packages.clickhouse.com/tgz/lts/ — LTS releases

Use a browser or the command line to view the list of versions. For example, to get the list of versions from the auxiliary file version_date.tsv:

curl -s https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/utils/list-versions/version_date.tsv |   awk -F'	' '{print $1}' | sort -Vr | head

The command will output several recent versions. Select the one approved for use in your environment (typically a specific LTS or stable release).

After selecting, assign the version to a variable:

Example
export VERSION=25.7.4.11 

Determining the Target System Architecture

Determine the architecture and assign it to the ARCH variable:

case $(uname -m) in
x86_64) ARCH=amd64 ;; # 64‑bit Intel/AMD
aarch64) ARCH=arm64 ;; # 64‑bit ARM
*) echo "Unknown architecture $(uname -m)"; exit 1 ;;
esac

export ARCH

Downloading ClickHouse Archives

Download the tgz archives for the core ClickHouse components of the specified version. The download algorithm sequentially checks the availability of:

  1. An archive for a specific architecture
  2. A universal archive (without the architecture specified in the name)
for PKG in clickhouse-common-static clickhouse-common-static-dbg clickhouse-server clickhouse-client clickhouse-keeper
do
curl -fO "https://packages.clickhouse.com/tgz/stable/$PKG-$VERSION-${ARCH}.tgz" || curl -fO "https://packages.clickhouse.com/tgz/stable/$PKG-$VERSION.tgz"
done

If necessary, you can replace stable with lts if using the LTS release line.

Installation on the Target Host

Next, extract and install each component using the built-in doinst.sh scripts of the chosen version.

Installing clickhouse-common-static

tar -xzvf "clickhouse-common-static-$VERSION-${ARCH}.tgz"   || tar -xzvf "clickhouse-common-static-$VERSION.tgz"
sudo "clickhouse-common-static-$VERSION/install/doinst.sh"

Installing clickhouse-common-static-dbg (Optional)

tar -xzvf "clickhouse-common-static-dbg-$VERSION-${ARCH}.tgz"   || tar -xzvf "clickhouse-common-static-dbg-$VERSION.tgz"
sudo "clickhouse-common-static-dbg-$VERSION/install/doinst.sh"

Installing and Starting clickhouse-server

tar -xzvf "clickhouse-server-$VERSION-${ARCH}.tgz"   || tar -xzvf "clickhouse-server-$VERSION.tgz"
sudo "clickhouse-server-$VERSION/install/doinst.sh" configure

# start the server
sudo /etc/init.d/clickhouse-server start

Installing clickhouse-client

tar -xzvf "clickhouse-client-$VERSION-${ARCH}.tgz"   || tar -xzvf "clickhouse-client-$VERSION.tgz"
sudo "clickhouse-client-$VERSION/install/doinst.sh"

After installation, connect to the server:

clickhouse-client
# or:
clickhouse-client --password

Password for the default User and Network Access

During installation, you will be prompted to set a password for the built-in default user. This password is saved in the file /etc/clickhouse-server/users.d/default-password.xml. It can be changed at any time by editing this configuration file.

By default, ClickHouse listens only on the local interface. If you need to accept connections from other servers, check the listen_host parameter and related settings in config.xml, as well as firewall rules and network ACLs.