Sign inSign up

keyraft/keyrafted

By keyraft

โ€ขUpdated 3 months ago

Lightweight, self-hosted configuration and secrets management

Image
Security
Developer tools
1

1.4K

keyraft/keyrafted repository overview

โ Keyraft

Lightweight, self-hosted configuration and secrets management. Store config and secrets with versioning, RBAC, audit logs, and live watch โ€” one container, no external dependencies.

Documentation: keyraft.github.ioโ  ยท Source: github.com/keyraft/keyraftedโ 

โ Quick start

docker run -d -p 7200:7200 \
  -e KEYRAFT_MASTER_KEY=$(openssl rand -base64 32) \
  -v keyraft-data:/data \
  --name keyraft \
  keyraft/keyrafted:latest

The image auto-initializes on first run. Open the web UI at http://localhost:7200โ  after you have a token.

โ Root token

docker logs keyraft

Look for the Root token line in the output. Save it โ€” you need it for the API and web UI.

โ Features

  • Encrypted secrets (AES-256-GCM at rest)
  • Namespaced key-value store with full version history
  • RBAC tokens (admin, developer, viewer, operator)
  • Watch API (long-poll and SSE) for live config reloads
  • HTTP/JSON API under /v1
  • Built-in web UI and Prometheus metrics
  • Official PHP and Dart client libraries

โ Image tags

TagDescription
latestLatest stable release
x.y.zSpecific release (e.g. 0.3.0)

Also published on GitHub Container Registry: ghcr.io/keyraft/keyrafted

โ Environment variables

VariableDescription
KEYRAFT_MASTER_KEYMaster encryption key for secrets (required in production; use openssl rand -base64 32)
KEYRAFT_DATA_DIRData directory inside the container (default: /data)
KEYRAFT_LISTENHTTP listen address (default: :7200)

โ Volumes

Mount a volume at /data to persist the database, tokens, and audit logs across restarts:

-v keyraft-data:/data

โ Docker Compose

services:
  keyraft:
    image: keyraft/keyrafted:latest
    ports:
      - "7200:7200"
    environment:
      KEYRAFT_MASTER_KEY: ${KEYRAFT_MASTER_KEY}
    volumes:
      - keyraft-data:/data
    restart: unless-stopped

volumes:
  keyraft-data:

Generate a master key before docker compose up:

export KEYRAFT_MASTER_KEY=$(openssl rand -base64 32)

โ Health check

curl http://localhost:7200/v1/health

The image includes a built-in HEALTHCHECK against /v1/health.

โ Production notes

  • Always set KEYRAFT_MASTER_KEY explicitly โ€” do not rely on auto-generated keys across redeployments
  • Use a named volume or bind mount for /data
  • Put a reverse proxy with TLS in front for anything exposed beyond localhost

โ License

Apache License 2.0

Tag summary

Content type

Image

Digest

sha256:1f97c7033โ€ฆ

Size

9.9 MB

Last updated

3 months ago

docker pull keyraft/keyrafted