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

# Installation

> Run version-matched API, worker and UI images with PostgreSQL.

Posted has separate API, worker and UI images with one version. Choose a release from the [GitHub Releases page](https://github.com/avgeek-oss/posted/releases) that includes `posted-images.json`. That file records immutable image references and both supported platforms, Linux AMD64 and ARM64. Use the version in that release for every component.

## Prerequisites

Use Docker Engine with Compose v2, PostgreSQL 17, separate HTTPS UI and API origins, and a reverse proxy with valid certificates. S3-compatible storage enables media and SMTP enables account emails. Social publishing requires approved provider applications. See [configuration](/configuration) before starting the installation.

Download `docker-compose.yml`, `posted.env.example` and, if needed, `docker-compose.postgres.yml` from the same release. Copy `posted.env.example` to `.env`. Set `POSTED_VERSION`, the public origins and a stable secret generated with:

```sh theme={"system"}
openssl rand -hex 32
```

Keep `.env` private and retain `POSTED_SECRET` with the database backup. Changing it prevents encrypted provider tokens and sessions from being read.

## Start the containers

<Tabs>
  <Tab title="External PostgreSQL">
    Set `DATABASE_URL` to your PostgreSQL connection URI. The database must be reachable from the containers; `localhost` inside a container refers to that container.

    ```sh theme={"system"}
    docker compose pull
    docker compose up -d
    ```
  </Tab>

  <Tab title="Bundled PostgreSQL">
    Set a random alphanumeric `POSTGRES_PASSWORD`. The overlay replaces the API/worker connection URI with the private Compose database and persists it in `posted-postgres`.

    ```sh theme={"system"}
    docker compose -f docker-compose.yml -f docker-compose.postgres.yml pull
    docker compose -f docker-compose.yml -f docker-compose.postgres.yml up -d
    ```
  </Tab>
</Tabs>

The API applies transactional, checksum-checked migrations before readiness. The worker waits for the API. UI and API listen on loopback ports 4342 and 4341; route them through your HTTPS proxy. Keep the worker and PostgreSQL private.

## Create the team

Read the installation setup secret in the API's initial startup log:

```sh theme={"system"}
docker compose logs api
```

Open the UI, enter that secret and create the first administrator. That administrator is verified automatically. Never share the log's setup secret in a support issue.

Verify all three containers are healthy:

```sh theme={"system"}
docker compose ps
curl --fail http://localhost:4341/health/ready
curl --fail http://localhost:4342/health/ready
docker compose exec worker node -e "fetch('http://127.0.0.1:4343/health/ready').then(r=>{if(!r.ok)process.exit(1)})"
```

## Build from source

A source checkout uses public npm dependencies with no registry token. Use Node 24.16.0 and pnpm 11.5.3 for development. The source-build overlay enables the Dockerfile's targets:

```sh theme={"system"}
docker compose -f docker-compose.yml -f docker-compose.build.yml build
docker compose -f docker-compose.yml -f docker-compose.build.yml up -d --no-build
```

Add the PostgreSQL overlay if needed. Every source-built image must use the checkout's package version. See [development](/development) for disposable test services and [upgrades](/upgrades) before replacing an installation.


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