Skip to main content

Telegram Archive

Release Tests License Docker Pulls Coverage

Telegram Archive backs up one or more Telegram accounts to a machine you host. It runs in Docker or from pip, and saves messages, media, edits and deletions to SQLite or PostgreSQL on your own disk. A web viewer, which never talks to Telegram, lets you read and search what it saved.

Telegram Desktop's own export is a one-off file with no earlier versions and no deleted messages; this runs on a schedule, keeps earlier versions and deleted messages, and can import that export too.

A group chat in the viewer, with a pinned message, a four-photo album, replies and reactions

Features

  • Saves new messages, their media, edits and reactions the moment they happen, and runs a daily full pass that fetches only what is new to fill in anything the live connection missed.
  • Keeps every edit with its earlier text, and keeps every deleted message, marked as deleted, with its text and media.
  • Saves photos, videos, voice notes, stickers, documents and link previews once each, however many chats share them, and skips files over a size you set.
  • Reads like Telegram: chats, forum topics, folders, archived chats, reactions, pinned messages, polls and shared media, with search across every chat.
  • Shows what Telegram no longer does: a What changed feed of deletions, edits and new transcripts, and the earlier profile photos of every chat.
  • Backs up several accounts into one archive, and imports Telegram Desktop exports.
  • Turns voice messages into searchable text through a transcription server you run or rent.
  • Gives other people a login to chosen chats or a share link that opens one chat, and sends browser notifications for new messages.
  • Twelve themes, including one that follows the system light or dark setting, on a viewer that works on a phone.
  • Stays yours: SQLite or PostgreSQL on your disk, read-only containers with every capability dropped, for amd64 and arm64, or a plain pip install.

Quick start

You need Docker Compose, and an api_id and api_hash for your account from my.telegram.org/apps.

curl -fsSLO https://raw.githubusercontent.com/GeiserX/Telegram-Archive/main/docker-compose.yml
cat > .env <<'EOF'
TELEGRAM_API_ID=12345678
TELEGRAM_API_HASH=0123456789abcdef0123456789abcdef
TELEGRAM_PHONE=+15551234567
VIEWER_USERNAME=admin
VIEWER_PASSWORD=choose-a-long-password
VIEWER_TIMEZONE=Europe/London
EOF
mkdir -p data && sudo chown -R 1000:1000 data
docker compose run --rm telegram-backup python -m telegram_archive auth
docker compose up -d   # drumsergio/telegram-archive:9.2.0 and drumsergio/telegram-archive-viewer:9.2.0

auth asks for the code Telegram sends you, and for your two-step password if you have one. Then open http://127.0.0.1:8000, sign in with the viewer username and password, and watch the first backup fill the chat list. Run with Docker has every step, with the Podman and Colima notes, and Install from PyPI runs the same thing from pip install telegram-archive.

Documentation

The full documentation is at geiserx.github.io/Telegram-Archive.

Release notes are in the changelog. Open an issue for bugs and questions; the troubleshooting page says what to include. Report security problems through the security policy, never in a public issue.

License

GPL-3.0-or-later. Built on Telethon.

Metadata

Release files for telegram-archive 9.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for telegram-archive 9.2.0
File Size Uploaded
telegram_archive-9.2.0.tar.gz 1.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for telegram-archive 9.2.0
File Interpreter ABI Platform
telegram_archive-9.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.7 MB

Release files / telegram_archive-9.2.0.tar.gz

Download URL telegram_archive-9.2.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
873df191700a15cf6a034531294cfb11fe447b62bd40fdf368eed711048b2e52
BLAKE2b-256 checksum
How to use checksums
10e52b849388e1abd037c7e0fde1d61560c9d06305282dc51166bb2d9936876e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / telegram_archive-9.2.0-py3-none-any.whl

Download URL telegram_archive-9.2.0-py3-none-any.whl
Size 1.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a5d17ec2dfdddba5ecee3dc4e848bc863aafd77d86c77d78e08eaad414e223a6
BLAKE2b-256 checksum
How to use checksums
e3c67921315e834e5f32a0f64fe9ea81f78006eba62e5c63f16aebd8f674a3ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release history Release notifications | RSS feed

9.3.3

2 release files

9.3.2

2 release files

9.3.1

2 release files

9.3.0

2 release files

9.2.1

2 release files

This release

9.2.0 This release

2 release files

9.1.0

2 release files

9.0.0

2 release files

8.18.0

2 release files

8.17.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page