> ## Documentation Index
> Fetch the complete documentation index at: https://docs.less.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# ClickHouse

<Note>
  You need to make sure the Less IPs are whitelisted from your ClickHouse database. You can find the IPs [here](/guides/less-ip).

  You need to have a user account with write access to the database to be able to use the ClickHouse destination.
</Note>

### Setup

To connect to a ClickHouse database, the easiest is to find your connection string. You can find this by Clicking "Connect" in your Clickhouse environment. Then download the connection string. It should look something like this:

```
<config>
    <connections_credentials>
        <connection>
            <name>default</name>
            <hostname>hostname</hostname>
            <port>8443</port>
            <secure>1</secure>
            <user>default</user>
            <password>password</password>
            <!-- <history_file></history_file> -->
            <!-- <history_max_entries></history_max_entries> -->
            <!-- <accept-invalid-certificate>false</accept-invalid-certificate> -->
            <!-- <prompt></prompt> -->
        </connection>
    </connections_credentials>
</config>
```

Save those values for the steps below.

<Steps>
  <Step title="Account">
    The first step is input **server address**, **port** (almost always 8443), and the name of the **database** you want to extract data from.
  </Step>

  <Step title="Credentials">
    Input your **username** and **password** from the connection string you found above.
  </Step>

  <Step title="SSH">
    We recommend trying without SSH first if you're in doubt. If you are using a database that requires SSH, you can use the SSH connection method.

    Input your **SSH host**, **SSH port**, **SSH username**, and **SSH password** from the database's settings.

    You can also choose to use a private key instead of a password. Just check the "I want to use an SSH Key" checkbox and upload your private key file.
  </Step>

  <Step title="Test Connection">
    Once you have input your account and credential information, you need to validate your connection. Click "Test Connection" to confirm that we can connect to the database. Note that we **do not** change error message coming from the database.
  </Step>
</Steps>
