# Run Vifu with Docker

Docker runs a persistent PostgreSQL deployment with separately managed Server,
Gateway, and Dashboard services.

## First start

From the Vifu repository root:

```bash
docker compose up -d
```

Secrets are generated into the deployment volume when they are not supplied.
Open `http://127.0.0.1:6790`; Vifu Server presents the Dashboard on the same
public origin while the Dashboard service remains internal. Confirm the
runtime independently:

```bash
curl --fail --silent http://127.0.0.1:6790/health
```

The Console then guides you through project, provider, and Agent setup.

## Start it again

The next time you use the same checkout and data volume:

```bash
docker compose up -d
```

To stop the services while keeping project data:

```bash
docker compose down
```

## Rebuild after source changes

```bash
docker compose up -d --build
```

PostgreSQL data lives in the `postgres_data` volume, so normal restarts and
container replacement preserve the deployment. Do not run
`docker compose down --volumes` unless you intend to delete its data.

Vifu Server applies database migrations before accepting traffic. Back up
PostgreSQL before upgrading across releases.

## Next step

Open [Agent Providers](/docs/agent-providers) to connect an Agent runtime or
model. Read [Self-hosting Vifu](/docs/self-hosting) before making the Console
or runtime reachable outside the local machine.
