# Ports and services

The services of the compose stack: what each runs, the ports it listens on and the volumes it keeps.

The whole stack as self-hosting runs it. Settings and secrets come from .env (see .env.example). The project is named after the checkout's folder, so a second checkout gets its own volumes and needs other ports in its .env.

The orbsearch image runs twice: as the Query API and as the indexer.

| Service | Host address | Host port | Port inside |
| --- | --- | --- | --- |
| [`postgres`](#postgres) | `127.0.0.1` | `5432` ([`POSTGRES_PORT`](/docs/reference/environment#POSTGRES_PORT)) | `5432` |
| [`meilisearch`](#meilisearch) | `127.0.0.1` | `7700` ([`MEILISEARCH_PORT`](/docs/reference/environment#MEILISEARCH_PORT)) | `7700` |
| [`orbsearch`](#orbsearch) | `127.0.0.1` ([`PUBLISH_ADDRESS`](/docs/reference/environment#PUBLISH_ADDRESS)) | `7800` ([`ORBSEARCH_PORT`](/docs/reference/environment#ORBSEARCH_PORT)) | `7800` |
| [`control`](#control) | `127.0.0.1` ([`PUBLISH_ADDRESS`](/docs/reference/environment#PUBLISH_ADDRESS)) | `8000` ([`CONTROL_PORT`](/docs/reference/environment#CONTROL_PORT)) | `8000` |

## `postgres`

Accounts, releases, imports and index runs.

- `image` (`postgres:18.6-trixie`)

- `ports` (`127.0.0.1:${POSTGRES_PORT:-5432}:5432`)

- `volumes` (`postgres:/var/lib/postgresql`)

## `meilisearch`

The search engine, holding only compiled indexes.

- `image` (`getmeili/meilisearch:v1.54.3`)

- `ports` (`127.0.0.1:${MEILISEARCH_PORT:-7700}:7700`)

- `volumes` (`meilisearch:/meili_data`)

## `orbsearch`

The Query API (`orbsearch serve`), which storefronts call.

- `image` (`built from crates/orbsearch/Dockerfile`)

- `ports` (`${PUBLISH_ADDRESS:-127.0.0.1}:${ORBSEARCH_PORT:-7800}:7800`)

- `volumes` (`storage:/var/lib/orbsearch:ro`)

- `depends_on` (`postgres, meilisearch`): Starts once [`postgres`](#postgres) and [`meilisearch`](#meilisearch) are healthy.

## `indexer`

Index runs (`orbsearch index`): compiles a catalog snapshot and a release into Meilisearch and swaps them live.

- `image` (`built from crates/orbsearch/Dockerfile`)

- `command` (`index`)

- `volumes` (`storage:/var/lib/orbsearch`)

- `depends_on` (`postgres, meilisearch`): Starts once [`postgres`](#postgres) and [`meilisearch`](#meilisearch) are healthy.

## `control`

The control plane: the panel, the management API under `/api/v1`, and the schedule that fetches the feed URL.

- `image` (`built from apps/control/Dockerfile`)

- `ports` (`${PUBLISH_ADDRESS:-127.0.0.1}:${CONTROL_PORT:-8000}:8000`)

- `volumes` (`storage:/var/lib/orbsearch`)

- `depends_on` (`postgres`): Starts once [`postgres`](#postgres) is healthy.

## Volumes

- `postgres`: Accounts, releases, imports and index runs.

- `meilisearch`: The search engine, holding only compiled indexes.

- `storage`: Catalog snapshots, written by the control plane, read and cleaned up by the indexer, inspected by the Query API.

**Guide:** [What runs](/docs/self-hosting#what-runs)
