---
title: "Create a ClickHouse® Cluster"
sidebar_label: "Create a cluster"
description: "How to create a ClickHouse® cluster"
sidebar_position: 4
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import {TabItemLabel} from '@selectel/docux/components';
import CopyIcon from '@selectel/docux/icons/copy';
import Formbricks from '@theme/MDXComponents/Formbricks';

# Create a ClickHouse® cluster

1. In the [Dashboard](https://my.selectel.ru/vpc/default/dbaas/), on the top menu click **Products** and select **Managed Databases**.

2. Click **Create cluster**.

3. Enter the cluster name.

4. Select a [location](/infrastructure/locations.mdx). You cannot change the location after creating the cluster.

5. Select the DBMS — ClickHouse.

6. Select a [ClickHouse® version](/managed-databases/clickhouse/about-clickhouse.mdx#versions).

7. Fill in the following sections:

   * [Network](#network);
   * optional: [Security](#security);
   * [Node group configuration](#node-group-configuration);
   * [ClickHouse Keeper configuration](#clickhouse-keeper-configuration);
   * optional: [Logging](#logging);
   * optional: [DBMS settings](#settings).
   * [Administrator password](#administrators-password).

8. Check the price of the Managed Databases cluster.

9. Click **Create cluster**.

## Network \{#network}

A ClickHouse® cluster can only be connected to a private subnet. You can create a new subnet or add the cluster to an existing one.

1. To add an existing private subnet, in the **Subnet** field, select an existing subnet.

2. To add a new private subnet:

   2.1. In the **Subnet** field, select **New private subnet**.

   2.2. Optional: change the subnet CIDR.

   2.3. Optional: change the network in which the subnet will be created — you can select an existing network or create a new one. You cannot change the network after creating the cluster.

## Optional: Security \{#security}

Select [security groups](/managed-databases/clickhouse/network-access-control.mdx#security-groups-in-managed-databases) to filter incoming and outgoing cluster traffic.

If the **Security** block is missing, [traffic filtering (port security](/cloud-servers/cloud-networks/about-networks.mdx#traffic-filtering-port-security)) is disabled in the cluster network. If traffic filtering is disabled, all traffic will be allowed.

## Node group configuration \{#node-group-configuration}

1. Optional: change the node group name — [shard](/managed-databases/clickhouse/about-node-groups.mdx#shard).

2. Select a [configuration line](/managed-databases/clickhouse/configurations.mdx).

3. If you selected a line with custom configurations, select the disk type and specify the number of vCPUs, RAM size, and disk size.

4. If you selected a line with fixed configurations, select a configuration.

5. Specify the number of nodes in the shard. There can be no more than ten nodes in a shard.

6. Optional: to make shard nodes accessible from the internet, attach public IP addresses to them:

   * if you have selected an existing private subnet, select the **Enable public access** checkbox. The private subnet must meet the [requirements](/managed-databases/clickhouse/public-ip.mdx#requirements);
   * if you are creating a new private subnet, [attach public IP addresses](/managed-databases/clickhouse/public-ip.mdx#assign-public-ip-in-existing-cluster) after the cluster is created.

   A separate public IP address will be automatically assigned to each shard node.

7. Optional: specify the [shard weight](/managed-databases/clickhouse/about-node-groups.mdx#shard-weight). Values from 0 to 65 535 are available.

8. Optional: add additional shards:

   8.1.To add a shard with the same configuration, click <CopyIcon />.

   8.2.To add a shard with a different configuration, click **Add shard** and repeat steps 1–8.

## ClickHouse Keeper configuration \{#clickhouse-keeper-configuration}

The [ClickHouse® Keeper](/managed-databases/clickhouse/about-node-groups.mdx#clickhouse-keeper) node group is required for all cluster configurations except for one. It is added automatically if the cluster contains a shard with two or more nodes or several shards. ClickHouse® Keeper is removed automatically if the cluster consists of one shard with one node.

1. Optional: change the node group name.

2. Select a [configuration line](/managed-databases/clickhouse/configurations.mdx).

3. If you selected a line with custom configurations, select the disk type and specify the number of vCPUs, RAM size, and disk size.

4. If you selected a line with fixed configurations, select a configuration.

## Optional: Logging \{#logging}

To have access to [cluster logs](/managed-databases/clickhouse/logs), enable logging. Logging uses part of the cluster's computing resources.

1. Select the **Collect technical cluster logs into the log service** checkbox.

2. Select a log group or create a new one.

3. Optional: if you selected a new group, change its name.

## Optional: DBMS settings \{#settings}

To view the default [DBMS settings](/managed-databases/clickhouse/settings.mdx) or change them, click **Edit**. We recommend changing setting values only if necessary — incorrectly selected values can render the cluster inoperable or reduce its performance.

## Administrator password \{#administrators-password}

1. Enter the user password or click **Generate**. The password must contain:

   * at least 12 characters;
   * uppercase and lowercase Latin letters;
   * digits;
   * special characters — `!?@$%&*.`.

2. Copy and save the user password — it is required for [connecting to the cluster](/managed-databases/clickhouse/connect-to-cluster.mdx). The password cannot be viewed in the Control Panel, but it can be [changed](/managed-databases/clickhouse/manage-users.mdx#change-administrators-password).

ClickHouse® is a registered trademark of ClickHouse, Inc. https://clickhouse.com.

<Formbricks />
