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

# Bring Your Own ClickHouse Cloud

> Create a ClickHouse Cloud service from scratch and connect it to your Platinur workspace — step by step.

Platinur builds your governed warehouse **on your own ClickHouse**. If your workspace wasn't
created with a managed warehouse, this guide takes you from zero to connected: create a
ClickHouse Cloud service, collect three values, and paste them into Platinur.

You need no ClickHouse experience — the whole thing takes about ten minutes, most of which is
waiting for the service to provision.

<Info>
  Already have a running ClickHouse Cloud service? Skip to
  [Step 3 — collect your connection details](#step-3-collect-your-connection-details).
</Info>

## Step 1 — Create a ClickHouse Cloud account

1. Go to [clickhouse.com](https://clickhouse.com/) and choose **Get started** (ClickHouse
   Cloud offers a free trial with credits — no card needed to begin).
2. Sign up with your work email (or Google/Microsoft SSO) and verify the address.
3. When asked, create your **organization** — your company name is fine.

## Step 2 — Create a service

A *service* is your actual ClickHouse database. From the ClickHouse Cloud console:

1. Choose **New service**.
2. **Name** it something recognizable — e.g. `acme-analytics`.
3. Pick a **cloud provider and region** close to where your source data and team live
   (this is where your data will physically reside).
4. Pick the plan tier — the entry tier is plenty to start; you can scale later without
   reconnecting anything.
5. Create the service and wait for it to reach **Running** (a few minutes).

<Note>
  ClickHouse Cloud services **idle automatically** when unused and wake on the first
  connection. This is normal and saves you money — Platinur knows about it and waits for the
  wake-up when testing the connection.
</Note>

## Step 3 — Collect your connection details

When the service is created, ClickHouse shows a **connection screen** (you can always get
back to it later via the service's **Connect** button). You need exactly three values:

| What         | Where to find it                                                                                   | Example                                    |
| ------------ | -------------------------------------------------------------------------------------------------- | ------------------------------------------ |
| **Host**     | The service endpoint, shown under Connect (HTTPS). Copy the hostname only — no `https://`, no port | `abc123xyz.eu-west-1.aws.clickhouse.cloud` |
| **Username** | Shown on the same screen                                                                           | `default`                                  |
| **Password** | Generated when the service is created — **copy it now**; it is shown once                          | `x7…`                                      |

<Warning>
  The password is displayed **only at creation time**. If you didn't save it, don't worry —
  open the service in the ClickHouse console and use **Reset password**, then use the new one.
</Warning>

You do **not** need ports, TLS settings, or anything else — Platinur's defaults match
ClickHouse Cloud exactly (TLS on, HTTPS port 8443).

## Step 4 — Connect it in Platinur

1. Sign in to your Platinur workspace and open **Configuration** from the sidebar.
2. In the **Data Warehouse** card, select **ClickHouse**.
3. Paste the three values: **Host**, **Username**, **Password**.
4. Press **Test connection**.

A successful test **binds** the warehouse to your workspace and checks off the first step of
your setup checklist. From here on, everything Platinur builds — raw source data, cleaned
models, your marts — lives in this service, under your ownership.

<Note>
  If the very first test takes \~30 seconds, that's your idled service waking up — Platinur
  retries through the wake automatically. If it still fails afterwards, run the test once more.
</Note>

### What Platinur creates in your service

Platinur keeps a strict, predictable layout — it only ever writes to its own databases:

* `raw_<source>` — one database per connected source (e.g. `raw_stripe`), where loads land.
* `stg_staging`, `stg_dw`, `stg_marts` — the staging environment's built layers.
* `prod_staging`, `prod_dw`, `prod_marts` — the production layers.
* A temporary `*_validation` database during proposal validation, dropped after each run.

Databases you created yourself are treated as read-only **external sources** — Platinur can
model from them but never modifies them. See
[Data Boundary](/configuration/data-boundary) for the full contract.

## Good to know

* **The warehouse is chosen once per workspace.** After binding, you can update the
  credentials any time (Configuration → Data Warehouse — type a new password and press
  *Test & save connection*), but switching to a different warehouse requires a workspace
  reset.
* **Credentials are stored encrypted** in your workspace's secret store — never in files,
  logs, or generated code. The password field always reads "Stored securely"; Platinur never
  displays it back.
* **IP access lists:** ClickHouse Cloud services allow connections from anywhere by default.
  If your organization restricts the service's IP access list, add Platinur's address —
  contact support for the current one.
* **A dedicated user (optional hardening):** the `default` user is fine to start. For
  production you can create a dedicated `platinur` user in the ClickHouse console
  (Settings → Users) with permission to create and manage databases, and connect with that
  instead.

## Next steps

With the warehouse bound, the setup checklist walks you through the rest:

1. [Connect GitHub](/configuration/github) — one click installs the Platinur GitHub App.
2. [Connect a source](/sources/integrations) and load your data.
3. [Build your models](/operations/initial-run) — the guided first build interviews you
   about your business and proposes your warehouse.
