-
Notifications
You must be signed in to change notification settings - Fork 65
Configuration
Milady's configuration lives in ~/.milady/milady.json. The file is JSON5 (comments and trailing commas are allowed). It is written with mode 0600 (owner read/write only), since it may contain API keys in the env section. A second optional file, ~/.milady/.env, can hold secrets using standard dotenv syntax. Values from .env are merged into the process environment at startup.
The config path is resolved by src/config/paths.ts. By default it is ~/.milady/milady.json. You can read or set individual keys without editing the file by hand:
milady config get agent.name
milady config set agent.name "mila"
Or run the interactive wizard:
milady configure
The MiladyConfig type (defined in src/config/types.milady.ts) is the authoritative schema. The most commonly used top-level keys are:
| Key | Type | Purpose |
|---|---|---|
agent |
object | Agent name, model selection (see Model Providers) |
env |
object | Inline env vars applied at startup (API keys, etc.) |
connectors |
object | Messaging connector config (Telegram, Discord, etc.) |
plugins |
object | Plugin allowlist, denylist, extra load paths |
models |
object | Model provider definitions, small/large model selection |
gateway |
object | Gateway port and bind address overrides |
logging |
object | Log level, file output, console style |
database |
object | Database provider (pglite or postgres) |
memory |
object | Memory backend selection |
browser |
object | Browser automation settings |
skills |
object | Skill loading, allowlist/denylist, extra dirs |
cloud |
object | ElizaCloud integration (disabled by default) |
ui |
object | Dashboard theme and assistant display settings |
update |
object | Auto-update channel and check interval |
mcp |
object | MCP server definitions |
{
"agent": {
"name": "mila",
"model": "anthropic/claude-opus-4-5"
},
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}The model field should be a provider-prefixed model ID as returned by milady models.
| Service | Default port | Environment variable override |
|---|---|---|
| API + WebSocket | 31337 | MILADY_API_PORT |
| Gateway (API + WebSocket) | 18789 | MILADY_GATEWAY_PORT |
| Dashboard (Web UI) | 2138 | MILADY_PORT |
| Home Dashboard | 2142 | MILADY_HOME_PORT |
MILADY_GATEWAY_PORT=19000 MILADY_PORT=3000 milady start
These can also be set in the gateway config block:
{
"gateway": {
"port": 19000
}
}By default the Gateway binds to 127.0.0.1 (loopback only). If you expose it to a network interface (e.g. in a container or cloud deployment), set an API token to prevent unauthorized access:
echo "MILADY_API_TOKEN=$(openssl rand -hex 32)" >> ~/.milady/.env
Or set MILADY_API_BIND=0.0.0.0 to expose, and MILADY_API_TOKEN to secure.
Without a token on a non-loopback bind, anyone who can reach the server has full access to the dashboard, agent, and all API endpoints.
For remote backend deployments, also set MILADY_ALLOWED_ORIGINS to restrict which origins the API accepts:
export MILADY_API_BIND=0.0.0.0
export MILADY_API_TOKEN="$(openssl rand -hex 32)"
export MILADY_ALLOWED_ORIGINS="https://app.milady.ai,https://milady.ai"
milady start
{
"logging": {
"level": "error",
"consoleStyle": "pretty",
"redactSensitive": "tools"
}
}Valid log levels (from LoggingConfig): silent, fatal, error, warn, info, debug, trace. The --verbose flag at startup sets level to info. The --debug flag sets it to debug. Default is error.
Milady uses PGLite (an embedded WebAssembly Postgres) by default. No external database is required.
{
"database": {
"provider": "pglite",
"pglite": {
"dataDir": "~/.milady/workspace/.eliza/.elizadb"
}
}
}To use a remote PostgreSQL instance instead:
{
"database": {
"provider": "postgres",
"postgres": {
"connectionString": "postgresql://user:pass@host:5432/dbname"
}
}
}Database migrations are applied automatically by @elizaos/plugin-sql. There are no manual migration files.
Skills are stored in ~/.milady/workspace/skills/. An additional skills config file at ~/.eliza/skills.json is auto-created on first run and allows you to add extra skill directories without editing the main config:
{
"extraDirs": ["/path/to/my-custom-skills"]
}To disable specific bundled skills:
{
"skills": {
"denyBundled": ["skill-name-here"]
}
}The config supports a $include directive to split configuration across multiple files:
{
"$include": "./secrets.json"
}$include directives are stripped before the config is written back to disk (defense-in-depth against config-include injection).
- File is written with mode 0600 (owner read/write only)
-
$includedirectives are stripped on every write - The API server validates and blocks
$includekeys on all config-write endpoints - Secrets should be placed in
~/.milady/.envrather than directly inmilady.jsonwhere possible