# Self-hosted overview

> What Diakrin installs in your AWS account, how it fits together and which guide to follow.

Source: https://diakrin.com/docs/self-hosted/overview

Self-hosted runs the whole Diakrin platform inside your own AWS account, installed by one person with the Diakrin CLI in about an hour. It is for companies that need the console and API inside their network too. If you only need apps and data in your cloud, including on Google Cloud, use [BYOC](/docs/company-cloud).

## What you install

`diakrin self-hosted infra up` creates the infrastructure below, and `diakrin self-hosted deploy` puts Diakrin on it. Everything is tagged with your installation id, and `destroy` removes it again.

| Part | What it is for |
| --- | --- |
| VPC | A private network with two Availability Zones, a NAT gateway and VPC endpoints for AWS services |
| Internal ALB | The load balancer for the console, API and webhooks. It has no public address |
| ECS Fargate | Runs the `api`, `worker` and `console` services and one-off tasks such as migrations |
| RDS PostgreSQL | The Diakrin database, encrypted, with deletion protection and a final snapshot on destroy |
| ECR | Your own image registry. `deploy` copies the signed images in by digest |
| KMS and Secrets Manager | Encryption keys and generated secrets. Nothing secret is written to a file |
| ACM certificates | HTTPS for the load balancer and for CloudFront |
| Audit bucket | S3 with Object Lock. Retention is your choice and cannot be shortened later |
| CloudFront and WAF | The public front door by default: a VPC origin to the internal ALB, protected by AWS WAF |

## How it fits together

```text
people and GitHub
      │  https://<host>
      ▼
CloudFront + AWS WAF        (DIAKRIN_EXPOSE=cloudfront, the default)
      │  VPC origin
      ▼
internal ALB ──► ECS Fargate: console · api · worker
                      │
                      ├──► RDS PostgreSQL
                      ├──► Secrets Manager · KMS
                      └──► audit bucket (Object Lock)
```

- Every release is signed by Diakrin. The CLI refuses anything it cannot verify.
- Diakrin cannot sign in to your installation. Outbound traffic goes only to GitHub, the signed image registry and Diakrin license checks.
- With `DIAKRIN_EXPOSE=none` there is no CloudFront. People reach the console over VPN, peering or PrivateLink. See [Existing infrastructure and exposure](/docs/self-hosted/existing-infrastructure).

## Choose your path

```cards
New installation | /docs/self-hosted/install | Create the infrastructure and deploy Diakrin with the CLI. | rocket
Check the requirements | /docs/self-hosted/prerequisites | What you need before the first command. | shield
Reuse your own VPC or database | /docs/self-hosted/existing-infrastructure | Bring an existing VPC, database, cluster, certificate or DNS. | cloud
Add your license file | /docs/self-hosted/license | Optional at install, and can be added after deploy. | key
Run it day to day | /docs/self-hosted/operate | Status, doctor, upgrade, rollback and destroy. | flow
Use a coding agent | /docs/self-hosted/use-with-ai | Let Claude Code, Codex or Cursor run the install. | sparkles
```

## Next

Check the [prerequisites](/docs/self-hosted/prerequisites), then follow the [install steps](/docs/self-hosted/install).
