Skip to content

Configuration

tech-kev edited this page Mar 24, 2026 · 1 revision

Configuration

All configuration is done via environment variables — set them in your docker-compose.yml or .env file.


Required

Variable Description
SECRET_KEY Secret key for session encryption. Generate with: python3 -c "import secrets; print(secrets.token_hex(32))"

Server (optional)

Variable Default Description
PORT 5001 Server port
DATABASE_URL SQLite (built-in) Database connection URL (e.g. sqlite:///path/to/db)
FLASK_DEBUG false Enable Flask debug mode (not recommended for production)

AI Provider (optional)

Configure at least one provider to enable the AI writing assistant.

OpenAI

Variable Default Description
OPENAI_API_KEY OpenAI API key
OPENAI_MODEL gpt-4o-mini OpenAI model to use

Anthropic

Variable Default Description
ANTHROPIC_API_KEY Anthropic API key
ANTHROPIC_MODEL claude-haiku-4-5 Anthropic model to use

Ollama (local / self-hosted)

Variable Default Description
OLLAMA_BASE_URL Ollama server URL (e.g. http://host.docker.internal:11434)
OLLAMA_MODEL llama3.2 Ollama model name

Custom Prompt

Variable Default Description
AI_SYSTEM_PROMPT Built-in prompt Custom system prompt that overrides the default

Notifications (optional)

Email (SMTP)

Variable Default Description
SMTP_HOST SMTP server hostname
SMTP_PORT 587 SMTP server port
SMTP_USER SMTP username
SMTP_PASS SMTP password
SMTP_FROM Value of SMTP_USER Sender email address

Telegram

Variable Default Description
TELEGRAM_BOT_TOKEN Telegram bot token from @BotFather

Push notifications work out of the box — no configuration needed.


Demo Mode (optional)

Variable Default Description
DEMO_MODE false Enable demo mode (isolated sessions per visitor)
DEMO_SESSION_TIMEOUT 30 Session timeout in minutes

v1 Migration (optional)

See Migration from v1 for full instructions.

Variable Default Description
MIGRATION_V1_MYSQL_HOST v1 MySQL hostname
MIGRATION_V1_MYSQL_PORT 3306 v1 MySQL port
MIGRATION_V1_MYSQL_USER root v1 MySQL username
MIGRATION_V1_MYSQL_PASS v1 MySQL password
MIGRATION_V1_MYSQL_DB sharedmoments v1 MySQL database name
MIGRATION_V1_UPLOAD_PATH Path to mounted v1 uploads (e.g. /v1-uploads)
MIGRATION_DRY_RUN false Set to true to preview without making changes

Clone this wiki locally