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

# Deployment

> Choose the right deployment model for apowerb and the hosting stack.

apowerb is designed to run either as a complete stack with the web interface and
PostgreSQL, or as a backend service connected to your own database and infrastructure.

The deployment repository ships ready-to-use assets for the most common hosting models,
from local Docker setups to managed cloud services and Kubernetes.

> [card] [Installation guide](https://docs.apowerb.com/deployment/install.md)
>
> The commands only, for Docker, Docker + HTTPS, Kubernetes, Helm and Podman.

> [card] [Docker Compose](https://docs.apowerb.com/deployment/dockercompose.md)
>
> The quickest path to bring the full stack up on a single host.

> [card] [Kubernetes](https://docs.apowerb.com/deployment/kubernetes.md)
>
> Prepare a cluster, then install with kubectl alone or with the chart.

> [card] [Helm chart](https://docs.apowerb.com/deployment/helmchart.md)
>
> Install the application on that cluster, configure it and upgrade it.

> [card] [Single VM / HTTPS](https://docs.apowerb.com/deployment/virtual-machine.md)
>
> Expose the stack behind Traefik with TLS on a single VM.

## Deployment options

Choose the operating model that fits your environment:

* [Docker Compose](https://docs.apowerb.com/deployment/dockercompose.md): best for local development, labs, and small production installs.
* [Kubernetes](https://docs.apowerb.com/deployment/kubernetes.md): prepares the cluster — storage class, ingress controller, certificate issuer — and can install the application with `kubectl` alone.
* [Helm chart](https://docs.apowerb.com/deployment/helmchart.md): installs and upgrades the application on that cluster; repeatable, and fits GitOps workflows.
* [Single VM / HTTPS with Traefik](https://docs.apowerb.com/deployment/virtual-machine.md): useful for self-hosted environments behind a public endpoint.

## Secrets

Secrets are not a deployment model: every option above needs the same few
values, and none of them ships with one — a value committed to a public
repository is not a secret.

* **Docker Compose**: `scripts/generate-secrets.sh` writes random values for
  `DB_PASSWORD`, `ENCRYPT_KEY` and the service tokens into `.env`. It never
  overwrites a value that is already set: a new `DB_PASSWORD` would no longer
  match the existing database volume, and a new `ENCRYPT_KEY` would make every
  connected integration unreadable.
* **Kubernetes without Helm**: `scripts/generate-k8s-secret.sh` writes
  `k8s/secret.yaml` and refuses to overwrite an existing one.
* **Helm chart**: pass `postgres.password`, `backend.env.encryptKey` and the
  service tokens as values; the chart stores them in a Kubernetes `Secret` and
  refuses to install without the mandatory ones.

Keep `.env` and your values files out of source control, and back up
`ENCRYPT_KEY` with them.

## Managed and hosted platforms

The repository also includes references for common managed environments and platform-specific setups:

* [DigitalOcean](https://docs.apowerb.com/deployment/digitalocean.md)
* [Azure App Service](https://docs.apowerb.com/deployment/azure-app-service.md)
* [Google Cloud Run](https://docs.apowerb.com/deployment/google-cloud-run.md)
* [Podman](https://docs.apowerb.com/deployment/podman.md)
* [Portainer](https://docs.apowerb.com/deployment/portainer.md)
* [Hostman](https://docs.apowerb.com/deployment/hostman.md)

## Repository assets

The deployment assets are concentrated in [`apowerb-hosting`](https://github.com/apowerb/apowerb-hosting),
which assembles the API, the web interface, and the database into a consistent stack.

The same repository publishes deployment configurations and scripts for the supported
environment types, making it easier to move from development to production without
rewriting the stack.


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