.env file at the project root. Create this file before starting the app. All variables are read once at startup; restart the app after making changes.
Variables
Required
The full endpoint URL of your Gemini Proxy Balancer instance. The proxy handles API key rotation and quota management across multiple Gemini keys.Example:
https://your-proxy.up.railway.app/v1/chat/completionsAbsolute path to the Obsidian vault folder that Second Brain should read from and write to. Use a forward-slash path on all platforms.On Railway deployments, use
/app/obsidian-vaults.Example: /Users/you/Documents/MyVaultOptional
Comma-separated list of Gemini model IDs to use, in priority order. Second Brain tries each model in order and falls back to the next if a request fails.Default:
gemini-2.5-flash,gemini-3-flash-preview,gemini-3.1-flash-lite-preview,gemini-2.0-flash-lite,gemini-3.1-flash-live-preview,gemini-flash-latestExample: gemini-2.5-flash,gemini-2.0-flash-liteMaximum number of agent reasoning rounds per task. Increase this for complex multi-step tasks; decrease it to reduce latency and token usage.Default:
3Logging verbosity for the application. Use
DEBUG to see detailed agent output in the server logs.Options: DEBUG, INFO, WARNING, ERRORDefault: INFOExample .env file
.env
You can also set and persist the vault path from inside the app. Open the Vault Launcher, select or browse to a vault, and click Open. Second Brain writes the resolved path back to your
.env file automatically.