Configuration overview
Teldrive
Configuration

Configuration overview

Config files, environment variables, and CLI flags.

Precedence

built-in defaults < config file < TELDRIVE_* environment < explicit CLI flags

Config files

Without --config, Teldrive checks:

~/.teldrive/config.toml
~/.teldrive/config.yaml
~/.teldrive/config.yml
./config.toml
./config.yaml
./config.yml

Explicit path:

teldrive run --config /etc/teldrive/config.toml

Supported formats: TOML, YAML, YML.

Name mapping

telegram.upload-threads
TELDRIVE_TELEGRAM_UPLOAD_THREADS
--telegram-upload-threads

Environment names use TELDRIVE_ + uppercase/underscores. CLI flags flatten nested keys with hyphens.

Required values

database:
  url: postgres://...

security:
  signing-key: YOUR_SIGNING_KEY
  data-key: YOUR_DATA_KEY

security.data-key must decode to exactly 32 bytes. The Quick Start generator creates compatible values.

For a PgDog endpoint, review the pooling, authentication, and migration considerations before setting database.url.

Validate

teldrive check --config /etc/teldrive/config.toml

Compose:

docker compose run --rm teldrive check

Guides