AviatoAviato

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):

  1. Built in defaults, suitable for a typical Docker install.
  2. config.yml in the data directory, if present.
  3. 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.

EnvironmentDefault
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: 8

Anything 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.

OptionEnv varDefaultDescription
hostAVIATO_SERVER_HOST0.0.0.0Address the server binds to. Use 127.0.0.1 to restrict to the local machine.
portAVIATO_SERVER_PORT8080TCP port the server listens on.
corsOriginsAVIATO_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.

OptionEnv varDefaultDescription
staticDirAVIATO_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.

OptionEnv varDefaultDescription
pathAVIATO_DATA_PATH/dataRoot data directory. Used as the base for the other paths in this section.
databaseAVIATO_DATABASE_URL, AVIATO_DATA_DATABASE<path>/aviato.dbSQLite database file, or a Postgres connection string when running with Postgres.
pluginsAVIATO_DATA_PLUGINS<path>/pluginsWhere installed plugin bundles live. Aviato writes plugin code and per plugin state here.
assetsAVIATO_DATA_ASSETS<path>/assetsCached posters, thumbnails, and other downloaded media artwork.
logsAVIATO_DATA_LOGS<path>/logsServer and plugin log files.

Builtin plugins

OptionEnv varDefaultDescription
builtinPluginsAVIATO_BUILTIN_PLUGINS/app/pluginsDirectory 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 varDescription
AVIATO_VERSIONSemver 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.

OptionEnv varDefaultDescription
maxRestartsAVIATO_PLUGINS_MAX_RESTARTS3How many times Aviato will restart a crashing plugin before giving up and marking it failed.
healthCheckIntervalAVIATO_PLUGINS_HEALTH_CHECK_INTERVAL30000Milliseconds between plugin health pings.
startupTimeoutAVIATO_PLUGINS_STARTUP_TIMEOUT10000Milliseconds a plugin has to respond to its initial handshake before being killed.
shutdownTimeoutAVIATO_PLUGINS_SHUTDOWN_TIMEOUT5000Milliseconds a plugin has to exit cleanly on shutdown before being force killed.
eventRetentionDaysAVIATO_PLUGINS_EVENT_RETENTION_DAYS30How long plugin event rows are kept in the database. Older rows are pruned by the cleanup task.
maxEventsAVIATO_PLUGINS_MAX_EVENTS1000Hard cap on plugin event rows. Once exceeded the oldest rows are pruned regardless of age.
eventCleanupIntervalAVIATO_PLUGINS_EVENT_CLEANUP_INTERVAL86400000Milliseconds 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 varDefaultDescription
AVIATO_PLUGIN_TMP_DIR<os.tmpdir()>/aviato-pluginsOverride the root directory plugins use for derivative scratch files.

Logging

OptionEnv varDefaultDescription
levelAVIATO_LOGGING_LEVELinfoOne of debug, info, warn, error. Anything below the chosen level is dropped.
formatAVIATO_LOGGING_FORMATjsonjson for structured logs (good for log aggregators), pretty for human readable color output during local development.
maxFiles(file only)10Number 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.

OptionEnv varDefaultDescription
concurrencyAVIATO_JOBS_CONCURRENCY2Maximum number of jobs that can run at the same time.
scanIntervalAVIATO_JOBS_SCAN_INTERVAL3600000Milliseconds between automatic library scans. Default is one hour.
scanTimeoutAVIATO_JOBS_SCAN_TIMEOUT3600000Maximum runtime for a single scan job in milliseconds. After this, the job is aborted.
indexBatchSizeAVIATO_JOBS_INDEX_BATCH_SIZE20How many items the indexer processes per batch.
indexMaxRetriesAVIATO_JOBS_INDEX_MAX_RETRIES5How many times an item is retried after a transient failure before being marked failed.
indexBackoffBaseMsAVIATO_JOBS_INDEX_BACKOFF_BASE_MS5000Starting backoff between retries, in milliseconds. Each retry doubles up to the max.
indexBackoffMaxMsAVIATO_JOBS_INDEX_BACKOFF_MAX_MS300000Cap on retry backoff. Default is five minutes.
indexConsecutiveFailureThresholdAVIATO_JOBS_INDEX_CONSECUTIVE_FAILURE_THRESHOLD3Number 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.

OptionEnv varDefaultDescription
ffmpegPathAVIATO_TRANSCODING_FFMPEG_PATHffmpegPath to the ffmpeg binary. Use a full path if it is not on $PATH.
ffprobePathAVIATO_TRANSCODING_FFPROBE_PATHffprobePath to the ffprobe binary.
hwAccelAVIATO_TRANSCODING_HW_ACCELnoneHardware acceleration backend. One of none, vaapi, nvenc, qsv. Pick the one your host supports.
maxSessionsAVIATO_TRANSCODING_MAX_SESSIONS4Maximum number of concurrent transcoding sessions. New sessions wait if this limit is reached.
tempDirAVIATO_TRANSCODING_TEMP_DIR/data/transcodeWhere transcode segments and intermediate files are written. Should live on fast storage.
defaultVideoBitrate(file only)4000000Target video bitrate in bits per second when the client does not request a specific quality. Default is 4 Mbps.
defaultAudioBitrate(file only)192000Target audio bitrate in bits per second. Default is 192 kbps.
segmentDuration(file only)6HLS segment length in seconds. Smaller numbers reduce playback latency but increase request volume.
sessionTimeout(file only)300000Milliseconds an idle transcode session is kept alive before being torn down. Default is five minutes.
cleanupInterval(file only)300000Milliseconds between runs of the transcode session cleanup task.

Relay

OptionEnv varDefaultDescription
enabledAVIATO_RELAY_ENABLEDtrueWhether 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.

OptionEnv varDefaultDescription
deliveryRetentionDaysAVIATO_WEBHOOKS_DELIVERY_RETENTION_DAYS30Days of webhook delivery log rows to keep. Older rows are pruned by the cleanup task.
deliveryCleanupIntervalAVIATO_WEBHOOKS_DELIVERY_CLEANUP_INTERVAL86400000Milliseconds 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

On this page