Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ TELEGRAM_PHONE=+1234567890
# Account 1 keeps the legacy session file (SESSION_NAME, default
# telegram_backup) unless TG_ACCOUNT_1_SESSION_NAME is set, so an upgraded
# deployment never re-logins; accounts 2+ default to telegram_backup_account<N>.
# Each account needs one interactive login: ./init_auth.sh (python -m src auth).
# Each account needs one interactive login: ./init_auth.sh (python -m telegram_archive auth).
# TG_ACCOUNT_1_API_ID=your_api_id_here
# TG_ACCOUNT_1_API_HASH=your_api_hash_here
# TG_ACCOUNT_1_PHONE_NUMBER=+1234567890
Expand Down Expand Up @@ -488,7 +488,7 @@ DB_PATH=/data/backups/telegram_backup.db
#
# VIEWER_CHAT_BACKGROUND=wallpaper.jpg
# volumes:
# - ./wallpaper.jpg:/app/src/web/static/wallpaper.jpg:ro
# - ./wallpaper.jpg:/app/telegram_archive/web/static/wallpaper.jpg:ro
#
# Mount the FILE, not the directory: a directory mounted over the static one
# hides the app's own assets and the viewer comes up blank. The image is served
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Telegram Archive is a self-hosted backup of one or more Telegram accounts. It ru
5. Log in to Telegram:

```bash
docker compose run --rm telegram-backup python -m src auth
docker compose run --rm telegram-backup python -m telegram_archive auth
```

The login code arrives in your Telegram app. If the account uses two-step verification, the command also asks for that password. The password shows on screen as you type, so run this where nobody can see your screen.
Expand All @@ -74,8 +74,8 @@ Telegram Archive is a self-hosted backup of one or more Telegram accounts. It ru
The first backup starts right away. For the schedule and what to check next, see [Your first backup](https://geiserx.github.io/Telegram-Archive/getting-started/first-backup/). The compose file pins both images to this release:

```text
drumsergio/telegram-archive:8.16.1
drumsergio/telegram-archive-viewer:8.16.1
drumsergio/telegram-archive:8.17.0
drumsergio/telegram-archive-viewer:8.17.0
```

## Documentation
Expand Down
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
telegram-backup:
image: drumsergio/telegram-archive:8.16.1
image: drumsergio/telegram-archive:8.17.0
container_name: telegram-backup
restart: unless-stopped
# A stop during a long sweep needs time to finish in-flight writes and
Expand All @@ -12,7 +12,7 @@ services:
options:
max-size: "10m"
max-file: "3"
command: ["python", "-m", "src", "schedule"]
command: ["python", "-m", "telegram_archive", "schedule"]

# Every variable documented in .env.example reaches the container. The
# environment: block below interpolates ${VAR} references for readable
Expand Down Expand Up @@ -212,7 +212,7 @@ services:
# memory: 512M

telegram-viewer:
image: drumsergio/telegram-archive-viewer:8.16.1
image: drumsergio/telegram-archive-viewer:8.17.0
container_name: telegram-viewer
restart: unless-stopped
# A stop during a long sweep needs time to finish in-flight writes and
Expand Down Expand Up @@ -308,7 +308,7 @@ services:
# service runs with a read-only root filesystem, so a bind mount is the
# only way in. Mount the FILE: a directory mounted over the static one
# hides the app's own assets and the viewer comes up blank.
# - ./wallpaper.jpg:/app/src/web/static/wallpaper.jpg:ro
# - ./wallpaper.jpg:/app/telegram_archive/web/static/wallpaper.jpg:ro
networks:
- telegram-network
# Security hardening
Expand Down Expand Up @@ -338,7 +338,7 @@ services:
# Example: Restricted Channel Viewer (optional)
# Use this to share specific channels publicly with authentication
# telegram-channel-viewer:
# image: drumsergio/telegram-archive-viewer:8.16.1
# image: drumsergio/telegram-archive-viewer:8.17.0
# container_name: telegram-channel-viewer
# restart: unless-stopped
# ports:
Expand Down
12 changes: 10 additions & 2 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,28 @@ All notable changes to this project are documented here.

For upgrade instructions, see [Upgrading](#upgrading) at the bottom.

## [Unreleased]
## [8.17.0] - 2026-09-29

Telegram Archive is now a Python package named `telegram-archive`, ready for PyPI. The next release publishes it. Docker deployments need no changes.
Telegram Archive is on PyPI, transcription works with any provider, and the documentation moved to [its own site](https://geiserx.github.io/Telegram-Archive/). Upgrading runs migration 033 automatically. Docker deployments need no changes, and the old `python -m src` name keeps working.

### Added
- **Install with pip.** `pip install telegram-archive` gives the `telegram-archive` command and `python -m telegram_archive`. The templates, static files and every database migration ship inside the package. ([#492](https://github.com/GeiserX/Telegram-Archive/issues/492))
- **`telegram-archive migrate`** runs `alembic upgrade head` to create or upgrade the database schema. It is meant for pip installs and fresh databases. Run it before the first backup and after each upgrade. The Docker image still migrates on start and still detects older schemas.
- **A small Python API.** `from telegram_archive import Config, TelegramBackup, run_backup`, then `asyncio.run(run_backup(Config()))` runs one backup of every configured account. The names load lazily, so the viewer image, which has no telethon, can still import the package.
- **Transcription with any provider.** `TRANSCRIPTION_PROVIDER` picks akou, any OpenAI-compatible endpoint, Deepgram, AssemblyAI or ElevenLabs. The default, `auto`, behaves as before. `TRANSCRIPTION_MODEL` replaces the fixed `whisper-1` model name, and `TRANSCRIPTION_HOTWORDS` now fills the prompt field. ([#489](https://github.com/GeiserX/Telegram-Archive/pull/489))
- **A documentation site** at [geiserx.github.io/Telegram-Archive](https://geiserx.github.io/Telegram-Archive/), written from the code: every setting with its default, every command, the viewer, upgrading and troubleshooting. The README is now a short overview. ([#494](https://github.com/GeiserX/Telegram-Archive/pull/494), [#495](https://github.com/GeiserX/Telegram-Archive/pull/495))
- **PyPI publishing.** Each release tag builds the package, checks that the tag matches the version, and uploads it with PyPI trusted publishing. A new Package check builds and installs the wheel on every pull request.

### Changed
- **The code moved from `src/` to `telegram_archive/`.** Both images keep a small `src` package, so compose files that run `python -m src schedule`, `python -m src auth` or `uvicorn src.web.main:app` keep working and run the same code. The old name prints a one-line notice at start. Switch to `python -m telegram_archive` and `telegram_archive.web.main:app` when convenient. The images' default commands and [`docker-compose.yml`](../docker-compose.yml) use the new name.
- **The viewer wallpaper has a new mount path**, `/app/telegram_archive/web/static/<file>`. The old path, `/app/src/web/static/<file>`, is a link to it in the viewer image, so an existing mount keeps working.
- **The migrations moved into the package.** From a checkout, run `alembic -c telegram_archive/alembic.ini ...`. Inside the backup container a bare `alembic ...` still works.
- **The Docker examples use the new name.** The compose file, `init_auth.sh`, `init_auth.bat` and `.env.example` run `python -m telegram_archive` and mount the wallpaper at the new path.
- **A misconfigured transcription server no longer uses up voice notes.** A refusal about the server's setup (401, 402, 403, 429, and 404 on the direct path) keeps the file queued and ends the run. Two refused files with nothing answered end the run with a warning to check the model and language. A 413 affects only its own file, which is sent once more as its audio track. ([#489](https://github.com/GeiserX/Telegram-Archive/pull/489))
- **Each transcript records the options it was made with**, and an answer made with another provider, model, language hint, hotword list or preset is never reused for a new request. Migration 033 adds the column. ([#489](https://github.com/GeiserX/Telegram-Archive/pull/489))

### Fixed
- **More of each transcription answer is read.** Word timings nested under segments (whisper.cpp), a segment's speaker id (Mistral), the detected language confidence, and ElevenLabs' three-letter language codes and audio duration. ([#489](https://github.com/GeiserX/Telegram-Archive/pull/489))

## [8.16.1] - 2026-09-26

Expand Down
2 changes: 1 addition & 1 deletion init_auth.bat
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo Starting interactive authentication container...
echo You will be asked for your Telegram verification code.
echo.

docker compose run --rm telegram-backup python -m src.setup_auth
docker compose run --rm telegram-backup python -m telegram_archive.setup_auth

echo.
if %ERRORLEVEL% EQU 0 (
Expand Down
2 changes: 1 addition & 1 deletion init_auth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ echo "Starting interactive authentication container..."
echo "You will be asked for your Telegram verification code."
echo

docker compose run --rm telegram-backup python -m src auth
docker compose run --rm telegram-backup python -m telegram_archive auth

# shellcheck disable=SC2181
if [ $? -eq 0 ]; then
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "telegram-archive"
version = "8.16.1"
version = "8.17.0"
description = "Automated Telegram backup with Docker. Performs incremental backups of messages and media on a configurable schedule."
readme = "README.md"
requires-python = ">=3.14"
Expand Down
4 changes: 2 additions & 2 deletions scripts/migrate-sqlite-to-postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
-e POSTGRES_USER=telegram \
-e POSTGRES_PASSWORD=your-password \
-e POSTGRES_DB=telegram_backup \
drumsergio/telegram-archive:8.16.1 \
drumsergio/telegram-archive:8.17.0 \
python scripts/migrate-sqlite-to-postgres.py

# Or with explicit paths
docker run --rm -it \
-v /path/to/sqlite/telegram_backup.db:/sqlite.db:ro \
-e DATABASE_URL=postgresql+asyncpg://user:pass@host:5432/dbname \
drumsergio/telegram-archive:8.16.1 \
drumsergio/telegram-archive:8.17.0 \
python scripts/migrate-sqlite-to-postgres.py --sqlite /sqlite.db

Environment Variables:
Expand Down
2 changes: 1 addition & 1 deletion telegram_archive/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import importlib

__version__ = "8.16.1"
__version__ = "8.17.0"

__all__ = ["Config", "TelegramBackup", "run_backup", "__version__"]

Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading