Skip to main content
Grind reads configuration from environment variables. Copy .env.example to .env in the repo root for local development.

Vault

VariableDefaultDescription
GRIND_VAULT_PATH~/.grind/vault.dbPath to the SQLite vault database
GRIND_ENCRYPTION_KEYAES encryption key for the vault (generated on init)

Companion & AI

VariableDefaultDescription
GRIND_ENABLE_COMPANIONfalseEnable the AI companion
GRIND_DEFAULT_MODELanthropic:claude-3-5-haiku-latestDefault model identifier (provider:model)
ANTHROPIC_API_KEYAnthropic API key
OPENAI_API_KEYOpenAI API key
GOOGLE_GENERATIVE_AI_API_KEYGoogle Gemini API key
OLLAMA_BASE_URLhttp://localhost:11434/v1Ollama endpoint for local models

Turso (Cloud Sync)

VariableDefaultDescription
TURSO_DATABASE_URLTurso database URL (libsql://your-db.turso.io)
TURSO_AUTH_TOKENTurso auth token
Both must be set to enable cloud sync. If either is missing, Grind operates in local-only mode.

Gateway

VariableDefaultDescription
GRIND_GATEWAY_HOST127.0.0.1Host the gateway server binds to
GRIND_GATEWAY_PORT5174Port the gateway listens on
GRIND_GATEWAY_TOKENShared secret for generic /hooks/inbound

Telegram

VariableDescription
GRIND_TELEGRAM_BOT_TOKENTelegram bot token from @BotFather
GRIND_TELEGRAM_WEBHOOK_SECRETSecret for webhook verification
GRIND_TELEGRAM_WEBHOOK_PATHWebhook path (default: /hooks/telegram)

Discord

VariableDescription
GRIND_DISCORD_PUBLIC_KEYDiscord app public key for Ed25519 signature verification
GRIND_DISCORD_WEBHOOK_PATHWebhook path (default: /hooks/discord)

WhatsApp

VariableDescription
GRIND_WHATSAPP_MODEcloud (Cloud API) or web (Baileys)
GRIND_WHATSAPP_VERIFY_TOKENToken for webhook challenge verification
GRIND_WHATSAPP_APP_SECRETApp secret for HMAC signature verification
GRIND_WHATSAPP_WEBHOOK_PATHWebhook path (default: /hooks/whatsapp)
GRIND_WHATSAPP_ACCESS_TOKENWhatsApp Cloud API access token
GRIND_WHATSAPP_PAIRING_METHODqr or phone (for Baileys mode)
GRIND_WHATSAPP_PAIRING_PHONEPhone number for pairing code method
GRIND_WHATSAPP_LINKED_ATTimestamp of last Baileys session link

Google Calendar

VariableDescription
GRIND_GOOGLE_CALENDAR_CHANNEL_TOKENToken for push notification verification
GRIND_GOOGLE_CALENDAR_WEBHOOK_PATHWebhook path (default: /hooks/google-calendar)