Configuration Reference
Mydia supports multiple configuration sources with a defined precedence order.
Configuration Sources
1. Environment Variables (Highest Priority)
Environment variables override all other configuration sources. See Environment Variables for complete reference.
2. Database Settings
Settings configured through the Admin UI are stored in the database and persist across restarts.
Access via Admin > Configuration > Settings.
3. YAML Configuration File
Place a config.yml file in the /config directory:
4. Schema Defaults (Lowest Priority)
Built-in defaults are used when no other configuration is specified.
Configuration Precedence
Configuration is loaded in this order (highest to lowest priority):
- Environment Variables - Override everything
- Database Settings - Configured via Admin UI
- YAML File - From
config/config.yml - Schema Defaults - Built-in defaults
Configuration is validated when the application starts, before the rest of the system comes up, so an invalid value is reported at boot rather than at first use.
Most settings take effect as soon as they are saved. Settings that are read once during startup, notably the HTTP port and bind address, are stored immediately but do not move the running listener until the application restarts. The database adapter is fixed at build time and cannot change at runtime at all; see PostgreSQL Support.
For why the layers exist and what the database layer buys you, see Why Configuration Is Layered.