Skip to content

Configuration

All settings are configured via environment variables prefixed with MYCELLM_. They can be set in:

  • ~/.config/mycellm/.env (written by mycellm init)
  • Shell environment
  • Docker -e flags
VariableDefaultDescription
MYCELLM_API_KEY(none)API key for dashboard/API authentication
MYCELLM_BOOTSTRAP_PEERS(none)Bootstrap node addresses (host:port, comma-separated)
MYCELLM_HF_TOKEN(none)HuggingFace token for gated models + higher rate limits
MYCELLM_DB_URLSQLiteDatabase URL (postgresql+asyncpg://user:pass@host/db)
MYCELLM_TELEMETRYfalseOpt-in anonymous usage stats
MYCELLM_LOG_LEVELINFOLog verbosity: DEBUG, INFO, WARNING, ERROR
MYCELLM_RELAY_BACKENDS(none)Relay endpoints (comma-separated OpenAI-compatible URLs)
MYCELLM_MODEL_DIR~/.local/share/mycellm/modelsGGUF model download directory
MYCELLM_DATA_DIR~/.local/share/mycellmAll persistent data
MYCELLM_CONFIG_DIR~/.config/mycellmConfiguration directory
MYCELLM_API_HOST127.0.0.1API bind address
MYCELLM_API_PORT8420API port
MYCELLM_QUIC_PORT8421QUIC transport port (UDP)
MYCELLM_EXTERNAL_HOST(none)Public IP override for NAT traversal
MYCELLM_NODE_NAMEhostnameDisplay name for this node
MYCELLM_INITIAL_CREDITS100.0Starting credit balance
PortProtocolPurpose
8420TCPHTTP API + Dashboard
8421UDPQUIC P2P transport
8422UDPDHT discovery (optional)
~/.local/share/mycellm/
├── keys/ # Ed25519 account + device keys
├── certs/ # Device certificates
├── tls/ # Self-signed TLS for QUIC
├── models/ # Downloaded GGUF files
├── federation/ # Network identity + memberships
├── secrets.json # Encrypted API keys (Fernet)
├── mycellm.db # SQLite database
└── model_configs.json # Saved model configurations
~/.config/mycellm/
└── .env # Environment overrides

For larger networks, switch from SQLite to PostgreSQL:

Terminal window
MYCELLM_DB_URL="postgresql+asyncpg://user:pass@localhost/mycellm"

Install the PostgreSQL driver:

Terminal window
pip install "mycellm[postgres]"