Configuration
Configuration overview
Config files, environment variables, and CLI flags.
Precedence
built-in defaults < config file < TELDRIVE_* environment < explicit CLI flagsConfig files
Without --config, Teldrive checks:
~/.teldrive/config.toml
~/.teldrive/config.yaml
~/.teldrive/config.yml
./config.toml
./config.yaml
./config.ymlExplicit path:
teldrive run --config /etc/teldrive/config.tomlSupported formats: TOML, YAML, YML.
Name mapping
telegram.upload-threads
TELDRIVE_TELEGRAM_UPLOAD_THREADS
--telegram-upload-threadsEnvironment 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_KEYsecurity.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.tomlCompose:
docker compose run --rm teldrive check