Files
kms/docs/self-hosting/deployment-options/standalone-kms.mdx
zooqueenandGitHub 8958a7702d rebrand: replace upstream Infisical references with Hanzo KMS equivalents (#1)
Replace Infisical product name, email addresses, domain names, and
file names with Hanzo KMS equivalents across docs, templates, tests,
and configuration. Functional references to upstream packages
(@infisical/quic, artifacts-cli.infisical.com, CLI binary) are
preserved with clarifying comments since they reference actual
upstream software dependencies.
2026-03-01 20:24:17 -08:00

59 lines
2.6 KiB
Plaintext

---
title: "Docker"
description: "Learn how to run KMS with Docker."
---
Prerequisites:
- Basic knowledge of [Docker](https://www.docker.com/)
- Have Docker installed on your system. If not, follow the installation guide [here](https://docs.docker.com/get-docker/).
KMS is available as a single Docker image to ease deployment.
This Docker image only includes the application code, meaning you must supply a connection to a Postgres database and a Redis instance.
The following guide provides a detailed step-by-step walkthrough on how you can deploy KMS with Docker.
<Steps>
<Step title="Pull the KMS Docker image">
Visit [Docker Hub](https://hub.docker.com/r/ghcr.io/hanzoai/kms/tags) and select a version of KMS image you would like to deploy.
Then run the following command in your terminal to pull the specific KMS Docker image.
```
docker pull ghcr.io/hanzoai/kms:<version>
```
Remember to replace `<version>` with the docker image tag of your choice.
</Step>
<Step title="Start KMS">
For a minimal installation of KMS, you must configure `ENCRYPTION_KEY`, `AUTH_SECRET`, `DB_CONNECTION_URI`, `SITE_URL`, and `REDIS_URL`. [View all available configurations](/self-hosting/configuration/envars).
We recommend using Cloud-based Platform as a Service (PaaS) solutions for PostgreSQL and Redis to ensure high availability.
Once you have added the required environment variables to your docker run command, execute it in your terminal to get KMS up and running.
For example:
```bash
docker run -p 80:8080 \
-e ENCRYPTION_KEY=f40c9178624764ad85a6830b37ce239a \
-e AUTH_SECRET="q6LRi7c717a3DQ8JUxlWYkZpMhG4+RHLoFUVt3Bvo2U=" \
-e DB_CONNECTION_URI="<>" \
-e REDIS_URL="<>" \
-e SITE_URL="<>" \
ghcr.io/hanzoai/kms:<version>
```
<Warning>
The above environment variable values are only to be used as an example and should not be used in production
</Warning>
Once the container is running, verify the installation by opening your web browser and navigating to `http://localhost:80`.
![self-hosted sign up](/images/self-hosting/applicable-to-all/selfhost-signup.png)
</Step>
</Steps>
### Additional discussion
It's important to note that the above is a basic example of deploying KMS using Docker.
In practice, for production deployments, you may want to use container orchestration platforms such as AWS ECS, Google Cloud Run, or Kubernetes.
These platforms offer additional features like scalability, load balancing, and automated deployment, making them suitable for handling production-level traffic and providing high availability.