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

# Connect to ClickHouse

> Connect Tamery to ClickHouse or ClickHouse Cloud over HTTP or HTTPS.

Tamery connects to ClickHouse over its HTTP interface. Two schemes:

**HTTP (port 8123):**

```bash theme={null}
clickhouse://username:password@hostname:8123/database
```

**HTTPS (port 8443):**

```bash theme={null}
clickhouses://username:password@hostname:8443/database
```

| Part            | Description                                 |
| --------------- | ------------------------------------------- |
| `username`      | ClickHouse user (e.g. `default`)            |
| `password`      | Password for that user                      |
| `hostname`      | Host (e.g. `localhost` or a remote address) |
| `8123` / `8443` | HTTP / HTTPS port                           |
| `database`      | Database name                               |

## ClickHouse Cloud

Get the string from the [Cloud console](https://console.clickhouse.cloud) → your service → **Connect**. Cloud requires TLS, so use `clickhouses://` on port 8443:

```bash theme={null}
clickhouses://default:your-password@abc123xyz.us-east-1.aws.clickhouse.cloud:8443/default
```

## Self-hosted

Default ports: HTTP `8123`, native TCP `9000`. Tamery uses HTTP, so use `8123` (or `8443` with `clickhouses://` if TLS is configured):

```bash theme={null}
clickhouse://default:password@localhost:8123/default
```

No password? Omit it:

```bash theme={null}
clickhouse://default@localhost:8123/default
```

<Tip>
  **Test connection** before saving. If it fails, confirm the HTTP interface is enabled and
  reachable on the expected port.
</Tip>
