---
title: "Create a PostgreSQL cluster for 1C"
sidebar_label: "Create cluster"
sidebar_position: 3
description: "How to create a PostgreSQL cluster for 1C and connect a database to a 1C server"
---

import Formbricks from '@theme/MDXComponents/Formbricks';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import { TabItemLabel } from '@selectel/docux/components';
import EditIcon from '@selectel/docux/icons/edit';
import CheckIcon from '@selectel/docux/icons/check';

# Create a PostgreSQL cluster for 1C

In Managed Databases, you can create a PostgreSQL cluster customized specifically to work with 1C:Enterprise.

## Create cluster \{#create-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 creation.

5. Select the database engine — PostgreSQL 1C.

6. Select the [PostgreSQL version](/managed-databases/postgresql-for-1c/configurations.mdx#versions). You cannot change the version after creation.

7. Fill in the following blocks:

   * [Node configuration](#node-configuration);
   * optional: [Fault tolerance](#cluster-fault-tolerance);
   * optional: [Logging](#logging);
   * [Network](#network);
   * optional: [Security](#security);
   * optional: [Database settings](#settings).

8. Check the cluster price.

9. Click **Create cluster**.

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

The choice of configuration depends on the number of users simultaneously working in 1C and the size of the information base. For example, if up to 50 users are working in 1C simultaneously, a configuration with 4 vCPUs and 16 GB of RAM is suitable. If there are more than 50 users, we recommend a configuration with 8 vCPUs and 32 GB of RAM.

1. Select a [configuration line](/managed-databases/postgresql-for-1c/configurations.mdx#configuration-lines).

2. If you selected a line with custom configurations, select the [disk type](/managed-databases/postgresql-for-1c/volumes.mdx), specify the number of vCPUs, RAM size, and disk size.

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

After creating the cluster, you can change the node configuration — [scale the cluster](/managed-databases/postgresql-for-1c/resize-cluster.mdx).

### Optional: Fault tolerance \{#cluster-fault-tolerance}

To ensure cluster fault tolerance, add replicas — full copies of the master node. To do this, specify the number of nodes in the cluster. The first node is the master node, the rest are replicas. Replicas are read-only (`SELECT`).

For a multi-node cluster, the following  [SLA](https://files.selectel.ru/docs/ru/conditions-cloud-platform.pdf) applies — we guarantee 99.95% write availability and 99.99% read availability.

### Optional: Logging \{#logging}

To access the [cluster logs](/managed-databases/postgresql-for-1c/logs.mdx), enable logging. Logging consumes some of the cluster's computing resources.

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

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

3. If you selected a new group, enter its name.

### Network \{#network}

A PostgreSQL for 1C cluster can be added to a new or already existing subnet.The subnet can be:

* [private](/cloud-servers/cloud-networks/private-networks-and-subnets.mdx) — with no internet access.You can assign a [public IP address](/managed-databases/postgresql-for-1c/public-ip.mdx) for internet access.Each cluster node is assigned a separate public IP address.To [assign a public IP address](/managed-databases/postgresql-for-1c/public-ip.mdx#assign-public-ip-in-existing-cluster), the private subnet must meet the [requirements](/managed-databases/postgresql-for-1c/public-ip.mdx#requirements);

* [public](/cloud-servers/cloud-networks/public-subnets.mdx) — in which all addresses are accessible from the internet.

<Tabs queryString="create-nets">
  <TabItem value="private-net" default>
    <TabItemLabel>
      Private subnet
    </TabItemLabel>

    1. To add an existing private subnet:

       1.1. In the **Subnet** field, select an existing subnet. The number of addresses in the selected subnet must be at least equal to the number of nodes in the cluster. You cannot change the subnet after creating the cluster.

       1.2. Optional: to make cluster nodes accessible from the internet, select the **Public access to cluster nodes** checkbox, then select the checkbox for the node you need to provide public access to. The private subnet must meet the [requirements](/managed-databases/postgresql-for-1c/public-ip/#requirements). If the subnet does not meet the [requirements](/managed-databases/postgresql-for-1c/public-ip.mdx#requirements), you can [assign a public IP address](/managed-databases/postgresql-for-1c/public-ip.mdx#assign-public-ip-in-existing-cluster) after creating the cluster.

    2. To add a new private subnet:

       2.1. In the **Subnet** field, select **New private subnet**. The number of addresses in the subnet must be at least equal to the number of nodes in the cluster. You cannot change the subnet after creating the cluster.

       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.
  </TabItem>

  <TabItem value="public-net">
    <TabItemLabel>
      Public subnet
    </TabItemLabel>

    1. To add an existing public subnet, in the **Subnet** field, select an existing subnet. The number of addresses in the selected subnet must be at least equal to the number of nodes in the cluster. You cannot change the subnet after creating the cluster.

    2. To add a new public subnet:

       2.1. In the **Subnet** field, select **New public subnet**. The number of addresses in the subnet must be at least equal to the number of nodes in the cluster. You cannot change the subnet after creating the cluster.

       2.2. Optional: change the subnet size.
  </TabItem>
</Tabs>

### Optional: Security \{#security}

Select the [security groups](/managed-databases/postgresql-for-1c/network-access-control-1c.mdx#security-groups-in-managed-databases) for filtering incoming and outgoing cluster traffic.

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

### Optional: Database settings \{#settings}

To view the default values of [database settings](/managed-databases/postgresql-for-1c/settings.mdx) or change them, click **Edit**. We recommend changing setting values only when necessary — incorrectly chosen values can lead to cluster failure or performance degradation.

## Create a database \{#create-database}

1. [Create a user](/managed-databases/postgresql-for-1c/manage-users-1c.mdx) — the database must have an owner user.
2. In the [Dashboard](https://my.selectel.ru/vpc/default/dbaas/), on the top menu, click **Products** and select **Managed Databases**.
3. Open the **Active** tab.
4. Open the cluster page → **Databases** tab.
5. Click **Create database**.
6. Enter the database name.
7. Select the database owner user.
8. Enter the character set locale (`LC_CTYPE`), which is responsible for character classification and case conversion.After the database is created, the locale cannot be changed.Read more about locales in the [PostgreSQL documentation](https://postgrespro.ru/docs/postgresql/12/locale).
9. Enter the collation locale (`LC_COLLATE`), which defines the settings for string and character comparison and influences sorting.After the database is created, the locale cannot be changed.
10. Click **Create**.

## Connect the database to the 1C server \{#connect-database-to-1c-server}

To connect a PostgreSQL database as a 1C information base, use the following parameters in the 1C:Enterprise information base addition form:

* Secure connection — **Disabled**;
* DBMS type — **PostgreSQL**;
* Database server — **\<master node DNS address> port:5432**;
* Database name — **Name of the created database**;
* Database user — **Username**;
* User password — **Password**.

<Formbricks />
