---
url: https://kit.kambium.net/docs/local-development.md
---
# Run locally

<span id="local-development"></span>

After [creating your app](https://kit.kambium.net/docs/create-app.md), switch on **Local Server** in Desktop.
If a tool is missing, see the [local runtime requirements](https://kit.kambium.net/docs/local-runtime.md#local-runtime-requirements).

Open **Dashboard** and request a sign-in email. In **Mailpit**, open the link in
the same browser to sign in and open your workspace.

![Kambium Desktop running a local app, with logs and service tools in the sidebar](https://kit.kambium.net/docs/assets/desktop-local-v0.0.9-2026-11-26.BgLcFQ48.png)

Try the generated [Airtable → Slack engine](https://kit.kambium.net/docs/airtable-simulator.md) or
[Example Slack bot](https://kit.kambium.net/docs/slack-simulator.md) with simulated accounts.

Commit the generated migration files with `supabase/kambium-schema.json`.
Keep `.local/` private and retain its keys with your local data.
[Schema and state](https://kit.kambium.net/docs/local-runtime.md#schema-and-state)

::: details Reopen Desktop

Run `npm run desktop` from the app directory.

:::

<span id="services-and-files"></span>
<span id="optional-local-commands"></span>
<span id="local-configuration-files"></span>
<span id="custom-ports-and-existing-apps"></span>
<span id="moving-the-app-directory"></span>
<span id="email"></span>
<span id="application-email-behavior"></span>
<span id="connect-a-provider"></span>

::: details Run without Desktop

From the generated app directory, start both simulators with the app:

```sh
npm run dev:local -- --airtable-sim --slack-sim
```

The simulators keep the starter's provider events local. Open the dashboard and
Mailpit URLs printed in the terminal to sign in.

:::

::: details Use Docker or keep an existing Docker stack

With Docker running, use:

```sh
npm run dev:local -- --docker --airtable-sim --slack-sim
```

This selects Docker for both Supabase and Redis; native Redis binaries are not
required. Keep using it for an existing Docker stack after
[upgrading](https://kit.kambium.net/docs/updating.md). The CLI keeps retained data tied to its runtime
in place; use a separate app directory to try another runtime.

:::

::: details Prepare a reusable development scenario

Use the generated seed recipe to prepare a development user, workspace and
Example Slack bot. [Development seeding](https://kit.kambium.net/docs/local-runtime.md#development-seeding)

:::

<span id="development-with-hosted-services"></span>

::: details Development with hosted services

Use the local stack for everyday changes. To check changes with hosted services,
deploy to a [separate Fly development app](https://kit.kambium.net/docs/setup.md) with `npm run fly:deploy:dev`
after setting up the named `dev` environment. To keep hot reload while using the
development database, Redis and real integrations, run the app from the terminal.
Desktop's Local Server switch starts the local stack.

Fly injects secrets into its Machines. `fly secrets list` shows names and digests.
Get values for local runs from the original providers or your secret manager.
[Fly secrets](https://docs.fly.io/apps/secrets)

Install the schema in the intended [hosted Supabase project](https://kit.kambium.net/docs/cloud-supabase.md).
Database commands select their own target. Use that environment's
[service settings](https://kit.kambium.net/docs/environment-variables.md), including keys that match its
encrypted data. `npm run dev` reads the process environment and fills in missing
values from the app root's `.env`. The Fly environment selector applies to
deployment.

Set `API_BASE_URL=http://127.0.0.1:3000` and
`SERVE_BASE_URL=http://127.0.0.1:5173` for the default local ports. Generate a
separate local `WEBHOOK_PATH_PREFIX` with
`node -p 'require("node:crypto").randomBytes(12).toString("base64url")'` and reuse
it on later runs if a provider webhook points at this backend.

With the settings in a gitignored `.env`, run from the app directory.

```sh
npm run dev
```

If [Doppler manages your development secrets](https://kit.kambium.net/docs/setup.md#doppler), sign in with
`doppler login` in the terminal. Use your project and development config in the
command below. The local overrides apply to this process. Keep the deployed URLs
and webhook prefix in the synced configuration.

```sh
LOCAL_WEBHOOK_PATH_PREFIX=$(node -p 'require("node:crypto").randomBytes(12).toString("base64url")')
doppler run --no-read-env --project my-app --config dev -- env \
  API_BASE_URL=http://127.0.0.1:3000 \
  SERVE_BASE_URL=http://127.0.0.1:5173 \
  WEBHOOK_PATH_PREFIX="$LOCAL_WEBHOOK_PATH_PREFIX" \
  npm run dev
```

Desktop's Doppler sign-in is separate from the terminal session. Doppler injects
the values into the process. Keep `.env` free of credentials from other
environments because `npm run dev` uses it for keys missing in Doppler.
[Doppler CLI guide](https://docs.doppler.com/docs/cli)

Create `dashboard/.env.local` with the three public
[dashboard inputs](https://kit.kambium.net/docs/configuration.md#dashboard-inputs). Use the local backend URL
for `VITE_API_BASE_URL`, and the development project's Supabase URL and
publishable key. In a second terminal, run:

```sh
npm run dev:dashboard
```

Configure Supabase's Auth site URL and allowed callback for the dashboard origin,
and register matching provider OAuth callbacks. Hosted Supabase does not use
Mailpit. Its email hook needs a reachable backend endpoint or HTTPS tunnel;
[Auth SMTP](https://kit.kambium.net/docs/configuration.md#email) is an alternative for login email.
Application emails still need their configured delivery service.

Set up the [webhook tunnel](https://kit.kambium.net/docs/local-webhooks.md) for real provider events or the
hosted Auth email hook.

For the hosted Auth hook, append
`/<WEBHOOK_PATH_PREFIX>/webhooks/supabase-auth-email` to the logged
`webhookBaseUrl` and configure the signing secret. Apps without a prefix use
`/webhooks/supabase-auth-email`. Update the hook URL if the tunnel URL changes.

Sign in and verify an engine operation; `/health` alone does not check database
or provider access. For the same workflow in a hosted agent environment, see
[Cloud coding agents](https://kit.kambium.net/docs/cloud-coding-agents.md).

:::

::: details Inspect production from your computer

For dashboard debugging, run only `npm run dev:dashboard` with the deployed
backend URL and production Supabase public settings in `dashboard/.env.local`.
Sign-in needs the local dashboard's `/auth/callback` on the project's allowed
redirect list. Actions in the dashboard still affect live data.
[Supabase redirect URLs](https://supabase.com/docs/guides/auth/redirect-urls)

A local backend with production credentials can write to live data and recover
pending tasks at startup. Development mode disables scheduled jobs by default.
If you need that access to debug the backend, use the same `doppler run` command
with the production project and config. Keep the local overrides and leave
production provider webhooks and OAuth callbacks pointed at the deployed app.
Use hosted development to test changes that write data or trigger integrations.

:::
