Skip to main content

⚙️ Configuration

Flux0 is configured entirely via environment variables for maximum flexibility and portability.
This allows you to run it locally, in containers, or in cloud environments without changing the code.


📦 Modules to Load

Flux0 loads agent modules dynamically at runtime.

# Comma-separated list of Python packages/modules to load
FLUX0_MODULES=modules.agents

Example: If your project has multiple agent modules, separate them with commas:

FLUX0_MODULES=modules.agents,my_custom_agent

🗄 Database (Storage) Configuration

Flux0 uses a single DB URI variable to define the storage backend.
This makes it easy to switch between in-memory, file-based, or production-grade databases.

ModeURI ExampleNotes
In-MemoryFLUX0_DB_URI=nanodb://memoryNo persistence, resets on restart. Best for testing.
File-BasedFLUX0_DB_URI=nanodb://json?dir=./dataStores JSON files locally. Works with a single server. Great for POC/MVP.
MongoDBFLUX0_DB_URI=mongodb://localhost:27017Production-ready, supports clustering and replication.

🌍 Environment Mode

Controls environment-specific settings such as logging format.

# Possible values: development | production
FLUX0_ENV=development

🔌 Server Port

The port Flux0 binds to. Defaults to 8080 if not set.

FLUX0_PORT=8080

📝 Logging Level

Sets the verbosity of logs.

# Possible values: debug | info | warning | error | critical
FLUX0_LOG_LEVEL=debug

✅ Example .env file

FLUX0_MODULES=modules.agents,my_custom_agent
FLUX0_DB_URI=nanodb://json?dir=./data
FLUX0_ENV=development
FLUX0_PORT=9090
FLUX0_LOG_LEVEL=debug

You can load this .env file automatically when running Flux0 locally or in Docker.