Skip to content
Back

Configuration

Environment variables and settings for self-hosted LiveFolio — AI providers, security, and runtime options.

Getting Started

Copy the example config and edit it:

cp .env.example .env

Required Configuration

At least one AI provider key is required for AI-powered folio generation.

AI Providers

# Google Gemini (default)
GEMINI_API_KEY=your_key_here

# Anthropic Claude
ANTHROPIC_API_KEY=your_key_here

# OpenAI
OPENAI_API_KEY=your_key_here

# DeepSeek
DEEPSEEK_API_KEY=your_key_here

Ollama runs locally and doesn't need an API key. See AI Providers for setup details.

Security

# Optional: MCP authentication key
# If set, MCP clients must provide this key
LiveFolio_API_KEY=your_secret_key

If no key is set, all local MCP connections are allowed. Set a key to require authentication from AI agents.

App Mode

# Keep this as 'oss' for self-hosting
NEXT_PUBLIC_APP_ENV=oss

Runtime Options

# Custom port (default: 3000)
PORT=4000 npm run dev

Settings File

Some runtime configuration lives in settings.json at the project root:

{
  "mcpKey": "your-secret-key",
  "customTunnelUrl": "https://my-folios.example.com"
}
FieldDescription
mcpKeyAlternative to LiveFolio_API_KEY env var
customTunnelUrlCustom domain for public tunnel sharing

The MCP server checks both the environment variable and settings file for authentication. Settings file takes precedence for mcpKey.

Full .env Reference

# ── AI Providers (at least one required) ─────────────────────
GEMINI_API_KEY=           # https://ai.google.dev
ANTHROPIC_API_KEY=        # https://console.anthropic.com
OPENAI_API_KEY=           # https://platform.openai.com
DEEPSEEK_API_KEY=         # https://platform.deepseek.com

# ── Security ────────────────────────────────────────────────
LiveFolio_API_KEY=        # MCP authentication (optional)

# ── App Mode ────────────────────────────────────────────────
NEXT_PUBLIC_APP_ENV=oss   # Set to 'oss' for self-hosting

All other variables in .env.example are for cloud deployments and are not needed for self-hosting.