Accounts & Destinations (Topics, NAS, WebDAV)
This guide covers logging in your personal Reader account, binding Telegram groups, channels, and Forum Sub-Topics, configuring Local NAS / WebDAV archive targets, and setting up oversized file fallbacks.
1. Reader Account Login (/login)
A Telegram Bot cannot join private groups via invite links or read messages from channels that restrict forwarding (noforwards) unless it is an admin there. By logging in a personal Reader Account, TG Migrator can read any chat your personal account has joined.
Step-by-Step Login Flow
- In private chat with your Bot, tap
🔑 Account(or send/login). - Tap
📱 Start Loginand send your phone number in international format (e.g.+12025550123). - Telegram will send a 5-digit login code to your official Telegram app.
Use the Inline Keypad — Never Type the Code!
If you send the login code as a plain text message inside Telegram, Telegram's security system immediately invalidates the code. Always tap the digits on the Bot's inline keypad and press
✔️to submit. - If Two-Step Verification (2FA) is enabled: Send your 2FA password in the chat. The Bot immediately deletes your password message upon receipt.
Password Contains `_`, `*`, `~`, or `||`? Wrap It in Backticks!
Telegram's client automatically parses pairs of
_(italic),*(bold),~(strikethrough), and||(spoiler) and strips those symbols from the message text. To ensure the Bot receives every character verbatim, wrap your password in single backticks:text`my_s3cret_p*ssw0rd`If you forget and Telegram formats your message, TG Migrator will automatically detect the formatting, reject the corrupted input, and prompt you to resend it wrapped in backticks.
2. Binding Telegram Destinations (/bind & Forum Topics)
TG Migrator supports delivering messages to:
- Regular groups & supergroups
- Broadcast channels
- Specific Forum Sub-Topics inside a topic-enabled supergroup
A. Binding a Regular Group or Main Topic (General)
- Add your Bot to the target group and grant it permission to Send Messages (and media).
- Send
/binddirectly in the group (or inside the defaultGeneraltopic). - The Bot deletes the
/bindcommand and notifies you in private chat:🎯 Bound as target #1 MyGroup
B. Binding a Specific Forum Sub-Topic (Most Common Question!)
Because /bind binds whichever topic the command is sent inside, binding a specific sub-topic works like this:
- In your target Forum group, open the specific Sub-Topic you want to use as a destination (do not stay in
# General). - Inside that Sub-Topic's message input box, send:text
/bind - TG Migrator reads the message's
reply_totopic header and creates a dedicated target for that sub-topic:🎯 Bound as target #2 MyGroup_t128 (MyGroup · Topic 128)
Multiple Sub-Topics in the Same Group
You can enter 5 different Sub-Topics in the same group and send /bind in each of them. TG Migrator will register 5 independent Targets (e.g. MyGroup_t10, MyGroup_t25, etc.), allowing you to route different source channels into different sub-topics of the same archive group!
C. Alternative: Binding a Topic via /add_tg in Private Chat
If you prefer not to send /bind inside the sub-topic, you can also add it directly in private chat with the Bot:
- Right-click (or tap) any message inside your target Sub-Topic and select Copy Message Link.
- A Forum Topic message link looks like:
https://t.me/c/1234567890/128/4561234567890→ Chat ID (-1001234567890)128→ Topic ID456→ Message ID
- Send the following command to the Bot in private chat:text
/add_tg -1001234567890 128
D. Binding a Broadcast Channel or as an Anonymous Admin
In broadcast channels (or when you post anonymously as the group title), Telegram hides your personal sender_id. To authorize /bind:
- Send
/bindto the Bot in private chat first. - The Bot generates a one-time code valid for 10 minutes, e.g.:
Post /bind 839201 there (valid for 10 minutes) - Copy and post
/bind 839201inside your target channel or group.
3. Local NAS Directory Targets (/add_local)
Local targets save media files and optional metadata sidecar files into subdirectories under /app/archive (mounted to ./archive on your host or NAS).
- Go to
🎯 Targets→ tap➕ Local(or send/add_local). - Enter a target name (e.g.
nas_movies). - Enter a relative subdirectory under
ARCHIVE_ROOT(e.g.telegram/movies), or send-to use the root of/app/archive. - Files are organized automatically as:
<ARCHIVE_ROOT>/<subpath>/<source_chat_name>/<YYYY-MM>/<msg_id>_<original_filename>
Sidecar Metadata Files (archive.sidecar_format)
Every archived message can be accompanied by a sidecar file containing the full message text/caption, original timestamp, sender ID, message ID, and source link:
json(default): Structured JSON metadatamd: Human-readable.mdnote (ideal for Obsidian / Logseq)both: Writes both.jsonand.mdnone: Saves media files only
Switch anytime via /set archive.sidecar_format md.
4. WebDAV Targets (/add_webdav)
WebDAV targets work seamlessly with AList, OpenList, Nextcloud, ownCloud, Synology WebDAV Server, and rclone serve webdav.
- Go to
🎯 Targets→ tap➕ WebDAV(or send/add_webdav). - Follow the wizard prompts:
- Target name: e.g.
alist_onedrive - WebDAV URL: Supports external
https://...as well as internal Docker/LANhttp://...(e.g.http://alist:5244/dav).Automatic LAN Proxy Bypass
Even if you configured a global
PROXY_URLfor Telegram/WebDAV, internal addresses (localhost,192.168.x.x,10.x.x.x,100.64.x.xTailscale/CGNAT, and single-label Docker service hostnames likehttp://alist:5244) automatically bypass the proxy and connect directly. - Username: Your WebDAV username (or
-for anonymous). - Password: Your WebDAV password (stored encrypted with Fernet AES-128-CBC + HMAC-SHA256 in the database). Remember to wrap in backticks
`password`if it contains_,*, or~! - Subdirectory: e.g.
OneDrive/TelegramArchive(automatically created viaMKCOLif missing).
- Target name: e.g.
auto, spool, and stream Upload Modes (archive.webdav_mode)
auto(Default): Uses disk-spooling when free disk space is sufficient, and automatically switches to streaming when disk is tight.spool: Downloads the file to temporary disk (downloads/active) first, then uploads to WebDAV with automatic retry. Safest for unstable networks.stream(Zero-Disk Streaming): Streams chunks directly from Telegram MTProto into an HTTP chunkedPUTrequest to WebDAV without writing the file to disk. Ideal for low-disk VPS instances (/set archive.webdav_mode stream).
5. Handling Oversized Files (> 2 GiB / 4 GiB)
Standard Telegram accounts and Bots can upload files up to 2,000 MiB (~2 GiB), while Telegram Premium user accounts can upload up to 4,000 MiB (~4 GiB).
If a source channel contains files larger than your writer's limit, you have two built-in options:
- Set an Archive Fallback Target (Recommended): Open
🎯 Targets→ select your Telegram target → tap🗄 Set Oversized Fallback→ choose a Local NAS or WebDAV target. Any file exceeding Telegram's upload limit will automatically be saved to your NAS/WebDAV instead of failing! - Enable Premium Reader Upload Fallback: If your logged-in Reader account has Telegram Premium and is a member with post permissions in the destination chat, run:textFiles between 2 GiB and 4 GiB will automatically be uploaded using your Premium Reader account.
/set transfer.allow_premium_user_fallback true