Skip to content

Configuration

KinBot uses environment variables for configuration. Copy .env.example to .env and adjust as needed. All values have sensible defaults — you can start with an empty .env.

VariableDefaultDescription
PORT3333 (3000 in Docker)HTTP server port
HOST127.0.0.1Bind address (0.0.0.0 to expose on all interfaces)
KINBOT_DATA_DIR./dataPersistent data directory (DB, uploads, workspaces)
DB_PATH$KINBOT_DATA_DIR/kinbot.dbSQLite database file path
ENCRYPTION_KEY(auto-generated)64-char hex key for AES-256-GCM vault encryption. Auto-generated and persisted to data/.encryption-key on first run.
BETTER_AUTH_SECRET(uses ENCRYPTION_KEY)Secret for session signing. Falls back to ENCRYPTION_KEY if not set.
LOG_LEVELinfodebug / info / warn / error
PUBLIC_URLhttp://localhost:<PORT>Public-facing URL (used in webhooks, invitation links)

KinBot stores everything in a single directory (KINBOT_DATA_DIR):

  • SQLite database — messages, kins, settings, memories
  • File uploads — user-uploaded files and generated images
  • Kin workspaces — custom tools and scripts created by Kins
  • Encryption key — auto-generated on first run if not provided
VariableDefaultDescription
HISTORY_TOKEN_BUDGET40000Max tokens for conversation history in context
VariableDefaultDescription
WEBHOOKS_LOG_RETENTION_DAYS30Webhook execution log retention period in days
WEBHOOKS_MAX_LOGS_PER_WEBHOOK500Max stored execution logs per webhook
WEBHOOKS_RATE_LIMIT_PER_MINUTE60Max webhook executions per minute
VariableDefaultDescription
UPLOAD_CHANNEL_RETENTION_DAYS30Channel file retention period in days
UPLOAD_CHANNEL_CLEANUP_INTERVAL60Channel file cleanup interval in minutes
VariableDefaultDescription
VERSION_CHECK_ENABLEDfalseEnable automatic version checking against GitHub releases
VERSION_CHECK_REPOMarlBurroW/kinbotGitHub repo to check for new releases
VERSION_CHECK_INTERVAL_HOURS12Hours between version checks

See .env.example for the complete list of all options including:

  • Compacting threshold (COMPACTING_THRESHOLD_PERCENT, default 75%)
  • Memory tuning (extraction, vector dimensions, search pipeline)
  • Tool step limit (TOOLS_MAX_STEPS, default 0 = unlimited)
  • Queue settings
  • Cron limits
  • Web browsing configuration
  • Channel origin TTL (CHANNEL_PENDING_ORIGIN_TTL, default 5min)