Containers
Skip to Content
Teldrive
Installation

Containers

Run Teldrive with Docker or Podman.

Official images:

ghcr.io/tgdrive/teldrive:<tag>

Use Quick start for PostgreSQL + Teldrive Compose.

Minimal container

With PostgreSQL already available:

docker run --rm \
  -p 127.0.0.1:8080:8080 \
  -e TELDRIVE_HTTP_ADDRESS=0.0.0.0:8080 \
  -e TELDRIVE_DATABASE_URL='postgres://teldrive:password@db.example:5432/teldrive?sslmode=require' \
  -e TELDRIVE_SECURITY_SIGNING_KEY='YOUR_SIGNING_KEY' \
  -e TELDRIVE_SECURITY_DATA_KEY='YOUR_DATA_KEY' \
  ghcr.io/tgdrive/teldrive:2

Podman uses the same settings with podman run.

Mount a config file

The official image runs as nonroot, whose home directory is /home/nonroot. Teldrive automatically discovers /home/nonroot/.teldrive/config.toml inside the container.

Create config.toml on the host before starting the container, then mount it read-only. For Compose, add this to the teldrive service:

services:
  teldrive:
    volumes:
      - ./config.toml:/home/nonroot/.teldrive/config.toml:ro

With docker run, add:

--mount type=bind,src="$(pwd)/config.toml",dst=/home/nonroot/.teldrive/config.toml,readonly

The file must be readable by the container’s nonroot user (UID/GID 65532:65532). Keep it protected on the host because it may contain credentials.

No --config flag is needed for this path. TELDRIVE_* environment variables override values in the file, including those in the generated Compose configuration. See Configuration overview for supported formats and precedence.

Pin releases

image: ghcr.io/tgdrive/teldrive:X.Y.Z

Release images have three tags:

  • An exact version, such as :2.0.6, for controlled upgrades and rollbacks.
  • A major version, such as :2, to follow updates within that major version.
  • :latest to follow the newest release, including future major versions.

Use an exact version in production to avoid unexpected upgrades.

Local imports

See Uploads and events for allowed paths and read-only container mounts.

Validate

docker compose run --rm teldrive check
docker compose logs --tail=200 teldrive

See Upgrading.