Nokwatch docs

Configuration

Nokwatch is configured via environment variables. Use a .env file in the project root (copy from .env.example). Never commit .env to version control.

Required

  • SECRET_KEY — Flask session key; use a strong random value in production.
  • SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD, SMTP_USE_TLS — For email notifications.

Optional

  • DATABASE_PATH — Path to SQLite database (default: monitor.db in project root).
  • OPENAI_API_KEY — For Smart Setup suggestions and AI content detection.
  • ENCRYPTION_KEY — Fernet key to encrypt auth credentials and notification config in the database. Generate with: python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
  • DEFAULT_CHECK_INTERVAL — Default interval in seconds (e.g. 300).
  • USER_AGENT / USER_AGENT_POOL — User-Agent for HTTP requests.
  • RESTART_AFTER_PLUGIN_CHANGE — If true (default), the app exits after plugin install/uninstall so you can restart it (e.g. with systemd). Set to false when using gunicorn or a process manager that restarts automatically.

Example .env

FLASK_ENV=production
FLASK_DEBUG=False
SECRET_KEY=your-super-secret-key

DATABASE_PATH=monitor.db

SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=you@gmail.com
SMTP_PASSWORD=your-app-password
SMTP_USE_TLS=True

# Optional
# OPENAI_API_KEY=
# ENCRYPTION_KEY=