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

# Docker

> Install PostQueen using Docker standalone

This runs the PostQueen container on its own, with nothing else. You supply PostgreSQL, Redis
and Temporal yourself, and you wire them together yourself.

Pick this only if you already run those three somewhere and want just the app. If that is not
you, [Docker Compose](/installation/docker-compose) starts all four together and is the
supported path.

<Snippet file="installation-recommended-options.mdx" />

<Snippet file="installation-pre-reqs.mdx" />

## Set environment variables

She reads everything she needs from environment variables, and there are a lot of them, so a file on your host beats a `docker run` line long enough to wrap three times.

Keep that file wherever you like and hand it to Docker with `--env-file`. Docker reads it on the host and sets each line in the container environment, which is where she looks. Start from the shipped example, which you can [view on GitHub](https://github.com/GkhanKINAY/postqueen-app/blob/main/.env.example) and copy into your own `postqueen.env`.

<Warning>
  Mounting that file inside the container does not work. Nothing in the image reads `/config`, so a file placed there is never opened. `--env-file` is the mechanism, and the container environment is the destination.
</Warning>

## Create the container

One command creates the container. Before you run it, have Postgres, Redis **and Temporal** running: Temporal is not optional, and even outbound email is dispatched through it.

Note the `--network`. Without it the container lands on the default bridge, where container names do not resolve, so a `DATABASE_URL` or `REDIS_URL` written against a service name fails to connect with nothing on screen to explain why. Use the network your database and Redis are already on.

```bash theme={"system"}
docker create --name postqueen \
  --env-file ./postqueen.env \
  --network postqueen-network \
  -v postqueen-uploads:/uploads/ \
  -p 5000:5000 \
  ghcr.io/gkhankinay/postqueen-app:latest
```

Then start her and watch the first minute:

```bash theme={"system"}
docker start postqueen && docker logs -f postqueen
```

## Check it worked

You are waiting for `Backend started successfully on port 3000`, and then for the lines just
after it. She reports configuration problems there and keeps running anyway, so a container
that is up is not proof the settings are right:

```bash theme={"system"}
docker logs postqueen | grep -i "configuration issue"
```

Then confirm she answers:

```bash theme={"system"}
curl -I http://localhost:5000
```

<Note>
  **This path uses port 5000, not 4007.** The command above maps `-p 5000:5000`, so she is on
  `localhost:5000` on your host. Docker Compose publishes the same container port as 4007
  instead, which is why the reverse proxy pages mostly talk about 4007. Point your proxy at
  whichever host port you actually mapped.
</Note>

## Next Steps

<Snippet file="next-steps-selfhost.mdx" />
