Skip to content
Back to site

Configuration

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

VariableDefaultDescription
PORT3000HTTP server port
HOST127.0.0.1Bind address (0.0.0.0 to expose on all interfaces)
HIVEKEEP_DATA_DIR./dataPersistent data directory (DB, uploads, workspaces)
DB_PATH$HIVEKEEP_DATA_DIR/hivekeep.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, and CORS). Sign-in works from any address the server itself is reached at (same-origin requests are always trusted), so this is about the URLs Hivekeep generates, not about being able to log in.
TRUSTED_ORIGINS(none)Comma-separated list of additional origins allowed for CORS and auth (e.g. https://app.example.com,https://other.example.com). Setting it replaces the defaults (PUBLIC_URL + localhost dev origins), so include PUBLIC_URL yourself. The origin a request arrives on is always trusted regardless.

Hivekeep stores everything in a single directory (HIVEKEEP_DATA_DIR):

  • SQLite database: messages, agents, settings, memories
  • File uploads: user-uploaded files and generated images
  • Agent workspaces: custom tools and scripts created by Agents
  • Encryption key: auto-generated on first run if not provided
VariableDefaultDescription
HISTORY_TOKEN_BUDGET40000Max tokens for conversation history in context
VariableDefaultDescription
HIVEKEEP_CUSTOM_TOOL_TIMEOUT30000Default execution timeout for custom tools (ms)
HIVEKEEP_CUSTOM_TOOL_MAX_TIMEOUT300000Maximum allowed timeout for custom tools (ms). Per-invocation values are capped to this limit
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

Limits of the Files workspace browser.

VariableDefaultDescription
WORKSPACE_FILES_MAX_EDITABLE_SIZE5Max size (MB) of a text file editable in the browser; above this it becomes download-only
WORKSPACE_FILES_MAX_UPLOAD_SIZE100Max size (MB) per file uploaded to a workspace (0 = unlimited)
WORKSPACE_FILES_MAX_COPY_SIZE500Byte budget (MB) of a recursive folder copy
WORKSPACE_FILES_COPY_MAX_ENTRIES5000Entry-count budget of a recursive folder copy
WORKSPACE_FILES_SEARCH_MAX_RESULTS50Hard cap on file-search results
WORKSPACE_FILES_SEARCH_MAX_ENTRIES20000Files walked per search request
VariableDefaultDescription
HIVEKEEP_VERSION(auto-detected)Explicit version override. Read from package.json by default. In Docker, automatically set by the entrypoint. Only needed if version detection fails.
VERSION_CHECK_ENABLEDfalseEnable automatic version checking against GitHub releases
VERSION_CHECK_REPOMarlBurroW/hivekeepGitHub 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)
  • Read-only tool concurrency (TOOLS_CONCURRENCY_CAP, default 5)
  • Tool-turn temperature (TOOLS_TEMPERATURE, default 0; steadies tool-call JSON on small local models; off defers to the backend)
  • Queue settings
  • Cron limits
  • Web browsing configuration
  • Channel origin TTL (CHANNEL_PENDING_ORIGIN_TTL, default 5min)