Configuration

2 min read

nclaw reads configuration from environment variables, .env files, or YAML config files.

Environment Variables

All variables use the NCLAW_ prefix.

VariableRequiredDefaultDescription
NCLAW_TELEGRAM_BOT_TOKENYesTelegram bot token from @BotFather
NCLAW_DATA_DIRYesBase directory for session data and files
NCLAW_TELEGRAM_WHITELIST_CHAT_IDSNoComma-separated list of allowed Telegram chat IDs. If unset, accepts all chats (with a security warning)
NCLAW_DB_PATHNo{data_dir}/nclaw.dbPath to the SQLite database
NCLAW_TIMEZONENosystem localTimezone for the scheduler (e.g. Europe/Berlin)
NCLAW_WEBHOOK_BASE_DOMAINNoBase domain for webhook URLs (required when using webhooks)
NCLAW_WEBHOOK_PORTNo:3000Webhook HTTP server listen address

Security notice: If NCLAW_TELEGRAM_WHITELIST_CHAT_IDS is not set, the assistant will accept messages from any Telegram chat. Since nclaw runs Claude Code with full tool access (file system, shell, network), this effectively gives anyone who discovers your bot unrestricted access to the host environment. Always set this variable in production.

Config File

nclaw looks for config.yaml in the current directory or $HOME/.nclaw/. Nested keys map to env vars with underscores (e.g. telegram.bot_token = NCLAW_TELEGRAM_BOT_TOKEN).

telegram:
  bot_token: "your-telegram-bot-token"
  whitelist_chat_ids: "123456789,987654321"

data_dir: "/app/data"
db_path: "/app/data/nclaw.db"
timezone: "Europe/Berlin"

webhook:
  base_domain: "example.com"
  port: ":3000"

Example .env

NCLAW_TELEGRAM_BOT_TOKEN=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
NCLAW_TELEGRAM_WHITELIST_CHAT_IDS=12345678,87654321
NCLAW_DATA_DIR=/data

Helm Values

When deploying with the Helm chart, configuration is passed via Helm values:

ParameterDefaultDescription
image.repositoryghcr.io/nickalie/nclawDocker image
image.tagChart appVersionImage tag
env.dataDir/app/dataData directory inside container
env.telegramBotToken""Telegram bot token
env.whitelistChatIds""Comma-separated allowed chat IDs
env.webhookBaseDomain""Base domain for webhook URLs
existingSecret""Use existing secret for bot token (key: telegram-bot-token)
claudeCredentialsSecret""Secret with Claude credentials (key: credentials.json)
persistence.enabledtrueEnable persistent storage
persistence.size1GiPVC size
persistence.storageClass""Storage class
persistence.existingClaim""Use existing PVC
rbac.createtrueCreate ServiceAccount and ClusterRoleBinding
rbac.clusterRolecluster-adminClusterRole to bind
proxy.enabledfalseEnable HTTP proxy
proxy.httpProxy""HTTP_PROXY value
proxy.httpsProxy""HTTPS_PROXY value
resources.requests.cpu100mCPU request
resources.requests.memory128MiMemory request
resources.limits.cpu1000mCPU limit
resources.limits.memory2GiMemory limit