Kafka Cluster Manager (KCM) is a lightweight DevOps-oriented platform to monitor, manage and interact with Apache Kafka clusters via a modern UI and powerful REST API.
KCM helps teams gain insights, visibility, and control over Kafka environments.
git clone https://github.com/kcmhub/KCM.git
cd KCM/00_kcm_with_docker_compose
docker network create kcm-net 2>/dev/null || true
docker compose up -dAccess:
- ๐ฅ๏ธ UI: http://localhost
At the first start the API generates its two key pairs in 00_kcm_with_docker_compose/data/keys (jwt/ signs the
sessions, encryption/ protects the secrets stored in the database). Back up this directory with the database, and
never share it. Set KCM_DEFAULT_PASSWORD before the first start, or change the admin password right away.
The compose file pins a KCM version (kafkaetech/kcm-api and kafkaetech/kcm-ui, always the same version). To upgrade,
back up the database and data/keys, set the new version on both images, then run docker compose pull && docker compose up -d.
Up to 1.2.0 this repository shipped a key pair in data/keys (private.pem / public.pem), used both to sign
the sessions and to encrypt the stored secrets. That pair is public: consider it compromised. Anyone could sign
a session accepted by an install that used it. From 1.2.1 the API refuses to start with it as JWT pair.
-
Update this repository (
git pull) and keep yourdata/keys/private.pemwhere it is for now. -
docker compose pull && docker compose up -d. At startup the API:- generates two new pairs in
data/keys/jwtanddata/keys/encryption; - reads the old pair through
KCM_ENCRYPT_PREVIOUS_PRIVATE_KEYand re-encrypts every stored secret with the new encryption pair (log lineKey change: N secret(s) re-encrypted with the current key).
Every user signs in again (sessions signed with the old key are refused).
- generates two new pairs in
-
Check the API log (
docker logs kcm-api): no linesecret(s) in ... encrypted with another key. -
Delete the old pair:
data/keys/private.pemanddata/keys/public.pem. -
Change the secrets stored in KCM at their source, then enter them again in KCM: Kafka SASL passwords and JAAS configurations, Schema Registry, Kafka Connect and ksqlDB credentials, SSO client secrets, Git and Confluent Cloud credentials. With the old public key, anyone holding a copy of the database could read them.
-
Change the
adminpassword if it is still the default one.
If your docker-compose.yml is a modified copy, apply the changes of the environment section below
(KCM_KEYS_GENERATE_IF_MISSING, KCM_JWT_*, KCM_ENCRYPT_*, KCM_ENCRYPT_PREVIOUS_PRIVATE_KEY) and mount
./data/keys writable (no :ro).
Ready-to-run examples to try KCM against real clusters:
| Folder | What it is |
|---|---|
00_kcm_with_docker_compose |
KCM with Docker Compose (the quick start above) |
01_kafka_broker |
Plain Kafka 4.4 KRaft cluster, 3 controllers + 3 brokers, no security |
02_security_kafka_with_kerberos |
Kafka with SASL GSSAPI / Kerberos, self-contained KDC |
03_kafka_kraft_sasl_ssl |
Kafka 4.4 KRaft with SASL_SSL, SCRAM-SHA-512 and ACLs, with a YouTube tutorial |
Run one Kafka example at a time: they share container names and the
kcm-netnetwork (docker compose down -vbefore starting another).
The Helm chart is a public OCI artifact on Docker Hub: oci://registry-1.docker.io/kafkaetech/kcm (chart version = KCM version, Helm 3.8+).
# JWT key pair of the API, created once before the install
mkdir -p keys
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out keys/private.pem
openssl pkey -in keys/private.pem -pubout -out keys/public.pem
kubectl create namespace kcm
kubectl -n kcm create secret generic kcm-api-keys --from-file=keys
# KCM with the embedded PostgreSQL and Redis
helm upgrade --install kcm oci://registry-1.docker.io/kafkaetech/kcm --version 1.6.1 -n kcm --set ingress.host=kcm.example.com --set ui.runtimeConfig.apiUrl=http://kcm.example.com --set ui.runtimeConfig.wsUrl=ws://kcm.example.com --set postgres.enabled=true --set redis.enabled=trueThe chart has no default password: the admin password is generated at install, helm install prints the command to read it. Every value is documented by helm show values oci://registry-1.docker.io/kafkaetech/kcm --version 1.6.1; the environment variables below go under api.env (the passwords under api.secret).
KCM can be fully configured via environment variables. The values below are the defaults used by the production profile when no value is provided.
| Variable | Default | Description |
|---|---|---|
KCM_APP_PORT |
9090 |
HTTP port used by the KCM API inside the container. |
KCM_COOKIE_NAME |
KCM_AT |
Name of the authentication cookie that stores the access token. |
KCM_COOKIE_DOMAIN |
`` | Cookie domain. Example: .kcmhub.io when UI and API run on subdomains. |
KCM_COOKIE_MAX_AGE_SECONDS |
86400 |
Lifetime of the authentication cookie in seconds. |
KCM_COOKIE_SAME_SITE |
Lax |
Since 1.4.0. SameSite of the authentication cookie. None only when the UI runs on another site than the API, over HTTPS. |
KCM_SESSION_CHECK_CACHE_SECONDS |
30 |
Since 1.4.0. Seconds each API instance caches the session state of a user (account enabled, session version): a revoked session is refused everywhere within this delay. |
KCM_LOGIN_MAX_FAILURES |
5 |
Since 1.4.0. Failed password sign ins of one username from one address before a lock (4 times more from any address lock the username). |
KCM_LOGIN_LOCK_MINUTES |
15 |
Since 1.4.0. Duration of that lock, in minutes. |
KCM_REDIRECT_ALLOWLIST |
http://localhost:4200 |
Comma-separated list of allowed redirect origins after login (format: scheme://host[:port], no trailing slash). Paths are ignored during validation. Example: https://app.kcmhub.io,http://localhost:4200 |
KCM_DEFAULT_REDIRECT |
http://localhost:4200 |
Default post-login/logout redirect URL (should be one of the allowed origins or a safe same-origin path). |
KCM_DEFAULT_USER_ENABLED |
true |
Whether to enable the built-in default admin user (intended for first setup or demos only). |
KCM_DEFAULT_PASSWORD |
admin (application: empty) |
Password of the default admin user when it is enabled. Since 1.4.0, when empty a random password is generated and printed once in the API log. |
| Variable | Default | Description |
|---|---|---|
KCM_LICENSE_PATH |
/license/license.json |
Path to the KCM license JSON file (typically mounted from the host, e.g. /app/license). |
KCM_LICENSE_KAFKA_TOPIC |
__kcm_license |
Kafka topic used to distribute license information across KCM instances. |
KCM_LICENSE_SIGNATURE_PATH |
/license/license.sig |
Path to the detached signature file used to verify license integrity. |
KCM_LICENSE_HISTORY_DIR |
/license/license-history |
Directory where license activation / usage history is stored. |
| Variable | Default (compose) | Description |
|---|---|---|
KCM_KEYS_GENERATE_IF_MISSING |
true (application: false) |
Since 1.2.1. Generates a missing JWT or encryption key pair at startup. An existing file is never replaced; a pair with only one of its two files stops the startup. |
KCM_ENCRYPT_PRIVATE_KEY |
/app/keys/encryption/private.pem |
Private key (PKCS#8 PEM) decrypting the secrets stored in the database. Distinct from the JWT pair since 1.2.1. |
KCM_ENCRYPT_PUBLIC_KEY |
/app/keys/encryption/public.pem |
Public key (X.509 PEM) encrypting the secrets stored in the database. |
KCM_ENCRYPT_PREVIOUS_PRIVATE_KEY |
/app/keys/private.pem (application: empty) |
Since 1.2.1. Private key of the previous encryption pair: the secrets it encrypted are still read and re-encrypted with the current pair at startup. Ignored when the file does not exist. |
Service accounts sign in with opaque tokens (Authorization: Bearer kcm_sa_...), created and revoked in
Settings > Users > Service Accounts > Tokens (or POST /api/v1/users/service-accounts/{name}/tokens).
| Variable | Default | Description |
|---|---|---|
KCM_SA_TOKEN_DEFAULT_VALIDITY_DAYS |
90 |
Validity of a new token when none is given. |
KCM_SA_TOKEN_MAX_VALIDITY_DAYS |
365 |
Maximum validity of a token. |
KCM_SA_LEGACY_JWT_ACCEPTED |
true |
Service account JWTs issued before 1.4.0 stay valid until they expire. Set false to refuse them at once. |
| Variable | Default | Description |
|---|---|---|
KCM_JWT_ISSUER |
kcm |
Issuer (iss) claim used when generating JWT access tokens. |
KCM_JWT_PERSISTENCE_MODE |
JDBC |
Persistence strategy for JWT tokens (e.g. JDBC, REDIS if supported). |
KCM_JWT_TOKEN_VALIDITY |
86400 |
JWT token validity period in seconds. |
KCM_JWT_PRIVATE_KEY |
/app/keys/jwt/private.pem |
Private key used to sign JWT tokens (distinct from the encryption pair since 1.2.1). |
KCM_JWT_PUBLIC_KEY |
/app/keys/jwt/public.pem |
Public key used to validate JWT signatures. |
| Variable | Default | Description |
|---|---|---|
KCM_APP_FILES_PATH |
/data |
Base directory for file storage (uploads, exports, temporary files) inside the app. |
| Variable | Default | Description |
|---|---|---|
KCM_DB_URL |
jdbc:postgresql://db:5432/kcm_db |
JDBC URL for the PostgreSQL database. |
KCM_DB_USER |
kcm_user |
PostgreSQL username. |
KCM_DB_PWD |
kcm_password |
PostgreSQL password. |
KCM_DB_HIKARI_MAX_POOL_SIZE |
20 |
Maximum number of connections in the HikariCP connection pool. |
KCM_DB_HIKARI_MIN_IDLE |
5 |
Minimum number of idle connections in the pool. |
KCM_DB_HIKARI_IDLE_TIMEOUT |
600000 |
Time in milliseconds before an idle connection is removed from the pool. |
KCM_DB_HIKARI_CONNECTION_TIMEOUT |
30000 |
Maximum time in milliseconds to wait for a connection from the pool. |
KCM_DB_HIKARI_MAX_LIFETIME |
1800000 |
Maximum lifetime in milliseconds of a connection in the pool. |
KCM_DB_HIKARI_POOL_NAME |
KCMHikariCP |
Name of the HikariCP connection pool. |
| Variable | Default | Description |
|---|---|---|
KCM_REDIS_CLUSTER_NODES |
`` | Optional Redis cluster nodes definition (comma-separated host:port). |
KCM_REDIS_HOST |
redis |
Redis hostname. |
KCM_REDIS_PORT |
6379 |
Redis port. |
KCM_REDIS_DB |
0 |
Redis database index used by KCM. |
KCM_REDIS_TIMEOUT |
2000 |
Redis connection timeout in milliseconds. |
| Variable | Default | Description |
|---|---|---|
KCM_ADMIN_CLIENT_ID |
kc-admin-client |
Kafka client.id used by KCM for admin operations. |
KCM samples the status of every connector and task of each Kafka Connect cluster and keeps the history (status history tab of a connector, availability column of the connectors list).
| Variable | Default | Description |
|---|---|---|
KCM_CONNECT_STATUS_HISTORY_ENABLED |
true |
Enables the sampling and the history. |
KCM_CONNECT_STATUS_HISTORY_CRON |
0 2/5 * * * * |
Sampling schedule (Spring cron, 6 fields). |
KCM_CONNECT_STATUS_HISTORY_INTERVAL_SECONDS |
300 |
Sampling period in seconds. Keep it equal to the period of the cron above. |
KCM_CONNECT_STATUS_HISTORY_RETENTION_DAYS |
30 |
Number of days the history is kept. |
Analysis of a consumer group with a local model served by Ollama. Disabled by default. Analyses are stored in the database and shared by every kcm-api instance.
| Variable | Default | Description |
|---|---|---|
KCM_ASSISTANT_ENABLED |
false |
Enables the assistant. |
KCM_ASSISTANT_OLLAMA_URL |
http://localhost:11434 |
Ollama URL, reachable from the kcm-api container. |
KCM_ASSISTANT_MODEL |
gemma3:4b |
Model used for the analysis (must be pulled in Ollama). |
KCM_ASSISTANT_TIMEOUT_SECONDS |
120 |
Maximum duration of one call to the model, in seconds. |
Every audit event can also be written on the standard output of kcm-api as one JSON line (logger kcm.audit, the JSON alone on the line), for a log collector feeding a SIEM. The lines never hold a secret nor the content of a message. Without an Enterprise license the stream stays off and a WARN says why at startup.
| Variable | Default | Description |
|---|---|---|
KCM_AUDIT_LOG_ENABLED |
false |
Writes every audit event as one JSON line on stdout. |
Fields of a line: schemaVersion, id, timestamp, action, status, actor (user, type), resourceType, resourceId, clusterId, kcmGroupId, durationMs, ip, userAgent, traceId, meta, errorMessage. Fields may be added in later versions, never renamed or removed.
KCM groups, Kafka clusters and their connections declared as code never hold a secret: they reference a file of a directory that kcm-api reads (passwordFrom: { file: payments-sasl-password }). Mount the directory read only and set the variable; a secret not referenced keeps the value entered in the UI.
| Variable | Default | Description |
|---|---|---|
KCM_IAC_SECRETS_DIR |
(none) | Directory of the secret files referenced by the KCM as code declarations. |
| Service | Image |
|---|---|
| Backend | kafkaetech/kcm-api |
| Frontend | kafkaetech/kcm-ui |
| Helm chart | kafkaetech/kcm (oci://registry-1.docker.io/kafkaetech/kcm) |
KCM is not open source. It is proprietary software, free to start with:
- ๐ Community: free forever, 2 Kafka clusters, 1 user.
- ๐ณ Starter, Team and Enterprise add clusters, users and modules: see the editions and prices.
- ๐งช Every edition can start with a 30-day Enterprise trial.
- ๐ฌ Questions? Contact contact@kcmhub.io.
- ๐ Students may receive a free 6-month license by emailing a valid student ID to the same address.
See LICENSE.txt for full terms.
- ๐ UI Docker Image
- ๐ API Docker Image
- ๐ Helm chart
- ๐ Official Website
- ๐ Repository
You can open issues or feedback directly on our GitHub repo. We also welcome feature suggestions, bug reports, and license requests.
๐ฎ For private requests or free license keys, please contact contact@kcmhub.io.
ยฉ 2024-2026 ELITE-TECH. All rights reserved.
