Environment Variables

July 12, 2026 · View on GitHub

A complete reference of all environment variables used by InnoClaw.

Core Configuration

VariableTypeRequiredDefaultDescription
WORKSPACE_ROOTSstringYesComma-separated absolute paths where workspaces can be created. Directories must exist on the server.
DATABASE_URLstringNo./data/innoclaw.dbSQLite database filesystem path. Set to a local path when the project resides on NFS or another network filesystem.
AUTH_SECRETstringRecommendedDevelopment fallbackLong random secret used to sign local authentication session cookies. Set this in production.
AUTH_MODEstringNolocalAuthentication mode. Set to disabled only for trusted local or single-user deployments to bypass registration/login and grant every request admin-level access.
AUTH_SINGLE_ADMINbooleanNofalseWhen true, requires exactly one bootstrapped active administrator. Public registration can create ordinary users only, and administrator role mutation is disabled. Values are strictly true or false.
AUTH_COOKIE_SECUREbooleanNotrue in productionOverrides the Secure attribute on authentication cookies. Set to false only during a temporary plain-HTTP rollout. Values are strictly true or false.
NEXT_BUILD_DIRstringNo.nextNext.js build output directory inside the project root (for example .next-local). On Next.js 16 / Turbopack this cannot point outside the repo.

With AUTH_SINGLE_ADMIN=true, run the administrator bootstrap command before opening public registration. Ordinary users receive private roots at <WORKSPACE_ROOTS entry>/users/<immutable-user-id>; the administrator retains visibility across the configured operator roots.

AI Provider Configuration

VariableTypeRequiredDefaultDescription
OPENAI_API_KEYstringNoOpenAI API key for chat and embedding.
ANTHROPIC_API_KEYstringNoAnthropic API key for Claude models.
GEMINI_API_KEYstringNoGoogle Gemini API key for Gemini models.
SHLAB_API_KEYstringNoSH-Lab API key for Intern models.
QWEN_API_KEYstringNoQwen API key.
MOONSHOT_API_KEYstringNoMoonshot API key for Kimi models.
DEEPSEEK_API_KEYstringNoDeepSeek API key.
MINIMAX_API_KEYstringNoMiniMax API key.
ZHIPU_API_KEYstringNoZhipu API key for GLM models.
OPENAI_BASE_URLstringNohttps://api.openai.com/v1Custom OpenAI-compatible API endpoint (for proxies or third-party providers).
ANTHROPIC_BASE_URLstringNohttps://api.anthropic.comCustom Anthropic API endpoint.
GEMINI_BASE_URLstringNoCustom Gemini-compatible API endpoint (OpenAI-compatible proxy).
SHLAB_BASE_URLstringNoVendor-level base URL for all SH-Lab models. Per-model URLs (e.g. SHLAB_INTERN_S1_PRO_BASE_URL) take priority.
QWEN_BASE_URLstringNoVendor-level base URL for all Qwen models. Per-model URLs (e.g. QWEN_QWEN3_235B_BASE_URL) take priority.
MOONSHOT_BASE_URLstringNoVendor-level base URL for all Moonshot models. Per-model URLs (e.g. MOONSHOT_KIMI_K2_5_BASE_URL) take priority.
DEEPSEEK_BASE_URLstringNoVendor-level base URL for all DeepSeek models. Per-model URLs (e.g. DEEPSEEK_DEEPSEEK_V3_2_BASE_URL) take priority.
MINIMAX_BASE_URLstringNoVendor-level base URL for all MiniMax models. Per-model URLs (e.g. MINIMAX_MINIMAX2_5_BASE_URL) take priority.
ZHIPU_BASE_URLstringNoVendor-level base URL for all Zhipu models. Per-model URLs (e.g. ZHIPU_GLM_5_BASE_URL) take priority.
LLM_PROVIDERstringNoopenaiDefault LLM provider: openai, anthropic, or gemini. Overridable in Settings UI.
LLM_MODELstringNogpt-4o-miniDefault model ID. Overridable in Settings UI.
OPENAI_REASONING_EFFORTstringNoProvider defaultDefault reasoning effort for OpenAI language-model calls: none, minimal, low, medium, high, or xhigh. Input is trimmed and case-normalized; ultra is accepted as an alias for xhigh. Invalid values fail explicitly.

:::{note} At least one AI API key (OpenAI, Anthropic, or Gemini) is needed for AI chat and note generation features. Without any API key, workspace management, file browsing, and other non-AI features still work. :::

OPENAI_REASONING_EFFORT applies only to OpenAI language-model calls and the unknown-provider OpenAI-compatible fallback. It does not alter embeddings or named Anthropic, Gemini, Qwen, Moonshot, DeepSeek, MiniMax, Zhipu, or SH-Lab providers. Omit it to preserve the upstream provider default. Confirm that a custom OpenAI-compatible endpoint supports the normalized value before rollout.

Agent Configuration

VariableTypeRequiredDefaultDescription
AGENT_MAX_STEPSnumberNo10Maximum agent tool-call steps per request (1–100). Higher values allow complex multi-step tasks but cost more tokens.

Embedding API Configuration

These allow using a separate service for vector embeddings, independent of the chat model provider.

VariableTypeRequiredDefaultDescription
EMBEDDING_API_KEYstringNoFalls back to OPENAI_API_KEYAPI key for the embedding service.
EMBEDDING_BASE_URLstringNoFalls back to OPENAI_BASE_URLEndpoint for the embedding service.
EMBEDDING_MODELstringNotext-embedding-3-smallName of the embedding model to use.

Example — Using a dedicated embedding service:

# Chat model (via OpenAI-compatible proxy)
OPENAI_API_KEY=sk-your-chat-key
OPENAI_BASE_URL=http://your-proxy:3888/v1

# Embedding model (separate configuration)
EMBEDDING_API_KEY=sk-your-embedding-key
EMBEDDING_BASE_URL=http://your-proxy:3888/v1
EMBEDDING_MODEL=google/gemini-embedding-001

GitHub Integration

VariableTypeRequiredDefaultDescription
GITHUB_TOKENstringNoGitHub Personal Access Token for cloning/pulling private repositories. Requires repo scope.

HuggingFace / ModelScope Datasets

VariableTypeRequiredDefaultDescription
HF_TOKENstringNoHuggingFace access token. Avoids rate limits when downloading datasets. Also settable via the Settings UI.
HF_DATASETS_PATHstringNo./data/hf-datasetsLocal directory for downloaded HuggingFace/ModelScope datasets.

SCP Hub (Scientific Skills)

VariableTypeRequiredDefaultDescription
SCP_HUB_API_KEYstringNoAPI key for the Intern-Discovery Platform, enabling 206 built-in SCP scientific skills (drug discovery, protein analysis, genomics, chemistry, etc.).

HTTP Proxy

VariableTypeRequiredDefaultDescription
HTTP_PROXYstringNoHTTP proxy for all outbound fetch() calls (AI API, GitHub, etc.).
HTTPS_PROXYstringNoHTTPS proxy. Typically the same value as HTTP_PROXY.
NO_PROXYstringNoComma-separated hosts/CIDRs that bypass the proxy, e.g. localhost,127.0.0.1,10.0.0.0/8.

Feishu (Lark) Bot Configuration

VariableTypeRequiredDefaultDescription
FEISHU_BOT_ENABLEDbooleanNofalseEnable Feishu bot integration.
FEISHU_APP_IDstringNoFeishu application ID.
FEISHU_APP_SECRETstringNoFeishu application secret.
FEISHU_VERIFICATION_TOKENstringNoToken for verifying Feishu webhook requests.
FEISHU_ENCRYPT_KEYstringNoEncryption key for Feishu event payloads.
FEISHU_PUSH_SECRETstringNoShared secret for authenticating the push API (/api/bot/feishu/push). Required for web-to-Feishu message forwarding.
FEISHU_LOG_LEVELstringNoinfoSDK log verbosity: error, warn, info, debug, trace.

WeChat Enterprise Bot Configuration

VariableTypeRequiredDefaultDescription
WECHAT_BOT_ENABLEDbooleanNofalseEnable WeChat Enterprise bot integration.
WECHAT_CORP_IDstringNoWeChat Enterprise corporation ID.
WECHAT_CORP_SECRETstringNoWeChat Enterprise application secret.
WECHAT_TOKENstringNoToken for verifying WeChat webhook requests.
WECHAT_ENCODING_AES_KEYstringNoAES key for encrypting/decrypting WeChat messages.
WECHAT_AGENT_IDstringNoWeChat Enterprise agent (application) ID.

Kubernetes / Cluster Integration

VariableTypeRequiredDefaultDescription
KUBECONFIG_PATHstringNoPath to the kubeconfig file used by generic Kubernetes Job tools.
K8S_CONTEXTstringNoKubeconfig context used by the generic Job profile fallback.
K8S_DEFAULT_NAMESPACEstringNodefaultDefault namespace for the generic Job profile fallback.
K8S_ALLOWED_NAMESPACESstringNoK8S_DEFAULT_NAMESPACEComma-separated namespace allow-list for generic Job tools.
K8S_JOB_DEFAULT_IMAGEstringNoDefault image for the generic Job profile fallback.
K8S_JOB_PROFILE_IDstringNodefaultProfile id used when env vars create the fallback profile.
K8S_JOB_PROFILES_FILEstringNoPath to a private local JSON file containing generic clusters and Job profiles.
K8S_JOB_PROFILES_JSONstringNoInline JSON config for generic clusters and Job profiles. Use a file for private local values.

Security Notes

  • All API keys and tokens are used server-side only and are never exposed to the browser client.
  • AUTH_MODE=disabled removes application-level authentication. Anyone who can reach the service gets admin-level access, so use it only behind trusted local access or another access-control layer.
  • AUTH_SINGLE_ADMIN=true fails closed until the administrator bootstrap has completed. Do not expose registration before that step.
  • AUTH_COOKIE_SECURE=false only permits cookies over plain HTTP. It does not encrypt login credentials, session cookies, or application traffic; use HTTPS and restore the secure-cookie default as soon as possible.
  • Store your .env.local file securely and do not commit it to version control.
  • The .gitignore file already excludes .env* files (except .env.example).