# Telegram-Archive

> Open-source self-hosted tool that continuously backs up Telegram chats, media, edits, and deletions to your own database with a Telegram-like web interface.

- **Category:** Backup
- **Licence:** GPL-3.0
- **Latest version:** v9.5.0
- **Open source:** oss
- **Languages:** Python, HTML
- **Platforms:** Docker Compose, pip
- **Tags:** PostgreSQL, SQLite, Media, Backup, Telegram, Homelab, Docker, Self Hosted, Archive, Incremental backup, Web viewer, Digital preservation, Voice transcription, Chat history, Datahoarder, Telegram Backup, Telethon, Chat Export, Telegram Archive, Telegram Downloader, Telegram Export, Telegram Viewer, Chat Archive

## Description

This program saves your Telegram account data to a machine you own. It operates as two Docker containers — one for the backup process and one for the web interface — or can be set up through pip. The backup component connects to Telegram using your API keys, runs a live listener for new messages plus a daily scheduled sweep, and writes everything to SQLite by default or PostgreSQL if you prefer. It retains every message with its formatting, replies, forwards, reactions, pinned items, and polls. Each edit keeps its prior text, and each removed message stays in the archive marked as deleted. Media such as images, video clips, audio notes, stickers, files, and link previews are stored once and shared across conversations. The web interface on port 8000 mimics Telegram with conversations, categories, discussion threads, search, shared files, a feed showing what changed, and earlier profile pictures. It handles multiple accounts in one archive, can import Telegram Desktop exports, offers optional voice transcription through an external server, and provides an event webhook for edits and deletions. Access control has a master login, extra viewer accounts with per-chat permissions, and share links for single conversations. Twelve visual themes are included, one of which matches your system light or dark preference. The interface works on phone browsers. Container images support amd64 and arm64, run as non-root user 1000 with all capabilities dropped.

## Links

- [Homepage](https://github.com/GeiserX/Telegram-Archive)
- [Website](https://geiserx.github.io/Telegram-Archive/)
- [Docker](drumsergio/telegram-archive)
- [GitHub Repository](https://github.com/GeiserX/Telegram-Archive)
- [Docker Hub (backup)](https://hub.docker.com/r/drumsergio/telegram-archive)
- [Docker Hub (viewer)](https://hub.docker.com/r/drumsergio/telegram-archive-viewer)
- [PyPI Package](https://pypi.org/project/telegram-archive/)
- [Changelog](https://github.com/GeiserX/Telegram-Archive/blob/main/docs/CHANGELOG.md)
- [Security Policy](https://github.com/GeiserX/Telegram-Archive/blob/main/SECURITY.md)

---
Source: https://selfhost.directory/project/telegram-archive