---
title: Docker Self-Hosting
description: Build and deploy your CamelMind documentation site using Docker.
---

CamelMind includes a production-ready `Dockerfile` and `docker-compose.yml`, making it easy to deploy your documentation site on your own infrastructure.

Docker deployments are ideal for on-premises environments, private clouds, Kubernetes clusters, and air-gapped networks.

## Build and run

From the root of your project, build the Docker image:

```bash
docker build -t my-docs .
```

Run the container:

```bash
docker run --rm \
  --env-file .env \
  -p 3000:3000 \
  my-docs
```

Open your documentation site at:

```text
http://localhost:3000
```

<Callout type="tip">
Copy `.env.example` to `.env` and update it with your site's configuration before starting the container.
</Callout>

---

## Using Docker Compose

Start the site with Docker Compose:

```bash
docker compose up --build
```

CamelMind automatically reads environment variables from `.env`.

---

## Configure your site

Configure authentication, your public site URL, and other runtime settings in `.env`.

For a complete list of supported variables, see **Environment Variables**.

---

## Update documentation without rebuilding

During development, you can mount your documentation files into the container to see changes without rebuilding the image.

```bash
docker run --rm \
  -p 3000:3000 \
  --env-file .env \
  -v "$(pwd)/content:/app/content" \
  -v "$(pwd)/nav:/app/nav" \
  my-docs
```

If you're using Docker Compose, uncomment the `volumes` section in `docker-compose.yml` to enable the same behavior.

---

## Deploy to production

For production deployments, place a reverse proxy such as **Nginx**, **Caddy**, or **Traefik** in front of the CamelMind container to provide HTTPS and TLS termination.

Also ensure that:

- `CAMELMIND_URL` is set to your public HTTPS URL.
- Your reverse proxy forwards requests to the CamelMind container.
- Container health checks target `/home`.

---

## Next steps

- Configure your site's [Environment Variables](/deployment/environment-variables).
- Set up [Authentication](/features/auth-rbac) for protected documentation sites.
- Deploy the container to your preferred hosting platform or Kubernetes cluster.