---
title: "Connect to PostgreSQL for 1C cluster"
sidebar_label: "Connect to cluster"
sidebar_position: 8
description: "How to connect to a PostgreSQL for 1C cluster with or without an SSL certificate in the console and from various programming languages"
---

import Formbricks from '@theme/MDXComponents/Formbricks'
import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
import {TabItemLabel} from '@selectel/docux/components'
import ConnectionAddresses from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/managed-databases/common/connection-addresses.mdx'

# Connect to PostgreSQL for 1C cluster

You can [connect](#connect-to-cluster) to a PostgreSQL for 1C cluster via:

* the psql console client;
* pgAdmin database management GUI tool;
* 1C:Enterprise and other office suites or applications with ODBC or JDBC support;
* application code.

Connection with an SSL certificate is unavailable.

When connecting, specify the [port](#connection-ports) and [address](#connection-addresses).

## Connection ports \{#connection-ports}

To connect to PostgreSQL for 1C, use the following ports:

* 5432 — port for connecting directly to the PostgreSQL for 1C process;
* 6432 — port for connecting to the master node.

## Connection addresses \{#connection-addresses}

<ConnectionAddresses DatabaseName="PostgreSQL for 1C" slug="postgresql-for-1c" />

## Connect to cluster \{#connect-to-cluster}

<Tabs queryString="connect-to-cluster">
  <TabItem value="1c" default>
    <TabItemLabel>
      1C:Enterprise
    </TabItemLabel>

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

    * **Secure connection** — disabled;
    * **DBMS type** — PostgreSQL;
    * **Database server** — DNS address or [public floating IP address](/managed-databases/postgresql-for-1c/public-ip.mdx) of the node;
    * **Database name** — name of the created database;
    * **Database user** — database user name;
    * **User password** — password.
  </TabItem>

  <TabItem value="bash">
    <TabItemLabel>
      Bash
    </TabItemLabel>

    ```bash
    psql "host=<host> \
          port=<port> \
          dbname=<database_name> \
          user=<database_user_name> \
          sslmode=disable"
    ```

    Specify:

    * `<host>` — DNS address or [public floating IP address](/managed-databases/postgresql-for-1c/public-ip.mdx) of the node;
    * `<port>` — [connection port](#connection-ports);
    * `<database_name>` — database name;
    * `<database_user_name>` — database user name.
  </TabItem>
</Tabs>

<Formbricks />
