Skip to content

Set Up Telegram-Archive Backups and a Private Viewer

Install Telegram-Archive with Docker Compose, verify automated backups and the local viewer, then enable remote HTTP access with Localtonet.

Summary in your language
In this article 9 sections
Self-Hosting · Telegram-Archive · Localtonet · 2026

Keep an incremental Telegram archive on your own machine and securely control access to its browser viewer

Telegram-Archive saves supported messages, media, edits, deletions, and account history to storage you control, then presents that archive through a local web viewer. This guide uses the official Docker Compose workflow pinned to release v9.3.3, verifies the viewer locally, and explains backup, restoration, and coordinated upgrades. After the viewer works at http://127.0.0.1:8000, you can optionally expose it through a Localtonet HTTP tunnel. That tunnel creates a publicly reachable HTTPS address, so “private viewer” means access is protected by authentication and deliberate controls, not that the endpoint is hidden or network-private.

🔒 Authenticated viewer with self-hosted archive storage 🌐 Optional public HTTPS endpoint through Localtonet ⚡ Incremental updates plus scheduled full passes

How Telegram-Archive works

Telegram-Archive is a self-hosted archival system for one or more Telegram accounts. Its backup component connects to Telegram and stores supported account history in a local archive. A separate viewer reads the resulting database and media files. The viewer itself does not communicate with Telegram. This separation matters because only the backup component needs the authenticated Telegram session, while browsers only need access to the viewer.

Telegram data flows through a Docker Compose archive service to storage, a local viewer, and an optional HTTP tunnel.
Telegram-Archive stores backed-up data locally and serves it through a viewer that can optionally be reached through an authenticated public access path.

The archive uses SQLite by default, with PostgreSQL available as an alternative. It can save messages with formatting, replies, forwards, reactions, pinned messages, polls, service messages, forum topics, Telegram folders, archived chats, avatars, and earlier profile photos. Supported media includes photos, videos, voice notes, audio, round videos, GIFs, stickers, documents, and link previews. Identical files can be stored once and associated with every chat in which they appear. Files larger than 100 MB are skipped by default, although the media policy can be configured.

Telegram-Archive combines a real-time listener with scheduled full passes. While the backup service is connected, the listener records supported new messages, edits, and reactions as they happen. A full backup begins when the container starts and then follows the configured cron schedule, once per day by default. Full passes fetch only what is new and help fill gaps that the live listener could not capture.

💬 Incremental message history New data is added to the existing archive instead of requiring a new manual export each time.
✏️ Edit and deletion history Earlier message text is retained when a message is edited, and captured messages remain marked when Telegram later reports their deletion.
🗂️ Local database and media The archive database and downloaded files remain on storage attached to the machine you operate.
🔎 Browser-based viewer The viewer supports reading chats, searching messages, browsing shared media, and reviewing what changed.
👥 Multiple accounts The project supports backing up several Telegram accounts into one archive when configured for that workflow.
📱 Responsive viewing The viewer works on phones and includes twelve themes, including one that follows the system light or dark setting.

What the archive cannot recover

The first backup establishes an important boundary. Telegram-Archive cannot recover messages that were deleted before that first backup captured them. It also does not save secret chats. Bot chats are skipped unless explicitly added. The normal backup process does not send messages or modify the Telegram account.

A separate restore script can post archived messages back to a chat as the authenticated account, but that is not part of ordinary archive recovery. Restoring the archive database and media for the viewer is different from reposting archived messages into Telegram. This guide covers recovery of the self-hosted archive, not replaying messages into a Telegram chat.

The viewer is English-only and does not provide an offline mode. A browser must be able to reach the running viewer service, either locally or through a separately configured access path.

The viewer and backup service have different roles

Only the backup component communicates with Telegram. The web viewer reads the archive. Remote access should expose only the viewer, not the backup process, Telegram session, database port, Docker API, or project files.

Prerequisites and decisions before installation

The documented quick-start path uses Docker Compose. Install Docker with the Compose plugin by following the current Docker Compose installation guidance, then confirm that your user can run docker compose. Telegram-Archive publishes coordinated backup and viewer images for amd64 and arm64. Both images share one release number and must remain on matching versions.

You also need a Telegram api_id and api_hash. Obtain them by following Telegram's official API ID and hash instructions. These values identify the Telegram API application used by the backup component. They are not the one-time login code Telegram sends during interactive authentication.

Before installation, prepare:

  • A machine that can remain online whenever continuous listening or scheduled backups are expected to run.
  • Docker Compose and sufficient disk space for the database and selected media.
  • Your Telegram API ID, API hash, and account phone number.
  • Access to Telegram so you can receive the initial login code.
  • Your Telegram two-step verification password, if enabled.
  • A unique viewer username and a long, unique viewer password.
  • A valid timezone name, such as the documented example Europe/London.
  • A separate storage location for backups of the archive itself.
Component or value Purpose Security treatment
Telegram API ID and API hash Allow the backup client to authenticate through Telegram's API Keep them out of screenshots, source control, public logs, and shared examples
Telegram phone number Identifies the account during authentication Treat it as personal information and restrict access to the environment file
Telegram session Allows later backup runs without repeating the initial login Protect the persistent data directory and every copy of it
Viewer username and password Authenticate browser users to the archive viewer Use unique credentials, especially before enabling remote access
Persistent data directory Holds archive state, SQLite data, sessions, and downloaded media Apply restrictive host permissions, disk protection, and tested backups
Do not publish the environment file

The .env file contains account identifiers and viewer credentials. Do not commit it to a public repository, include it in screenshots, paste it into public support requests, or serve it from a web-accessible directory.

Choose the host and database path

The host becomes the storage location for potentially sensitive message history and media. Use an account with limited administrative access, maintain the operating system and Docker installation, and prevent unrelated users from browsing the deployment directory. Disk usage depends on selected chats, archive age, account count, and media policy. The default 100 MB per-file limit does not impose a total archive limit.

SQLite is the default and simplest path for the Compose deployment covered here. It keeps the database with the archive's persistent data and supports a straightforward cold-backup procedure. PostgreSQL is available for operators who deliberately configure and maintain it, but PostgreSQL has a different backup and restore process. Do not copy a live PostgreSQL data directory as if it were a SQLite file.

The documented container images run as user ID 1000. On a compatible Unix-like Docker host, the quick start assigns the persistent data directory to 1000:1000. Permission behavior can differ on Docker Desktop, Colima, Podman, and native Linux. Do not solve permission errors by making a sensitive archive world-writable.

Install Telegram-Archive with a release-pinned Compose file

Code editor showing a Docker Compose project with configuration, persistent storage, and a local viewer port.
The Compose project connects the archive service to its environment configuration, persistent data, and loopback-bound viewer port.

The installation below is pinned to the official Telegram-Archive v9.3.3 release. It downloads the Compose file from the v9.3.3 tag rather than from the mutable main branch. This keeps the Compose definition, environment names, image pins, authentication command, and release notes aligned.

The project's current development branch may contain newer settings or images. If you intentionally choose the latest main-branch workflow, use the current Telegram-Archive documentation and repository as one consistent set. Do not combine a current main-branch Compose file with version-specific instructions for v9.3.3.

1

Create and enter a dedicated project directory

Keep the Compose file, environment configuration, and persistent data together in a directory with restricted access.

2

Download the release-pinned Compose file

Retrieve docker-compose.yml from the official v9.3.3 tag and inspect the image versions, mounts, service names, and port binding before running it.

3

Create the environment file

Set the documented Telegram API values, phone number, viewer login, and timezone. Replace every placeholder.

4

Create persistent storage with the documented ownership

Create data and, on a compatible Unix-like host, assign it to user and group ID 1000:1000.

5

Authenticate the Telegram account interactively

Run the authentication command through the telegram-backup service, then enter the Telegram login code and two-step verification password when prompted.

6

Start the coordinated backup and viewer containers

Start the deployment in detached mode. Startup applies required migrations, begins a full backup, and makes the viewer available on the loopback-bound local endpoint.

Download the v9.3.3 deployment definition

mkdir telegram-archive
cd telegram-archive
curl -fsSL https://raw.githubusercontent.com/GeiserX/Telegram-Archive/v9.3.3/docker-compose.yml -o docker-compose.yml

Inspect the file before continuing:

docker compose config

Confirm that the backup and viewer images use the same 9.3.3 version. Also confirm that the viewer is published on loopback at port 8000. The official architecture describes the viewer as reachable from the host machine only. Preserve that loopback binding rather than changing it to every network interface merely to obtain remote access.

Create the documented environment file

cat > .env << 'EOF'
TELEGRAM_API_ID=REPLACE_WITH_YOUR_API_ID
TELEGRAM_API_HASH=REPLACE_WITH_YOUR_API_HASH
TELEGRAM_PHONE=REPLACE_WITH_YOUR_PHONE_NUMBER
VIEWER_USERNAME=REPLACE_WITH_YOUR_VIEWER_USERNAME
VIEWER_PASSWORD=REPLACE_WITH_A_LONG_UNIQUE_PASSWORD
VIEWER_TIMEZONE=REPLACE_WITH_YOUR_TIMEZONE
EOF

Replace every value before starting the deployment. The phone number must correspond to the Telegram account being archived. Keep the variable names aligned with the pinned Compose release. Do not put the one-time login code or Telegram two-step verification password into this file.

Restrict the file so other local users cannot casually read it:

chmod 600 .env

Prepare persistent storage

On a compatible Unix-like Docker host, create the data directory and apply the documented ownership:

mkdir -p data
sudo chown -R 1000:1000 data

If your container runtime handles bind-mount ownership differently, follow its documented permission model. Do not substitute chmod 777 or another world-writable setting.

Authenticate and start the services

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

Follow the interactive prompts. Enter the authentication code Telegram sends to your account. If the account uses two-step verification, enter that password into the local prompt. Do not publish the output without checking it for account or authentication details.

After authentication succeeds, start the deployment:

docker compose up -d

At startup, the backup service applies required database migrations and begins a full backup. The viewer can become reachable before the first archive pass finishes, so an initially sparse archive is not automatically a failure.

Why this guide does not download from main

A main-branch Compose file can change after publication. Pinning the download to v9.3.3 makes this installation reproducible and keeps it consistent with the linked release notes. For a newer release, use its tagged Compose file and read that release's documentation before changing both image pins together.

Verify the first backup and local viewer

Verification flow from running archive containers to persistent files and a viewer open on localhost.
Verify container health, persistent archive data, viewer authentication, and message access before adding remote connectivity.

Complete local verification before creating a tunnel. This separates Telegram-Archive problems from connectivity problems and confirms that authentication, storage, database initialization, migrations, and the viewer work on the host.

1

Confirm that the Compose services are running

Check service state. A service that repeatedly exits or restarts needs log inspection before remote access is considered.

2

Open the loopback viewer

On the Telegram-Archive host, open http://127.0.0.1:8000.

3

Sign in with the viewer credentials

Use VIEWER_USERNAME and VIEWER_PASSWORD. These are viewer credentials, not Telegram account credentials.

4

Watch the archive populate

Confirm that chats and messages begin appearing. Large accounts and media collections can require additional time.

5

Inspect logs and persistence

Resolve authentication, migration, database, permission, or network errors, then confirm the archive survives an ordinary container restart.

docker compose ps
docker compose logs

Open the local endpoint from the archive host:

http://127.0.0.1:8000

A successful local verification demonstrates that:

  • The Compose services remain running rather than entering a restart loop.
  • The loopback endpoint responds with the viewer login page.
  • The configured viewer username and password are accepted.
  • Chats begin appearing during the first full backup.
  • Archived messages can be opened and searched as data becomes available.
  • The archive remains available after an ordinary restart because it is stored in persistent data.

You can also verify archive-specific behavior as applicable to your account. Edited messages can retain earlier text, deletions observed after archival can remain marked, and the change view can show edits, deletions, and new transcripts. Results depend on what Telegram-Archive captured. Content deleted before the first backup cannot be reconstructed by enabling the archive later.

Do not troubleshoot Localtonet until the local URL works

A tunnel forwards traffic to an existing service. It cannot repair failed Telegram authentication, a stopped container, a migration error, incorrect filesystem ownership, or a viewer that is not listening on the configured target.

Operate, back up, restore, and upgrade the archive

Understand the normal backup cycle

The backup service performs a full pass at container startup and then follows its configured cron schedule, once daily by default. The real-time listener captures supported new messages, edits, and reactions while connected. The listener provides timely updates, while scheduled passes retrieve new data that the listener could not observe.

Stopping the containers stops listening and scheduled work. Data already committed to persistent storage remains, but new activity cannot be captured in real time while the backup service is offline. At the next startup, a full pass begins and fetches what is new within Telegram-Archive's supported behavior and the history still available from Telegram.

Monitor services and disk use

docker compose ps
docker compose logs

Monitor the host filesystem separately. Archive growth can come from database history, media, multiple accounts, transcripts, and imported Telegram Desktop exports. The default 100 MB per-file media limit does not prevent many smaller files from filling a disk.

Stop and restart the deployment

To stop and remove the running containers while retaining bind-mounted persistent files:

docker compose down

Start them again with:

docker compose up -d

Startup performs migrations and begins a full backup pass. Review logs after an unexpected shutdown or version change.

Create an archive-consistent SQLite backup

The default path uses SQLite. The most conservative backup method is a cold backup: stop the Compose deployment so there is no database writer, copy the complete persistent data together with the deployment definition, and then restart. This avoids guessing the SQLite filename or copying a database while a transaction is in progress.

1

Confirm the deployment is healthy

Check service state and logs before taking the backup. A copy of an already damaged or incomplete deployment is not a substitute for a known-good recovery point.

2

Stop all Compose services cleanly

Use docker compose down so the SQLite database, sessions, and media are not changing while copied.

3

Archive the deployment files

Copy docker-compose.yml, .env, and the complete data directory to protected storage. The environment file and data directory contain sensitive credentials or sessions.

4

Restart and inspect the deployment

Start the services, inspect logs, and confirm that the local viewer still opens.

From the project directory, one cold-backup sequence is:

docker compose down
tar -czf ../telegram-archive-backup.tar.gz docker-compose.yml .env data
docker compose up -d
docker compose ps
docker compose logs

Move the resulting archive away from the primary disk and protect it with access controls and encryption appropriate for private message history. Reusing the same filename overwrites the previous copy, so your actual backup system should retain dated recovery points. The example keeps the command simple and does not prescribe a retention system.

The backup contains more than messages

A full deployment copy can contain media, viewer credentials, Telegram session material, API identifiers, and personal data. Anyone who obtains the backup may gain access to the archive or account session. Protect backup storage accordingly.

Restore and verify the SQLite deployment

A recovery test should use an isolated directory and preferably an isolated host or virtual machine. Avoid running the original and restored backup components against the same Telegram account at the same time. If the test host can reach Telegram, either keep the original deployment stopped during the test or restrict network egress while validating the restored viewer.

1

Create an isolated restore location

Do not extract over the only working archive. Use a separate host, virtual machine, or directory intended for recovery testing.

2

Extract the protected backup

Restore the Compose definition, environment file, and complete data directory together.

3

Restore ownership and inspect configuration

On a compatible Unix-like host, return the data directory to 1000:1000. Confirm that the viewer remains bound to loopback and that the restored file permissions protect .env.

4

Start the isolated deployment

Start it only after preventing port conflicts and avoiding a second active backup client for the same account.

5

Verify the recovered archive

Inspect logs, sign in locally, open several chats, search for known messages, and test representative media from different dates.

A basic extraction and ownership sequence is:

mkdir telegram-archive-restore
cd telegram-archive-restore
tar -xzf ../telegram-archive-backup.tar.gz
chmod 600 .env
sudo chown -R 1000:1000 data
docker compose config

After confirming isolation and port availability:

docker compose up -d
docker compose ps
docker compose logs

Open http://127.0.0.1:8000 on the restore host. A meaningful restore test checks more than whether the login page loads. Confirm that authentication works, old and recent chats open, searches return expected messages, representative media is readable, and no repeated migration or filesystem errors appear in the logs.

Back up a PostgreSQL deployment correctly

PostgreSQL requires a database-native logical backup such as pg_dump. Do not rely on copying a live PostgreSQL data directory. Coordinate the database dump with the archive's media and configuration so the recovery set represents a known point in time.

The safe operational sequence is to pause Telegram-Archive writers, create a PostgreSQL dump using the database name and credentials from your selected deployment, copy the media and required configuration, then resume services. Restore the dump into a clean PostgreSQL database with pg_restore, restore the matching media, and validate the viewer.

pg_dump --format=custom --file=telegram-archive.dump "POSTGRES_CONNECTION_URI"
pg_restore --clean --if-exists --no-owner --dbname="RESTORE_CONNECTION_URI" telegram-archive.dump

The connection URI placeholders above are intentionally not Telegram-Archive environment-variable names. PostgreSQL can be external, containerized, or managed in several ways, and the available evidence does not establish one universal service name or credential layout for every supported deployment. Use the actual database connection details from your configured PostgreSQL path, never paste credentials into shell history on a shared machine, and follow the project's current operations documentation for version-specific PostgreSQL configuration.

A PostgreSQL restore test should confirm that the dump restores without errors, the matching media is present, viewer authentication works, representative chats and searches load, and startup migrations complete. If the database snapshot and media copy were taken at materially different times, some media references may not match the copied files.

Upgrade both images as one coordinated change

Telegram-Archive publishes separate backup and viewer images with one shared version number. Never update only one image to an unrelated version. Read the target release notes, create and verify a recoverable archive backup, update both pins together, pull both images, restart, and inspect startup migrations.

For the release used in this guide, v9.3.3 release notes state that Docker deployments need the new coordinated pins and that migration 041 runs on startup. On a database created by a normal release, that migration does nothing unless the affected development-image schema needs correction.

For a later release, download or compare the Compose file from that release tag before editing the deployment. Review new required variables and migration notes instead of changing only the image text.

docker compose down
docker compose pull
docker compose up -d
docker compose ps
docker compose logs

Run those commands only after the Compose file contains the matching target version for both images and after creating a recoverable database and media backup. Verify viewer login, representative archive data, search, media, and logs after the upgrade. Keep the previous backup until the new version has operated successfully for an appropriate validation period.

Operational evidence limitation

This guide provides a complete cold-backup and restore workflow for the default SQLite deployment. PostgreSQL topology and credentials vary by deployment, so its exact service-specific commands cannot be made universal without inventing names or secrets. Use pg_dump and pg_restore with the actual connection details from the PostgreSQL configuration you selected.

Expose the verified viewer with a Localtonet HTTP tunnel

Remote browser traffic passes through a Localtonet HTTP tunnel to an authenticated archive viewer on a self-hosted machine.
The HTTP tunnel creates a public route to the viewer. Telegram-Archive authentication remains responsible for controlling who can read the archive.

After http://127.0.0.1:8000 works locally, you can expose that HTTP service through Localtonet. Our client establishes an outbound connection to a Localtonet relay server. The resulting tunnel provides a public HTTPS address without inbound router port forwarding, firewall changes, VPN setup, or a public IP address.

The Localtonet address is publicly reachable while the tunnel runs

The tunnel does not turn the viewer into a network-private endpoint. Anyone who knows or discovers the assigned public URL can attempt to connect. “Private viewer” means the viewer enforces authentication and you control when access is available. Do not rely on an obscure URL as authorization.

Localtonet does not perform Telegram authentication, create the archive, operate the database, or replace viewer login controls. It forwards requests from the public HTTPS address to the existing local HTTP service.

➡️ Outbound client connection The Localtonet client connects outward to our relay, so you do not need to open an inbound router port.
🌐 Public HTTPS address The HTTP tunnel serves the local viewer through a publicly reachable HTTPS address while it is running.
🎯 Specific local target The tunnel points only to the IP address and port where the viewer is reachable from the selected client device.
⏯️ Explicit lifecycle Creating a tunnel does not start it. The selected client must be connected and the tunnel must be started.
1

Install and run the Localtonet client

Install our client on the Telegram-Archive host, or on another device that can reach the viewer. On the same host, 127.0.0.1:8000 is the appropriate target for this deployment.

2

Authenticate and select the client device

Use the device-specific authentication token supplied through your Localtonet account. Never publish the token or place it in screenshots.

3

Select an available relay server

Choose a currently available server or region from the dashboard. Obtain the value from the current product rather than copying an old server code.

4

Create an HTTP tunnel to the viewer

Use local IP 127.0.0.1 and port 8000 when our client runs on the same host. If the client runs elsewhere, use an address that device can reach.

5

Choose the HTTP Process Type

Select Random Sub Domain, Custom Sub Domain, or Custom Domain according to the current dashboard and plan options. Verify current DNS requirements before configuring a custom domain.

6

Start and test the public endpoint

Press Start, open the assigned HTTPS address from a separate device or network, and confirm that an unauthenticated browser receives the viewer login page rather than archive content.

See our Localtonet HTTP tunnel documentation for current dashboard details. The public endpoint remains available only while the selected Localtonet client is connected and the tunnel is running. If the client, tunnel, host, or Telegram-Archive viewer stops, remote access stops.

HTTP Process Type Address model Important consideration
Random Sub Domain Uses an assigned subdomain The address is still public while the tunnel runs
Custom Sub Domain Uses a selected subdomain where supported Availability can depend on current product and plan options
Custom Domain Uses a domain you control Check current Localtonet DNS instructions before creating records
A created tunnel is not automatically active

Use the Start action after saving the configuration. You can later stop or delete the tunnel. Stopping it removes public reachability when remote viewer access is unnecessary.

Security considerations for a private Telegram viewer

A viewer available through a public URL is not private because the URL is difficult to guess. Privacy depends on enforced authentication, strong credentials, controlled accounts, host security, protected backups, and deliberate tunnel operation.

Keep viewer authentication enabled

Use a long, unique viewer password that is not reused for Telegram, email, or another service. Test the public URL in a private browser session and confirm that the login page appears before any archive content. If Telegram-Archive account restrictions or chat-sharing features are used, grant only the access required for each user.

Protect Telegram credentials and sessions

The Telegram API hash, phone number, authenticated session, and two-step verification process require protection independent of the viewer password. Restrict the project directory and every backup containing it. Never expose the Docker socket, project filesystem, .env, database, media directory, or PostgreSQL port through the HTTP tunnel.

Expose only the viewer port

When our client runs on the archive host, target 127.0.0.1:8000. Do not tunnel database ports, container-management endpoints, SSH, or an entire administration interface simply because they are locally reachable. Keep the viewer's Docker port bound to loopback and use the tunnel for the specific remote-access requirement.

Stop access when it is not needed

The Localtonet tunnel can be stopped independently of Telegram-Archive. This lets local backups continue while public viewer access is unavailable. Stopping the tunnel is not a substitute for viewer authentication, but it reduces the period during which the public endpoint can be reached.

Understand optional data egress

The base archive remains on your disk, but optional Telegram-Archive features can send selected data elsewhere. Voice transcription sends audio, its filename, and its content hash to the configured transcription server. The event webhook sends edits or deletions, including message text, to the configured URL. Full web push notifications send the chat title, sender, and first 100 characters of a new message through the browser's push service, encrypted for that browser.

Do not enable optional integrations until you understand their destination, retention, authentication, and disclosure implications. Telegram-Archive event webhooks are separate from Localtonet platform Token/Tunnel webhooks.

Remote access changes the threat model

Once the tunnel starts, the viewer has a public HTTPS endpoint. Keep viewer authentication enabled, use unique credentials, apply least privilege where supported, protect the host and backups, and stop the tunnel when remote access is unnecessary.

Troubleshooting the installation and tunnel

The Telegram authentication command does not complete

Confirm that TELEGRAM_API_ID, TELEGRAM_API_HASH, and TELEGRAM_PHONE contain real values and that the API credentials came from your Telegram application settings. Confirm that the host can reach Telegram. Enter the Telegram code into the active terminal prompt and provide the two-step verification password if requested.

If authentication fails partway through, inspect the error before requesting more codes. Do not publish terminal output without removing personal identifiers and authentication details.

The containers restart or exit

docker compose ps
docker compose logs

Look for errors involving environment values, persistent-directory ownership, database migrations, image compatibility, or network connectivity. Run docker compose config and confirm that the backup and viewer images use the same version.

The viewer does not open at 127.0.0.1:8000

Confirm that the Compose services are running and that another process is not using port 8000. Inspect the pinned Compose file to verify the published viewer port. Test from the archive host because 127.0.0.1 always refers to the device where the browser or client is running.

Entering http://127.0.0.1:8000 on another computer asks that computer for its own port 8000. It does not contact the archive host.

The viewer opens but no chats appear

The first backup may still be running. Inspect logs for progress or errors and allow time for the archive to populate. Large accounts and media-heavy chats can take longer. Telegram-Archive skips bot chats unless they are explicitly added, does not save secret chats, and cannot retrieve messages deleted before the first backup.

The local viewer works but the public URL does not

  • Confirm that http://127.0.0.1:8000 still works on the archive host.
  • Confirm that the selected Localtonet client device is connected.
  • Confirm that the HTTP tunnel was started, not merely created.
  • Confirm that the tunnel targets the correct local IP address and port.
  • Confirm that the selected relay server remains available in the current dashboard.
  • If our client runs on another device, verify that the target is reachable from that device and is not incorrectly set to its own loopback address.

The public URL shows a login page, but login fails

Test the same viewer credentials locally. If local login also fails, correct the Telegram-Archive configuration. If local login succeeds but remote login does not, inspect application logs and browser behavior without disabling authentication as a shortcut.

Media is missing

Check whether the first backup is still running, whether the source media remains available through Telegram, and whether the file exceeds the configured media size policy. Files over 100 MB are skipped by default. Disk exhaustion and filesystem permissions can also prevent media from being written.

A restored archive starts but data is incomplete

Confirm that the database, media, session material, Compose file, and environment configuration came from the same recovery set. For SQLite, repeat the backup after stopping all Compose services. For PostgreSQL, restore from a valid pg_dump output rather than copying a live database directory. Check file ownership and inspect startup logs for migration or missing-file errors.

An upgrade fails during startup

Confirm that both images use the same target release and review that release's migration notes. Preserve logs, stop repeated restart attempts, and retain the pre-upgrade recovery set. Do not downgrade a migrated database blindly. Restore the verified pre-upgrade database and matching media if the target release's documented recovery process requires rollback.

Frequently asked questions

Does the Telegram-Archive viewer connect directly to Telegram?

No. The backup component communicates with Telegram. The separate viewer reads the archive database and media, so the Localtonet tunnel can target only the viewer's local HTTP service.

Is the Localtonet viewer URL private?

No. It is a publicly reachable HTTPS address while the client is connected and the tunnel is running. Access to the archive remains private only when the viewer enforces authentication and credentials are properly controlled.

Where is the Telegram archive stored?

The archive is stored on disk attached to the host you operate. SQLite is the default database, while PostgreSQL is optional. The Compose workflow uses persistent data owned by container user and group ID 1000:1000 on compatible hosts.

Can Telegram-Archive recover messages deleted before installation?

No. It can retain edits and deletions captured after archival, but it cannot recover messages already deleted before the first backup. It also does not save secret chats.

How often does Telegram-Archive run?

A full backup begins when the backup container starts and then follows a cron schedule, once per day by default. A real-time listener records supported new messages, edits, and reactions while connected.

How should I back up the default SQLite archive?

Stop the Compose deployment cleanly, copy the complete data directory together with the Compose file and protected environment configuration, then restart. Store the recovery copy separately and test it in an isolated environment.

Can I use PostgreSQL instead of SQLite?

Yes. PostgreSQL is supported as an optional backend. Back it up with a database-native tool such as pg_dump, restore it with pg_restore, and coordinate the dump with the matching media and configuration. Do not copy a live PostgreSQL data directory as a backup.

Why must the backup and viewer image versions match?

The two images are released with one coordinated version number and share the archive schema and behavior. Read the target release notes, update both pins together, and verify migrations and viewer operation after startup.

Does Localtonet replace the Telegram-Archive viewer password?

No. Localtonet provides connectivity from a public HTTPS address to the local viewer. Telegram-Archive remains responsible for viewer authentication and archive authorization. Keep authentication enabled whenever the tunnel is running.

Does remote access require router port forwarding or a public IP address?

Not with the Localtonet workflow described here. Our client establishes an outbound connection to a relay server, so the viewer can receive a public HTTPS address without inbound router port forwarding, firewall changes, VPN setup, or a public IP address.

Can the Localtonet client run on a different machine?

Yes, if that device can reach the Telegram-Archive viewer over the local network. In that arrangement, do not use 127.0.0.1 unless the viewer also runs on the client device. Loopback always refers to the machine running the Localtonet client.

Connect your verified Telegram-Archive viewer with Localtonet

First verify the archive, authentication, backups, and local viewer at 127.0.0.1:8000. Then create an HTTP tunnel, keep viewer authentication enabled, and run the public endpoint only when remote access is required.

Get Started Free →

Corrections & updates

Substantive changes approved by the Localtonet editorial team are listed transparently below.

Reviewed and updated for accuracy and completeness.

Localtonet is a secure multi-protocol tunneling and proxy platform designed to expose localhost, devices, private services, and AI agents to the public internet supporting HTTP/HTTPS tunnels, TCP/UDP forwarding, mobile proxy infrastructure, file server publishing, latency-optimized game connectivity, and developer-ready AI agent endpoint exposure from a single unified control plane.

Support