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

# Running Dittofeed Locally

To run Dittofeed locally, start docker compose, build the dashboard, and then run the development bootstrap script.

```bash theme={null}
docker compose up -d
# Builds all of the dashboard dependencies including those required by the
# bootstrap script, then runs bootstrap.
./dev-setup.sh
```

Then run the service components in separate terminal windows.

```bash theme={null}
yarn workspace dashboard dev
yarn workspace api dev
# Optionally
yarn workspace worker dev
```

## Admin CLI

`yarn admin <cmd> [args]` invoke's the `admin-cli` package's CLI, located [here](https://github.com/dittofeed/dittofeed/tree/main/packages/admin-cli). The `admin-cli` provides useful commands for local development as well as operational tasks in production.

## Running with Github Codespaces

Running Dittofeed with Github Codespaces is an easy way to set up a development environment, as they can help rule out idiosyncratic issues with your local environment.

To open a codespace, open vscode, and navigate to the Remote Explorer tab. Then click on the "Open Codespace" button.

From here, select the dittofeed repository, and create a codespace. We recommend using the second tier codespace or higher, to ensure you have enough resources to run the application (4 cores, 8 GB RAM, 32 GB storage).

<Frame>
  <img src="https://mintcdn.com/dittofeed/blTyhzJH4uYGEKZ4/images/open-codespace.png?fit=max&auto=format&n=blTyhzJH4uYGEKZ4&q=85&s=893a7fccd08afd814ef2fbcb84bd1a8e" alt="Open Codespace" width="3680" height="2234" data-path="images/open-codespace.png" />
</Frame>

## Running Locally With OpenTelemetry

In order to run Dittofeed locally with OpenTelemetry (OTEL), start the API or dashboard with the following environment variables.

<CodeGroup>
  ```bash dashboard theme={null}
  START_OTEL=true yarn workspace dashboard dev
  ```

  ```bash API theme={null}
  START_OTEL=true yarn workspace api dev
  ```

  ```bash worker theme={null}
  START_OTEL=true yarn workspace worker dev
  ```
</CodeGroup>

Then run the docker compose dependencies with the otel profile.

```bash theme={null}
docker compose --profile otel up -d
```

## FAQ

### Why don't I see any users in my workspace?

Displayed users represent a collection of computed "User Property Assignments" and "Segment Assignments". These are computed by the dittofeed worker, and won't be available until the worker has processed user events. If you aren't seeing users in your workspace, it's likely one of the following is true:

* Dittofeed hasn't received any user events.
* The configured user properties and segments don't match the provided events.
* The worker isn't running the compute properties workflow.

Try running the following commands.

```bash theme={null}
# Will start the job responsible to computing user events, and create sample events.
BOOTSTRAP_WORKER=true BOOTSTRAP_EVENTS=true yarn admin bootstrap
# Start the worker.
yarn workspace worker dev
```

### How can I submit events?

See the documentation on [Using Dittofeed's REST API as a source](/integrations/sources/api).

### How can I view Dittofeed's local Postgres data?

Run `./packages/backend-lib/scripts/local-pg-access.sh` to open a psql shell to Dittofeed's postgres database started from the development `docker-compose.yaml` file.

### How can I view dittofeed's local ClickHouse data?

Run `./packages/backend-lib/scripts/local-ch-access.sh` to open a ClickHouse shell to Dittofeed's ClickHouse database started from the development `docker-compose.yaml` file.
