---
url: https://kit.kambium.net/docs/local-runtime.md
---
# Local runtime reference

To start the app and sign in, see [Run locally](https://kit.kambium.net/docs/local-development.md).

## Local runtime requirements

* **Supabase CLI 3.2 or 3.3 for a fresh stack.** Use a compatible CLI on PATH or run
  `npm install -D -E supabase@3.3.0` in the app directory. The Kit reads the
  `config.toml` these versions create. [Supabase CLI config change](https://supabase.com/changelog/supabase-cli-config-jsonc-default)
* **Redis 7+.** Native mode needs both `redis-server` and `redis-cli` on PATH.
  [Redis installation](https://redis.io/docs/latest/operate/oss_and_stack/install/)

Native mode supports Apple silicon macOS 14+ and Linux x64 or arm64 with glibc 2.35+.
[Supabase runtime support](https://supabase.com/docs/guides/local-development/docker-and-native-runtimes)

## Runtime selection

The CLI starts native Supabase and Redis by default. `--docker` runs both in
Docker. The CLI saves that choice with the local state. Use a separate app
directory to try another runtime. Git branch changes reuse the same local stack.

## Schema and state

Local setup imports the schema from installed core into your app's
`supabase/migrations/` and records `supabase/kambium-schema.json`. Commit the SQL
and metadata. Local commands never target hosted databases; use the
[hosted setup](https://kit.kambium.net/docs/cloud-supabase.md) when deploying.

Local settings and encryption keys stay in the ignored `.local/kambium/`
directory. Keep the keys while retaining encrypted data.

## Optional local commands

The local launcher prepares services and schema as part of startup. For the
generated app's simulator arguments, see [Run locally](https://kit.kambium.net/docs/local-development.md).

* `npm run local:up` prepares the services and schema without running the app.
* `npm run local:check` runs the example task and verifies its saved result and
  success event. Success prints `Local engine task passed:` with `status: 'done'`;
  IDs are recorded in `.local/kambium/last-check.json`.

The check creates its own test user and workspace and reuses the user on later
runs. Signing in through the dashboard does not automatically open that workspace.

<span id="development-seeding-unreleased"></span>

## Development seeding

`npm run local:seed` in generated apps calls `kambium local seed --slack-sim`.
It prepares local services and pending migrations, then runs the app-owned
`local-seed.ts` with local settings. Review pending SQL before running it after
schema changes. Saved runtime selection is reused; seeding never silently resets
data or switches an existing stack.

The generated recipe creates or reuses a development identity, workspace and
inactive Example Slack bot, connects simulated Slack and selects its first
channel. Run the seed, then [start the app](https://kit.kambium.net/docs/local-development.md) and use the
printed email to sign in through Mailpit. The seed records IDs in private
`.local/kambium/seed.json`. Later runs
preserve names, configuration, existing activation state and simulator edits.
Deleted/moved recorded entities and ownership conflicts fail for explicit
resolution. Customize the app's recipe for other engines and scenarios.

A matching running simulator is reused. Otherwise the seed owns a temporary
simulator process and retains its checkpoint when finished. A custom
`--airtable-sim path/to/scenario.json` must match the scenario used by the app.
The app is constructed for its normal authenticated APIs without listening;
seeding does not start the dashboard or sign the browser in automatically.

<span id="service-status-unreleased"></span>

## Service status

`kambium local status --json` returns a versioned observation report containing
public URLs, statuses and check time. `npm run local:status` provides readable
output in new generated apps. The command does not prepare services, apply
migrations or create local files. Missing/stopped services remain in the report
rather than making the command fail; malformed arguments fail normally.

Supabase checks verify the local stack and Auth API response, not schema or data
operations. Redis checks verify app ownership before PING; simulator checks use
its retained authorization. Backend/dashboard responses establish HTTP
reachability at saved local URLs with unverified process ownership. No service
credentials appear in either output format.

## Inspect local data

Find logs, inbox and data tools in [Inspect services and data](https://kit.kambium.net/docs/local-tools.md).

## Local configuration files

The CLI keeps its Supabase configuration in `.local/kambium/stack/` and leaves
existing `.env` and root `supabase/config.toml` files unchanged.

Local settings are stored in `.local/kambium/env` with owner-only permissions.
They override inherited hosted Supabase/Postmark settings when starting the local
app. Credential and Redis-cache encryption keys are generated independently once,
then retained in `.local/kambium/keys.json`. Do not delete/regenerate those keys
while retaining encrypted data. Operator credentials are private local settings.
Your app's `.gitignore` and `.dockerignore` exclude `.local/` and its secrets.

Vite receives only public connection settings plus basic process environment;
backend secret keys, Redis credentials, email tokens and inherited `VITE_` values
are not forwarded. Its same-origin `/api` requests proxy to backend `/ui`.

::: details Custom ports and existing apps

The backend binds `127.0.0.1:3000` by default. Set `KAMBIUM_LOCAL_PORT` before the
first setup to choose another app port.

`KAMBIUM_LOCAL_DASHBOARD_PORT` selects the dashboard port (default 5173).
Local setup manages the Supabase Auth site URL and redirects for the dashboard,
including `/auth/callback`.
If changing that port while Supabase is running, run `local:down` before restarting
so Auth picks up the changed configuration.
Backend-only apps without `dashboard/vite.config.ts` retain their existing startup.

:::

::: details Moving the app directory

Moving the app directory changes its service identity. Stop its services before
moving and handle old volumes explicitly.

:::

## Process lifetime

`dev:local` runs the backend and dashboard together. Ctrl+C or an unexpected child
exit stops those app processes and their simulators. Supabase and Redis retain
their data and continue running;
`npm run local:down` stops them without deleting data or keys. It uses the saved
runtime, so it does not need `--docker` to stop an existing Docker stack.

## Email behavior

Supabase Auth and application emails use the local Mailpit inbox. Core uses the
inbox from the launcher and retains the app's email templates and sender.
Invitations are marked sent after successful local delivery. Set
`mailpit: false` in the app's `createServer` config
to skip application email during local runs. Supabase Auth manages
its own email delivery.

Source: [local launcher](https://github.com/MartinMalinda/kambium/blob/main/packages/cli/lib/local.mjs) and
[runtime selection and Redis ownership](https://github.com/MartinMalinda/kambium/blob/main/packages/cli/lib/local-runtime.mjs).
