Configuration
Every configuration option Aviato exposes, where to set it, and what it affects. Read this if you are deploying or tuning a server.
Aviato reads its configuration from three sources, applied in this order (later values win):
- Built in defaults, suitable for a typical Docker install.
config.ymlin the data directory, if present.- Environment variables prefixed with
AVIATO_.
This means you can ship a base config.yml and override individual values per environment with env vars, without rewriting the file.
The data directory
Most settings revolve around the data directory, where Aviato stores its database, downloaded assets, plugin installs, and log files.
| Environment | Default |
|---|---|
| Docker | /data |
| Local development | <repo>/data |
| Installable (macOS) | ~/Library/Application Support/Aviato |
| Installable (Windows) | %LOCALAPPDATA%\Aviato |
| Installable (Linux) | $XDG_DATA_HOME/aviato (defaults to ~/.local/share/aviato) |
You can point Aviato anywhere with AVIATO_DATA_PATH=/srv/aviato. When that variable is set (or /data does not exist outside the monorepo), Aviato uses your chosen path as the base for database, plugins, assets, and logs. You can still override each subpath individually if you want them on different volumes.
The config file
If a file called config.yml exists at the root of the data directory, Aviato loads it on startup. The structure mirrors the sections below. A minimal example:
server:
port: 9090
corsOrigins:
- https://aviato.example.com
logging:
level: debug
format: pretty
transcoding:
hwAccel: vaapi
maxSessions: 8Anything you leave out keeps its default value. There is no schema validation beyond YAML parsing, so typos silently fall back to defaults.
Environment variables
Every option that is commonly tuned has an AVIATO_* env var. Booleans accept true / false or 1 / 0. Comma separated lists are split on commas with whitespace trimmed.
If you set both a config file value and an env var, the env var wins.
Server
Where the HTTP server binds and which origins it accepts.
| Option | Env var | Default | Description |
|---|---|---|---|
host | AVIATO_SERVER_HOST | 0.0.0.0 | Address the server binds to. Use 127.0.0.1 to restrict to the local machine. |
port | AVIATO_SERVER_PORT | 8080 | TCP port the server listens on. |
corsOrigins | AVIATO_CORS_ORIGINS | [] | Comma separated list of origins allowed to call the API from a browser. Empty means same origin only. |
Web
Controls the bundled web UI.
| Option | Env var | Default | Description |
|---|---|---|---|
staticDir | AVIATO_WEB_STATIC_DIR | "" | Path to a prebuilt web frontend (index.html plus assets). Leave empty to disable static serving and run the UI separately. |
Data
Where Aviato keeps its persistent state. All paths default to subdirectories of data.path.
| Option | Env var | Default | Description |
|---|---|---|---|
path | AVIATO_DATA_PATH | /data | Root data directory. Used as the base for the other paths in this section. |
database | AVIATO_DATABASE_URL, AVIATO_DATA_DATABASE | <path>/aviato.db | SQLite database file, or a Postgres connection string when running with Postgres. |
plugins | AVIATO_DATA_PLUGINS | <path>/plugins | Where installed plugin bundles live. Aviato writes plugin code and per plugin state here. |
assets | AVIATO_DATA_ASSETS | <path>/assets | Cached posters, thumbnails, and other downloaded media artwork. |
logs | AVIATO_DATA_LOGS | <path>/logs | Server and plugin log files. |
Builtin plugins
| Option | Env var | Default | Description |
|---|---|---|---|
builtinPlugins | AVIATO_BUILTIN_PLUGINS | /app/plugins | Directory containing plugins shipped with the server image. Override only if you have a custom build. |
Build metadata
These values are baked into each build by CI and reported by /api/health and /api/info. You should not normally override them.
| Env var | Description |
|---|---|
AVIATO_VERSION | Semver string for the running build. Set by CI from the git tag, branch, and short SHA. Override only when debugging a custom build. |
Plugins
Lifecycle and bookkeeping for the plugin runtime.
| Option | Env var | Default | Description |
|---|---|---|---|
maxRestarts | AVIATO_PLUGINS_MAX_RESTARTS | 3 | How many times Aviato will restart a crashing plugin before giving up and marking it failed. |
healthCheckInterval | AVIATO_PLUGINS_HEALTH_CHECK_INTERVAL | 30000 | Milliseconds between plugin health pings. |
startupTimeout | AVIATO_PLUGINS_STARTUP_TIMEOUT | 10000 | Milliseconds a plugin has to respond to its initial handshake before being killed. |
shutdownTimeout | AVIATO_PLUGINS_SHUTDOWN_TIMEOUT | 5000 | Milliseconds a plugin has to exit cleanly on shutdown before being force killed. |
eventRetentionDays | AVIATO_PLUGINS_EVENT_RETENTION_DAYS | 30 | How long plugin event rows are kept in the database. Older rows are pruned by the cleanup task. |
maxEvents | AVIATO_PLUGINS_MAX_EVENTS | 1000 | Hard cap on plugin event rows. Once exceeded the oldest rows are pruned regardless of age. |
eventCleanupInterval | AVIATO_PLUGINS_EVENT_CLEANUP_INTERVAL | 86400000 | Milliseconds between runs of the event cleanup task. Default is once per day. |
The plugin scratch directory (cover art, thumbnails, extracted streams)
defaults to <os.tmpdir()>/aviato-plugins/<pluginId> and is swept hourly
for entries older than 24 hours. To redirect it (test harnesses, faster
storage), set the env var below; the same value is propagated to every
plugin process so cleanup stays addressable from one root.
| Env var | Default | Description |
|---|---|---|
AVIATO_PLUGIN_TMP_DIR | <os.tmpdir()>/aviato-plugins | Override the root directory plugins use for derivative scratch files. |
Logging
| Option | Env var | Default | Description |
|---|---|---|---|
level | AVIATO_LOGGING_LEVEL | info | One of debug, info, warn, error. Anything below the chosen level is dropped. |
format | AVIATO_LOGGING_FORMAT | json | json for structured logs (good for log aggregators), pretty for human readable color output during local development. |
maxFiles | (file only) | 10 | Number of rotated log files to keep on disk before old ones are deleted. |
Jobs
The job runner powers library scans and metadata indexing. These knobs trade off throughput against load on your system and on third party APIs.
| Option | Env var | Default | Description |
|---|---|---|---|
concurrency | AVIATO_JOBS_CONCURRENCY | 2 | Maximum number of jobs that can run at the same time. |
scanInterval | AVIATO_JOBS_SCAN_INTERVAL | 3600000 | Milliseconds between automatic library scans. Default is one hour. |
scanTimeout | AVIATO_JOBS_SCAN_TIMEOUT | 3600000 | Maximum runtime for a single scan job in milliseconds. After this, the job is aborted. |
indexBatchSize | AVIATO_JOBS_INDEX_BATCH_SIZE | 20 | How many items the indexer processes per batch. |
indexMaxRetries | AVIATO_JOBS_INDEX_MAX_RETRIES | 5 | How many times an item is retried after a transient failure before being marked failed. |
indexBackoffBaseMs | AVIATO_JOBS_INDEX_BACKOFF_BASE_MS | 5000 | Starting backoff between retries, in milliseconds. Each retry doubles up to the max. |
indexBackoffMaxMs | AVIATO_JOBS_INDEX_BACKOFF_MAX_MS | 300000 | Cap on retry backoff. Default is five minutes. |
indexConsecutiveFailureThreshold | AVIATO_JOBS_INDEX_CONSECUTIVE_FAILURE_THRESHOLD | 3 | Number of consecutive failures from a single indexer before Aviato pauses it and surfaces an alert. |
Transcoding
Settings for the on the fly video transcoder. The defaultVideoBitrate, defaultAudioBitrate, segmentDuration, sessionTimeout, and cleanupInterval options are configurable via config.yml only.
| Option | Env var | Default | Description |
|---|---|---|---|
ffmpegPath | AVIATO_TRANSCODING_FFMPEG_PATH | ffmpeg | Path to the ffmpeg binary. Use a full path if it is not on $PATH. |
ffprobePath | AVIATO_TRANSCODING_FFPROBE_PATH | ffprobe | Path to the ffprobe binary. |
hwAccel | AVIATO_TRANSCODING_HW_ACCEL | none | Hardware acceleration backend. One of none, vaapi, nvenc, qsv. Pick the one your host supports. |
maxSessions | AVIATO_TRANSCODING_MAX_SESSIONS | 4 | Maximum number of concurrent transcoding sessions. New sessions wait if this limit is reached. |
tempDir | AVIATO_TRANSCODING_TEMP_DIR | /data/transcode | Where transcode segments and intermediate files are written. Should live on fast storage. |
defaultVideoBitrate | (file only) | 4000000 | Target video bitrate in bits per second when the client does not request a specific quality. Default is 4 Mbps. |
defaultAudioBitrate | (file only) | 192000 | Target audio bitrate in bits per second. Default is 192 kbps. |
segmentDuration | (file only) | 6 | HLS segment length in seconds. Smaller numbers reduce playback latency but increase request volume. |
sessionTimeout | (file only) | 300000 | Milliseconds an idle transcode session is kept alive before being torn down. Default is five minutes. |
cleanupInterval | (file only) | 300000 | Milliseconds between runs of the transcode session cleanup task. |
Relay
| Option | Env var | Default | Description |
|---|---|---|---|
enabled | AVIATO_RELAY_ENABLED | true | Whether to enable the streaming relay used by the apps to play media without exposing your storage backend. Set to false to opt out. |
Webhooks
Retention for webhook delivery records. Old delivery rows are pruned in the background.
| Option | Env var | Default | Description |
|---|---|---|---|
deliveryRetentionDays | AVIATO_WEBHOOKS_DELIVERY_RETENTION_DAYS | 30 | Days of webhook delivery log rows to keep. Older rows are pruned by the cleanup task. |
deliveryCleanupInterval | AVIATO_WEBHOOKS_DELIVERY_CLEANUP_INTERVAL | 86400000 | Milliseconds between runs of the webhook delivery cleanup task. Default is once per day. |
Full example
A reasonably complete config.yml for a self hosted setup:
server:
host: 0.0.0.0
port: 8080
corsOrigins:
- https://aviato.example.com
data:
path: /srv/aviato
# database, plugins, assets, logs default to subdirectories of path
logging:
level: info
format: json
maxFiles: 14
jobs:
concurrency: 4
scanInterval: 1800000 # 30 minutes
indexBatchSize: 50
transcoding:
hwAccel: vaapi
maxSessions: 6
defaultVideoBitrate: 6000000
segmentDuration: 4
webhooks:
deliveryRetentionDays: 14
relay:
enabled: true