> For the complete documentation index, see [llms.txt](https://docs.authgear.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.authgear.com/deployment/local.md).

# Run locally with Docker Compose

How to run Authgear locally with Docker Compose.

Authgear is available as a Docker image. It depends on PostgreSQL (with pg\_partman enabled) and Redis.

To make it easy to try Authgear on your own machine, we provide an example repository with a complete Docker Compose setup and step-by-step instructions.

{% hint style="info" %}
This example is meant for local development and trying things out. It ships with default credentials and `DEV_MODE` turned on, so it works out of the box but isn't safe to expose to the internet.

Production deployments aren't off the table if you know what you're doing, but the defaults aren't ready to ship as-is. At minimum, swap out the credentials in the `env` file (database passwords, secret keys, JWT secrets), set the origins to your real domain, and turn off `DEV_MODE`.

For most production setups, we recommend [Deploy with Helm chart](/deployment/helm.md) instead.
{% endhint %}

**Clone the example repo and follow the included** `README.md`:\
<https://github.com/authgear/authgear-example-docker-compose>

The repository contains:

* Preconfigured `docker-compose.yml`
* Example environment files
* Guidance for initializing the project and running the portal + backend
* Tips for troubleshooting local development setups


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.authgear.com/deployment/local.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
