Configuration Guide
Resonix uses a JSON-based configuration file. This guide covers all configuration options.
Configuration File
Resonix looks for configuration in these locations (in order of precedence):
./resonix.json(current directory)~/.resonix/resonix.json(home directory)- Environment variables
Basic Configuration
{
"gateway": {
"mode": "local",
"port": 18789,
"bind": "loopback"
},
"providers": {
"openai": {
"apiKey": "${OPENAI_API_KEY}"
}
}
}
Gateway Settings
| Key | Type | Description |
|---|---|---|
gateway.mode | string | Operation mode: "local" or "cloud" |
gateway.port | number | Port for gateway server (default: 18789) |
gateway.bind | string | Network binding: "loopback" or "lan" |
gateway.auth.token | string | Authentication token for API access |
Environment Variables
Resonix supports configuration via environment variables:
RESONIX_GATEWAY_TOKEN- Gateway authentication tokenRESONIX_STATE_DIR- State directory (default: ~/.resonix)RESONIX_CONFIG_PATH- Custom config file pathOPENAI_API_KEY,ANTHROPIC_API_KEY- Provider API keys
CLI Configuration
Use the CLI to set configuration values:
resonix config set gateway.port 19000
resonix config set gateway.mode cloud
resonix config get gateway
Tip: Use environment variables for secrets in production to avoid committing sensitive data.