Browse docs

Configuration

Environment variables for the self-hosted Fluxmail MCP server.

Environment variables

Every setting is an environment variable, and there are three places to put one. In precedence order:

  1. The shell environment (always wins)
  2. .env.local, then .env, read from the working directory
  3. fluxmail config set <KEY> <value>, stored in <data dir>/config.env and available no matter where you run the CLI from

For a personal setup, fluxmail config set is the simplest: set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET once and every command and server mode finds them. Use fluxmail config list to review stored settings (secret values are masked) and fluxmail config unset <KEY> to remove one.

Env var Default Purpose
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET (required for Gmail) Your Google OAuth app
FLUXMAIL_DATA_DIR ~/.fluxmail (/data in Docker) SQLite DB and autogenerated encryption key
FLUXMAIL_ENCRYPTION_KEY autogenerated 64 hex chars; encrypts OAuth tokens at rest
FLUXMAIL_PORT 8977 HTTP port
FLUXMAIL_PUBLIC_URL http://localhost:8977 Public URL, used for OAuth redirect URIs
FLUXMAIL_AUTH apikey none disables MCP auth (trusted networks only)
FLUXMAIL_OAUTH_PORT 8976 Loopback port for the CLI OAuth flow
FLUXMAIL_OAUTH_HOST 127.0.0.1 OAuth listener bind address (0.0.0.0 in Docker)
FLUXMAIL_LICENSE_KEY (none) Paid-plan license key; usually set via fluxmail license activate

For the full command set, see the CLI reference.