> For the complete documentation index, see [llms.txt](https://docs.jetadmin.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jetadmin.io/user-guide/data-sources/databases/clickhouse.md).

# ClickHouse

This guide explains how to connect your ClickHouse database to Jet Admin in a few simple steps.

Before you begin, ensure you have:

* Access to a running instance of ClickHouse DB.
* Connection credentials: **Host**, **Port**, **Username**, **Password**, and the specific **Database Name**.

## Steps to Connect ClickHouse DB

1. **Log in to Jet Admin**: Open Jet Admin and navigate to your application.
2. **Add a New Resource**: In the left-side menu, go to the **Data** section and click **Add Resource**.
3. **Select ClickHouse DB**: From the list of data sources, choose **ClickHouse DB**.
4. **Provide Connection Details**: Enter the required credentials, including the Host, Port, Username, Password, and Database Name.
5. **Test the Connection**: Click **Test Connection** to ensure Jet Admin can successfully connect to your ClickHouse database.
6. **Select Tables**: Once the connection is established, choose the tables you want to use in Jet Admin.

![ClickHouse connection setup in Jet Admin with example placeholders and empty credential fields](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FjYHCCHAK4MbsJA9dXsLl%2Fclickhouse-connection-fields.jpg?alt=media)

Use the fields in your own connection form; the screenshot contains empty inputs or example placeholders.

{% @arcade/embed url="<https://app.arcade.software/share/DwGTnOClvIRVhPVtMg3B>" flowId="DwGTnOClvIRVhPVtMg3B" %}

{% hint style="info" %}
**Troubleshooting Tips**

1. **Connection Issues**: Double-check the credentials and ensure your ClickHouse instance is accessible.
2. **Firewall Rules**: If your ClickHouse DB is hosted in a secure environment, confirm that Jet Admin's IP addresses are whitelisted.
3. **SSL/TLS**: If your database requires encrypted connections, ensure SSL/TLS settings are correctly configured in ClickHouse and Jet Admin.
4. **Port Issues**: For ClickHouse, you need the **native connection type**. The default port for the native protocol with SSL/TLS is **9440**.
   * Make sure to use **native protocol SSL/TLS port**.
   * Refer to ClickHouse documentation for more details: [ClickHouse Network Ports](https://clickhouse.com/docs/en/guides/sre/network-ports).
     {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.jetadmin.io/user-guide/data-sources/databases/clickhouse.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
