Telegram Media Downloader
Latest v3.11.2

Save Telegram media to your own server

Photos, videos and files from every channel, group and chat your account can read, private ones included. One Go binary or Docker image, with a web dashboard.

  • MIT, free
  • Docker amd64 / arm64
  • Linux, Windows, macOS
  • English, ไทย, Indonesia, 简体中文
The library: every downloaded photo and video grouped by date, with the chat list on the left
Features

Archive Telegram without the babysitting

Sign in with your own account and download Telegram channel and group media, including private chats you belong to.

Auto-download

A self-restarting realtime monitor for channels, groups, forum topics and DMs, history backfill that resumes after restarts, t.me links, Stories and self-destructing media. Optional folders per forum topic.

Auto-forward

Send new files to several chats or forum topics through a queue that survives restarts and waits out FloodWaits. Direct forwarding without downloading, protected copies and custom captions.

Web dashboard and PWA

Gallery, live queue with speed and ETA, a full-screen viewer and signed share links. A searchable offline archive of chat messages. Installable on a phone, in English, Thai, Indonesian and Simplified Chinese.

Dedup

Duplicates are skipped before downloading by Telegram media identity and confirmed by SHA-256. A library scan bulk-deletes the rest, and a collection downloaded by another app can be imported without downloading it again.

Secure by default

Nothing opens until a password is set. scrypt hashes, server-side session revocation, a read-only guest role and encrypted Telegram sessions.

Cluster mode

Pair several instances, sync their catalogs, open or play each other’s files from one dashboard and sweep duplicates across peers.

Backups

Mirror or snapshot to a local disk, S3-compatible storage, SFTP, FTP/FTPS, Google Drive or Dropbox, with encrypted archives and an offline restore command.

Optional AI

Video seekbar previews built in. Face recognition and NSFW review through the optional tgdl-faces and tgdl-nsfw containers.

One Go binary

tgdl-server runs the dashboard, Telegram accounts, downloads and backups, with no Node.js or runtime to install. One-click or scheduled updates save a verified database snapshot first.

Quick start

Up in a few minutes

You need Docker with Compose and an apiId / apiHash from my.telegram.org.

bash
mkdir telegram-media-downloader && cd telegram-media-downloader
mkdir -p data
curl -fsSLO https://raw.githubusercontent.com/botnick/telegram-media-downloader/main/docker-compose.yml
docker compose up -d
# first password, from a private one-line file:
docker compose exec -T -u node telegram-downloader \
  tgdl-server setup --password-stdin < password.txt

Updating: use Settings › Maintenance › Install update, set WATCHTOWER_HTTP_API_PERIODIC_POLLS=true in .env for daily automatic updates, or run docker compose pull && docker compose up -d.

Coming from 2.x? 3.x upgrades in place: same image, port, data folder and logins. Upgrade notes.

No Docker? Download a release binary for Linux, Windows or macOS and run TGDL_DATA_DIR=./data ./tgdl-server, or on Windows install it with Scoop. See the install guide.

  1. Sign inOpen http://localhost:3000 with the password you set.
  2. Add your API credentialsSettings › Telegram API.
  3. Add an accountPhone number and login code, or scan a QR code from the Telegram app; then 2FA if set.
  4. Start the monitorOr paste a t.me/ link to grab one message.
Dashboard

One dashboard, desktop and phone

Chats: pick which channels and groups to monitor
Chats — monitor and backfill
Download queue with live progress, speed and ETA
Queue — progress, speed, ETA
Tools: library health, safety and AI, backup and sync
Tools — dedup, NSFW, faces, backups
Library on a phone Media viewer on a phone Download queue on a phone Chats on a phone, light theme

Screenshots use generated demo images and fictional chat names.

Architecture

One Go server, nothing else to run

Diagram: the browser talks to tgdl-server over HTTP and WebSocket. tgdl-server connects to Telegram over MTProto, stores state in SQLite, writes media to disk and calls ffmpeg for thumbnails. Browserdashboard / PWA tgdl-server (Go)embedded dashboard, API, WebSocketaccounts, durable queue, dedup, backups TelegramMTProto (gotd) SQLite media on disk ffmpeg HTTP + WS

Downloads are written to a temporary file and published atomically, and queued work survives restarts. See the architecture guide and the full feature list.

FAQ

Questions people ask

What is Telegram Media Downloader?

A free, open-source (MIT) app you run on your own computer, server or NAS that downloads photos, videos, files, voice messages and Stories from Telegram channels, groups and chats. It signs in as your own Telegram account, so it also works for private channels you are a member of. It runs as one Go program (tgdl-server) or a Docker image and is managed from a web dashboard.

Is it free?

Yes. It is open source under the MIT license, with no paid tier, account or cloud service. You only need a free apiId and apiHash from my.telegram.org.

How do I download all media from a Telegram channel?

Add your Telegram account (Settings > Accounts), open Chats, pick the channel and start a backfill. Choose how many messages to read, or 0 for all of them. The queue shows every file with progress, speed and ETA. To keep the archive current, turn on the realtime monitor for that chat.

Can it download from private channels and groups?

Yes, if the Telegram account you sign in with is a member. The tool acts as that account over the Telegram user API (MTProto), so it reads what you can read in the Telegram app.

How is this different from a Telegram bot?

Bots use the Bot API, which limits file sizes and only sees chats the bot was added to. This tool logs in as your user account through MTProto, so it has no bot-style file-size cap and sees your own chats.

Do I need Node.js or Go installed?

No. Since 3.0 the whole app is one Go binary, tgdl-server, with the dashboard built in. Run the Docker image or download a release archive for Linux, Windows or macOS. Go is only needed to build from source.

Is my Telegram session safe?

Sessions are encrypted at rest in data/sessions/, with the key in data/secret.key. Nothing is sent to a service run by this project. The dashboard fails closed, so without a password nobody gets in. Put it behind HTTPS if you expose it, and back up secret.key, because losing it means signing in to Telegram again. See the security policy.

Will my account get banned?

It uses the normal user API like a Telegram app, but heavy automated downloading always carries some risk. Failed downloads retry with growing delays and Telegram FloodWait limits are respected automatically; keep parallel downloads and the bandwidth limit moderate and avoid running many accounts from one IP. No tool can promise zero risk.

Does it run on a Raspberry Pi or a Synology NAS?

Yes. The Docker image is built for amd64 and arm64, release binaries also cover 32-bit ARM (linux-arm), and the repo ships docker-compose.synology.yml. See the deploy guide.

Can I download Stories or a single t.me link?

Yes. Look up a user’s Stories by username and pick what to save, or paste t.me/... message links into the dashboard. Channel, group, forum-topic and private links are supported.

How do I upgrade from 2.x to 3.x?

Nothing has to change. Press Install update in Settings > Maintenance, or run docker compose pull && docker compose up -d. The image, port, data folder, password and Telegram logins carry over. See Upgrading from 2.x.

Where are the files stored, and can I back them up?

Downloads live under data/downloads/<chat>/, or TGDL_DOWNLOADS_DIR on another disk. Backups go to a local folder, S3-compatible storage, SFTP, FTP/FTPS, Google Drive or Dropbox, with optional encryption and an offline restore command. See the backup guide.

Can it save the text of messages, not only media?

Yes. Turn on Save all messages for a chat and it keeps every message’s text, sender, replies, forwards and topic, marks messages deleted on Telegram instead of losing them, and shows the chat as a conversation you can read offline, search and export to HTML or JSON. See Features.

I already downloaded a channel with another tool. Do I have to download it again?

No. Import the folder from the chat’s settings. Files are matched to their Telegram messages by message ID, name and size, you review the uncertain ones, and the matched files are never downloaded again.