selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Telegram-Archive logo

Self-host Telegram-Archive

v9.5.0

Self-hosted Telegram backup with incremental sync

ReleaseOpen SourceGPL-3.0
Updated7 minutes ago
LanguagePython
Setup difficultyModerate
ThemeDark mode
Stars
233
Port
8000 (Web viewer HTTP)
Docker
drumsergio/telegram-archive
Install with Docker Compose
Group chat in the viewer with pinned message, photo album, replies and reactionsSame group chat on a phone screenDeleted message kept in archive with text and deleted markEdit history of a message edited twice, each version with its timeGroup chat in the Telegram Night (dark) theme

What is Telegram-Archive?

Should you self-host Telegram-Archive?

Telegram-Archive scores 51/100 on selfhost.directory (how scoring works) and ranks #31 of 46 in Backup. It has 233 GitHub stars.

It shipped 27 stable releases in the past year. The latest, v9.5.0, came out on 28 October 2026. New versions land roughly every 2 days.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is GPL-3.0-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is Restic (82/100, 36 862 stars). It scores higher overall, so compare the two before you pick. See Telegram-Archive vs Restic side by side.

Features

  • Browser notifications
  • Edit and deletion history
  • Event webhook
  • Incremental Telegram backup
  • Media deduplication
  • Multiple Accounts
  • Read-only hardened containers
  • Reverse Proxy Authentication
  • Telegram Desktop import
  • Telegram-like web viewer
  • Viewer accounts and share links
  • Voice transcriptionRequires external transcription server
  • What Changed feed

Telegram-Archive README

How to install Telegram-Archive

Install Telegram-Archive with Docker Compose

Docker Compose
Environment variables
TELEGRAM_API_ID, TELEGRAM_API_HASH, TELEGRAM_PHONE, VIEWER_USERNAME, VIEWER_PASSWORD, VIEWER_TIMEZONE, plus many optional settings

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

Requires Docker Compose and Telegram API credentials from my.telegram.org/apps

How to configure Telegram-Archive

  • ALLOW_ANONYMOUS_VIEWERfalseAllow anonymous read-only access when no password or proxy login configured.

    Allow anonymous read-only access when no password or proxy login configured.

    values: true, false

  • AUTH_PROXY_HEADERRequest header that carries the user name from a trusted reverse proxy.

    Request header that carries the user name from a trusted reverse proxy.

  • DATABASE_URLFull database URL. Beats every other database setting.

    Full database URL. Beats every other database setting.

    values: sqlite:///, sqlite+aiosqlite:///, postgresql://, postgresql+asyncpg://, postgres://

  • DB_PATH$BACKUP_PATH/telegram_backup.dbSQLite file path.

    SQLite file path.

  • DB_TYPEsqlitesqlite, postgresql or postgres. Used only when DATABASE_URL is empty.

    sqlite, postgresql or postgres. Used only when DATABASE_URL is empty.

    values: sqlite, postgresql, postgres

  • DOWNLOAD_MEDIAtrueWhether to download media files.

    Whether to download media files.

    values: true, false

  • ENABLE_LISTENERtrueEnable real-time listener for new messages, edits and reactions.

    Enable real-time listener for new messages, edits and reactions.

    values: true, false

  • EVENT_WEBHOOK_ENABLEDfalseTurns the event webhook on for edits and deletions.

    Turns the event webhook on for edits and deletions.

    values: true, false

  • EVENT_WEBHOOK_URLTarget URL for the event webhook. Required when enabled.

    Target URL for the event webhook. Required when enabled.

  • MAX_MEDIA_SIZE_MB100Files over this size are skipped. Default 100 MB.

    Files over this size are skipped. Default 100 MB.

  • PUSH_NOTIFICATIONSbasicoff, basic or full. Only full sends Web Push which works with browser closed.

    off, basic or full. Only full sends Web Push which works with browser closed.

    values: off, basic, full

  • SCHEDULEFull pass schedule in cron format. Empty uses default: 0 3 * * * (daily) with listener on, 0 */6 * * * with ENABLE_LISTENER=false.

    Full pass schedule in cron format. Empty uses default: 0 3 * * * (daily) with listener on, 0 */6 * * * with ENABLE_LISTENER=false.

  • TELEGRAM_API_HASHAPI hash from my.telegram.org. Required in single-account mode.

    API hash from my.telegram.org. Required in single-account mode.

  • TELEGRAM_API_IDInteger API id from my.telegram.org. Required in single-account mode.

    Integer API id from my.telegram.org. Required in single-account mode.

  • TELEGRAM_PHONEPhone number in international format with leading +.

    Phone number in international format with leading +.

  • TRANSCRIPTION_ENABLEDtrueEnable voice transcription feature.

    Enable voice transcription feature.

    values: true, false

  • TRANSCRIPTION_URLURL of the transcription server (e.g., akou).

    URL of the transcription server (e.g., akou).

  • VIEWER_DEFAULT_THEMEsystemDefault theme for browsers with no saved choice: system, telegram, night, iosnight, slate, minimal, graphite, amoled, forest, aubergine, day, paper.

    Default theme for browsers with no saved choice: system, telegram, night, iosnight, slate, minimal, graphite, amoled, forest, aubergine, day, paper.

    values: system, telegram, night, iosnight, slate, minimal, graphite, amoled, forest, aubergine, day, paper

  • VIEWER_PASSWORDMaster login password. Spaces at either end are removed.

    Master login password. Spaces at either end are removed.

  • VIEWER_TIMEZONEEurope/MadridTime zone name for displayed times, the date picker and the daily statistics job.

    Time zone name for displayed times, the date picker and the daily statistics job.

  • VIEWER_USERNAMEMaster login name. Password login is on only when this and VIEWER_PASSWORD are both set.

    Master login name. Password login is on only when this and VIEWER_PASSWORD are both set.

Telegram-Archive releases & version history

More in Backup

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…