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

# Run Fonoster from source

> Open the dev container, run every component from source, and call an agent from your browser.

In this tutorial you run Fonoster from source in the dev container. At the end, every component is
running with reload, you are signed in to the dashboard, and an agent answers a call from your
browser.

## Before you begin

You need:

* [Docker](https://docs.docker.com/get-docker/).
* [VS Code](https://code.visualstudio.com/) or [Cursor](https://cursor.com/) with the
  [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
  extension.
* `git`.

> [!NOTE]
>
> The dev container uses port `8449` (dashboard and API) and `5060` (SIP) on
> your machine. Stop anything else that uses them, such as a Fonoster install.

## Run Fonoster

**1. Clone the repository**

Clone Fonoster into a new folder. `--filter=blob:none` keeps the full history but downloads old
file contents only when you need them, which makes the download much smaller:

```bash theme={"system"}
git clone --filter=blob:none https://github.com/fonoster/fonoster.git
```

Use a regular clone, not a `git worktree`: the container can't see a worktree's `.git`.

**2. Open it in the dev container**

Open the folder in your editor and choose **Reopen in Container**. If the prompt doesn't show,
run **Dev Containers: Reopen in Container** from the command palette.

The first time takes about 10 minutes. The editor builds the workspace image, starts Postgres,
NATS, Routr, RTPEngine, MinIO and Envoy, installs the packages and builds them. It's done when
the setup log prints:

```text theme={"system"}
Fonoster dev container ready. Start everything with:

  npm run dev
```

**3. Start Fonoster**

Open a terminal in the editor. It runs inside the container. Start every component:

```bash theme={"system"}
npm run dev
```

This runs the API server, AppBridge, Autopilot and the dashboard from source. The Roomr node
is already running as a container.
Each one reloads when you save a file. Leave it running.

**4. Sign in to the dashboard**

In a second terminal, print the dashboard address and the owner sign-in:

```bash theme={"system"}
npm run dev:info
```

Open [http://localhost:8449](http://localhost:8449) in your browser and sign in. You land in a
default workspace.

**5. Call an agent from your browser**

In the dashboard, go to **Agents** and choose **New agent**. Pick a template and choose
**Create agent**. On the agent's page, choose **Talk to agent** and allow the microphone.

> [!NOTE]
>
> The dev container uses fake speech and AI providers, so you need no vendor keys. You hear a
> beep, not a voice: each beep is something the agent says. The fake caller says two scripted
> lines, the agent answers each with "Echo: …", asks "Are you still there?" when nobody
> talks, and then hangs up. The real vendors are listed too, with placeholder platform keys. To
> use one, add its key under **Vendor keys**, or set it in `.dev/overlay/appbridge.yaml` or
> `.dev/overlay/autopilot.yaml` and run `npm run dev:config`.

The call connects, you hear the beeps, and the call ends by itself.

## What you ran

`npm run dev` is the command you run every day. The dependencies start with the container, and your
code runs on top of them with reload. Your configuration and secrets live in `.dev/`, which git
ignores.

![The dev container. Your editor sends your source into the workspace, where the API server, dashboard, appbridge, Autopilot and fakes run with live reload. The browser reaches them through Envoy on port 8449, and a softphone through Routr on SIP port 5060. The Roomr node runs as a container: Routr sends it calls, RTPEngine carries call media to it, and it exchanges audio with appbridge. The workspace stores its state in Postgres, events in NATS and recordings in MinIO.](https://mintcdn.com/fonoster/GsxtawNPYOQvohG4/images/run-from-source/dev-container-light.svg?fit=max\&auto=format\&n=GsxtawNPYOQvohG4\&q=85\&s=e12623aa868f14db8f330ac8617a6d73)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.