# ClickHouse on Unbroker

Fast open-source column database for real-time analytics

Canonical URL: https://unbroker.cloud/templates/clickhouse
Catalog revision: c4e9e9b65202d3133ced7e02671e3867a1c86d27

[Deploy ClickHouse](https://app.unbroker.cloud/apps?template=clickhouse)

[Template source](https://github.com/unbroker-app/unbroker-cloud-templates/tree/c4e9e9b65202d3133ced7e02671e3867a1c86d27/templates/clickhouse)

## Plan requirements

Template container services, databases and persistent volumes require Pro. Resource usage is billed separately. Review the configuration and pricing before deploying.

[Pricing](https://unbroker.cloud/pricing)

## Deployment inputs

- **CLICKHOUSE_PASSWORD** (required): Password for the "default" user. Every query over the public URL needs it, so make it long.

## Deploy button

Add this to a README or website. It opens this template's deploy form in Unbroker Cloud.

```markdown
[![Deploy on Unbroker](https://unbroker.cloud/button.svg)](https://app.unbroker.cloud/apps?template=clickhouse)
```

The open-source column-oriented database for real-time analytics: SQL over
billions of rows in milliseconds, with compression that keeps the disk small.

## What gets deployed

| Service | Image | Notes |
|---|---|---|
| **ClickHouse** | `clickhouse/clickhouse-server:26.8.27.9` (LTS) | Public HTTP interface. Data on a 10 GB volume |

## After deploy

Your URL serves ClickHouse's **HTTP interface** over HTTPS. Sign in as
`default` with the password from the deploy form:

- **In the browser**: open `https://<your-url>/play` for the built-in SQL
  console.
- **From code**: any HTTP client, e.g. Python's `clickhouse-connect`:
  ```python
  import clickhouse_connect
  client = clickhouse_connect.get_client(host="<your-url>", port=443, secure=True,
                                         username="default", password="…")
  ```
- **curl**:
  ```bash
  curl -u default:… https://<your-url>/ --data-binary "SELECT version()"
  ```

`default` can manage access: create a user per app with `CREATE USER … IDENTIFIED BY …`
and `GRANT`.

## Good to know

- Only the HTTP interface is exposed. The native TCP protocol (port 9000,
  used by `clickhouse-client`) is not reachable from outside. Use
  `clickhouse-client` from inside the project, or an HTTP client.
- Changing `CLICKHOUSE_PASSWORD` and redeploying changes the `default` user's
  password.
- ClickHouse uses up to 90% of the memory it is given. 2 GB or more is
  comfortable for real workloads.

## Service configuration

- **ClickHouse**: clickhouse/clickhouse-server:26.8.27.9. Public URL. 10 GiB persistent storage.

## Project links

- [Website](https://clickhouse.com)
- [Source code](https://github.com/ClickHouse/ClickHouse)
- [Documentation](https://clickhouse.com/docs)

## More templates

- [Directus](https://unbroker.cloud/templates/directus): Instant REST and GraphQL API with a no-code admin app for any SQL database
- [Flowise](https://unbroker.cloud/templates/flowise): Build AI agents and LLM workflows visually
- [Ghost](https://unbroker.cloud/templates/ghost): Publishing platform for blogs, newsletters and memberships

[All templates](https://unbroker.cloud/templates)
