> For the complete documentation index, see [llms.txt](https://docs.terrakube.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.terrakube.io/2.33.0/getting-started/docker-compose.md).

# Docker Compose

### Local Domains

We will be using following domains to run Terrakube with docker compose:

```
terrakube.platform.local
terrakube-api.platform.local
terrakube-registry.platform.local
terrakube-dex.platform.local
```

### HTTPS Local Certificates

Install [mkcert](https://github.com/FiloSottile/mkcert#installation) to generate the local certificates.

### Generate local CA certificate

```
mkcert -install
Created a new local CA 💥
The local CA is now installed in the system trust store! ⚡️
The local CA is now installed in the Firefox trust store (requires browser restart)! 🦊
```

### Create Docker Network

```
docker network create terrakube-network -d bridge --subnet 10.25.25.0/24 --gateway 10.25.25.254
```

We will be using `10.25.25.253` for our the traefik gateway

### Local DNS entries

Update the /etc/hosts file adding the following entries:

```
10.25.25.253 terrakube.platform.local
10.25.25.253 terrakube-api.platform.local
10.25.25.253 terrakube-registry.platform.local
10.25.25.253 terrakube-dex.platform.local
```

### Running Terrakube Locally with HTTPS

```
git clone https://github.com/AzBuilder/terrakube.git
cd terrakube/docker-compose
mkcert -key-file key.pem -cert-file cert.pem platform.local "*.platform.local"
CAROOT=$(mkcert -CAROOT)/rootCA.pem
cp $CAROOT rootCA.pem
docker compose up -d --force-recreate
```

After 1 or 2 minutes Terrakube will be available in the following URL once all the container are initialized correctly:

* <https://terrakube.platform.local>
  * Username: <admin@example.com>
  * Password: admin

<figure><img src="https://3934308512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCtajpHVKO4bym06TrmbV%2Fuploads%2Fgit-blob-2203b027bf61bdc959fc9541da3398af552b6613%2Fimage%20(481).png?alt=media" alt=""><figcaption></figcaption></figure>

Special thanks to [SolomonHD](https://gist.github.com/SolomonHD) who has created the [Traefik](https://doc.traefik.io/traefik/) setup example to use Terrakube

Original Reference:

<https://gist.github.com/SolomonHD/b55be40146b7a53b8f26fe244f5be52e>


---

# 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.terrakube.io/2.33.0/getting-started/docker-compose.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.
