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

# Quickstart

> Bring the API, the interface and a database up with Docker Compose.

The fastest way to see apowerb running is the
[`apowerb-hosting`](https://github.com/apowerb/apowerb-hosting) stack: Postgres, the
API and the interface, wired together by a single `docker compose up`.

## 1. Clone the hosting repository

One repository, not three: the compose file pulls **published images** from
Docker Hub, pinned to a pair that was tested together. Nothing is built locally.

```bash theme={null}
git clone https://github.com/apowerb/apowerb-hosting.git
cd apowerb-hosting
```

## 2. Generate secrets and start

```bash theme={null}
cp .env.example .env
./scripts/generate-secrets.sh
docker compose -f docker-compose/docker-compose.yml --env-file .env up -d
```

> [!WARNING]
>
> Name the file. There **is** a `docker-compose.yml` at the root of that
> repository, and it is not this one: it targets the Hostman App Platform, ships
> no Postgres, and refuses to start without a managed database. A bare
> `docker compose up` in that folder picks the wrong one.

> [!NOTE]
>
> **Ports 3000 and 8000 must be free.** If something else already listens on
> 3000, Postgres and the API come up and the interface alone fails, on
> `Bind for 0.0.0.0:3000 failed: port is already allocated` — a partial stack
> that looks like a broken install. Pick other ports on the command itself,
> without touching `.env`; Compose lets a shell variable win over the
> `--env-file`:
>
> ```bash theme={null}
> FRONT_PORT=3010 TH2AGENT_PORT=8010 \
>   docker compose -f docker-compose/docker-compose.yml --env-file .env up -d
> ```
>
> The addresses below shift accordingly. Postgres publishes no host port at
> all, so it never collides.

`generate-secrets.sh` fills `DB_PASSWORD`, `ENCRYPT_KEY` and the service tokens
with random values. It never overwrites a value that is already set — see
[Secrets](https://docs.apowerb.com/deployment/introduction.md#secrets) for why that matters.

**There is nothing else to fill in.** The database runs inside the stack, and
every credential the template ships is empty on purpose — a value committed to a
public repository is not a secret. What you do not get for free is a model: add
your own key from the interface, or declare a shared one in `.env`
(`DEFAULT_LLM_MODEL` and `DEFAULT_LLM_API_KEY`). Until then the stack runs and
the model simply does not appear in the list.

![apowerb dashboard showing agent, integration and schedule counters](https://mintcdn.com/thaink2-445e19b2/01sXtdZdZRmlIMtW/images/home.jpg?fit=max\&auto=format\&n=01sXtdZdZRmlIMtW\&q=85\&s=50a3a5f0735595ccae9d527d10c86c0b)

The dashboard once the stack is up: agents, integrations, schedules and the shared-model credit.

## 3. Check it is up

| Service | URL | Role |
| - | - | - |
| Interface | `http://localhost:3000` | Next.js UI |
| API | `http://localhost:8000` | FastAPI server |
| API docs | `http://localhost:8000/docs` | Interactive Swagger UI |
| Health | `http://localhost:8000/health` | Liveness probe |

```bash theme={null}
curl -s http://localhost:8000/health
```

Ports are configurable in `.env`. Postgres stays on the internal Docker network and
is not published.

## 4. Create your first agent

Authenticate, then create an agent through the API:

```bash theme={null}
curl -X POST http://localhost:8000/api/agents \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_name": "My Assistant",
    "agent_model": "anthropic/claude-sonnet-4-5-20250929",
    "agent_description": "Specialized agent for data analysis",
    "agent_instruction": "You are an expert data analyst.",
    "agent_type": "llm",
    "agent_tools": [],
    "sub_agents": [],
    "memory_enabled": false,
    "artifacts_enabled": false,
    "tags": ["analytics"]
  }'
```

Then run it — see [Sessions and runs](https://docs.apowerb.com/concepts/sessions-and-runs.md).

## Other ways to deploy

The Compose path above is the one tested end to end, and the shortest. Three
others live in the same repository:

* **[Helm chart](https://docs.apowerb.com/deployment/helmchart.md)**, published on Docker Hub as an OCI
  artifact.
* **[Kubernetes](https://docs.apowerb.com/deployment/kubernetes.md)**, preparing the cluster the chart
  installs into.
* **[Traefik overlay](https://docs.apowerb.com/deployment/virtual-machine.md)**, for a single VM behind
  HTTPS.

Container images are published too — the Compose file pulls them rather than
building anything locally.


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