Skip to main content
This guide shows how to deploy ChatCLI in production with all security measures enabled. Follow each step in order to ensure a complete configuration.

Prerequisites

  • Kubernetes cluster with Helm 3.8+
  • kubectl and helm configured
  • openssl available for key generation
  • Access to create Secrets in the target namespace

Step 1: Generate JWT Secret and Create K8s Secret

JWT is used to authenticate connections between clients and the ChatCLI server.
Store the $JWT_SECRET value in a secrets vault (Vault, AWS Secrets Manager, etc.). You will need it to configure remote clients.
Verify the Secret:

Step 2: Configure TLS Certificates


Step 3: Set Up Rate Limiting

Define request limits to prevent abuse and DoS:
In Kubernetes, bindAddress is automatically set to 0.0.0.0 via KUBERNETES_SERVICE_HOST detection. Only set it explicitly for non-Kubernetes server deployments.
For multi-tenant environments, consider lower values (5-10 RPS per instance) and use HPA to scale horizontally.

Step 4: Enable Audit Logging

Audit logging records each operation with details of who, what, and when:
Audit logs include:
  • Authenticated user (via JWT claims)
  • Command or operation executed
  • Timestamp and result (success/failure)
  • Source IP of the request

Step 5: Configure Agent Command Allowlist

Enable strict mode to ensure only approved commands are executed:
In strict mode, over 150 common commands are already pre-approved across 8 categories (file, text, dev, containers, network, system, editors, shell). Only add commands specific to your workflow.

Step 6: Sign Plugins with Ed25519

To ensure only trusted plugins are loaded:
Configure ChatCLI to verify signatures:

Step 7: Set Up Session Encryption

Enable encryption for sessions stored on disk:

Step 8: Configure Operator Security

For environments with the K8s operator, configure additional protections. First, create a Secret with the operator API keys (dashboard / REST API auth):
This Secret is different from the chatcli-api-keys Secret consumed by the chatcli server (which carries OPENAI_API_KEY, ANTHROPIC_API_KEY etc. via Instance.spec.apiKeys.name). See Security โ€” Operator Authentication for the comparison table.
Changes to the Secret chatcli-operator-secrets (or the ConfigMap chatcli-operator-config as fallback โ€” same api-keys field) are picked up automatically within 30 seconds. No operator restart is needed.
Then, configure the security environment variables:

Step 9: Deploy with Helm (Complete Configuration)

Combine all configurations into a single values-prod.yaml:

Step 10: Verify Security

Run this checklist to confirm everything is configured correctly:
1

Verify TLS

2

Verify JWT Secret

3

Verify Pod SecurityContext

4

Verify NetworkPolicy

5

Verify gRPC Reflection is disabled

6

Test authenticated connection

7

Verify rate limiting

8

Verify audit logs


Final Checklist


Next Steps

Security and Hardening

Complete documentation of all security measures.

Deploy with Docker and Helm

Complete containerized deployment guide.

K8s Operator

Configure the Kubernetes operator.

Configuration Reference

All available environment variables.