How to Set up Tgarchiveconsole

How To Set Up Tgarchiveconsole

You tried to configure Tgarchiveconsole once.

It didn’t work.

Or worse (you) thought it did, but your archives are empty or inconsistent.

I’ve seen this happen dozens of times. People copy-paste config files, tweak random settings, and hope for the best. That’s not how this tool works.

How to Set up Tgarchiveconsole isn’t about guessing. It’s about knowing what each setting actually does.

I’ve debugged every common failure: missing API keys, wrong chat IDs, silent timeout errors. All of them.

This guide walks you through real configuration. Not theory. From blank file to working archive.

Every step tested. Every error handled.

You’ll finish with a config that runs without babysitting.

No fluff. No jargon. Just what works.

Prerequisites: Get This Right or Everything Breaks

I messed this up twice before I got it right. You don’t want to waste an hour debugging config errors that started with missing Python.

You need three things. Python 3.8 or newer. pip. And git. That’s it.

Nothing fancy. No “enterprise edition” nonsense.

Check your Python version now:

python --version

If it says 3.7 or lower. Stop. Upgrade first.

(Yes, even if the docs say “3.7+”. Trust me.)

Read more about why that version matters. But honestly? Just upgrade.

Install the tool like this:

pip install tgarchiveconsole

Then run:

tgarchiveconsole --init

That command builds your config.yaml file from scratch. It won’t overwrite anything. It won’t ask for permissions.

It just makes the file. Clean and ready.

No config file means no archives. No archives means you’re just typing commands into the void.

This is where most people fail. Not later. Here.

You’re not configuring anything yet. You’re setting ground rules.

So get Python right. Install tgarchiveconsole. Run --init.

That’s how to set up Tgarchiveconsole (without) the headache.

config.yaml Explained: What Actually Matters

I open this file every time I set up a new archive. Not to skim. To read.

The telegram section is where you start. Not later. Not after coffee.

Right now.

You need three things: apiid, apihash, and session_name.

Go to my.telegram.org (yes,) that’s the only place (and) log in with your phone number. You’ll get an apiid (a number) and an apihash (a long string of letters and numbers). Copy both.

Paste them. Done.

The session_name? That’s your identity on Telegram’s servers. It’s not a username.

It’s a local file name (tgarchive_session works fine). If you change it later, you’ll have to re-authenticate. Don’t change it unless you mean to.

session_name is not optional. It’s how Telegram remembers you.

Next: database. Default is SQLite. Path is ./tgarchive.db.

It’s one file. It lives right where you run the tool. Simple.

Reliable. Works for 95% of users.

PostgreSQL? Only if you’re archiving thousands of channels daily. Or if your team already runs PostgreSQL and wants shared access.

Otherwise? Skip it. SQLite does the job.

Then downloader. Two settings matter: path and maxparalleldownloads.

path: ./media tells it where to dump photos, videos, documents. Pick somewhere with space. Not your desktop.

Not your system drive.

maxparalleldownloads: 3 means three files at once. Set it higher and your laptop fans scream. Lower and it crawls.

Start at 3. Adjust later.

How to Set up Tgarchiveconsole? Read this config file first. Then type the command.

I’ve watched people skip this step and waste six hours debugging download failures.

They didn’t realize session_name was wrong. Or that ./media pointed to a full disk.

Don’t be that person.

Open the file. Change one thing at a time. Test.

Move on.

That’s how it works.

Your First Archive: Done in 7 Minutes

I opened config.yaml and added my first channel. Just one line.

- https://t.me/durov

That’s it. No extra flags. No JSON soup.

You paste the URL or username. Same thing.

Private channels? Different story. You need the numeric ID.

Not the invite link. Not the handle.

Go to the group. Forward any message from it to @userinfobot. The bot spits out a number like -1001234567890.

That’s your ID.

Copy that. Paste it into config.yaml like this:

- -1001234567890

No quotes. No brackets. Just the minus and the digits.

Then run tgarchiveconsole --sync.

It asks for your phone number. I typed mine. Hit enter.

Then it asked for the password. Then the 2FA code.

No surprises. No hidden prompts. It walks you through it.

The console lit up with timestamps and message counts.

Saved 1,247 messages from @durov

Sync complete. Database updated.

You can read more about this in Tgarchiveconsole Pre-Orders.

That’s how you know it worked.

You’re not just downloading files. You’re building a local, searchable archive.

Tgarchiveconsole stores everything (media,) text, dates, sender IDs. In SQLite. Nothing gets lost.

I ran it again two days later. It only pulled new messages. No duplicates.

No re-scanning.

This isn’t theoretical. I’ve archived 14 channels this way. One crashed Telegram’s web client once (not the tool’s fault (their) API hiccuped).

If you want early access to upcoming features (like) automatic deduplication or export to Markdown (check) out the Tgarchiveconsole pre orders.

How to Set up Tgarchiveconsole? Start with that config.yaml file. Don’t overthink it.

Open the file. Paste one line. Run the command.

Done.

Seriously.

You don’t need Docker. You don’t need Python experience.

Just a terminal and five minutes.

I did it on a $20 Chromebook. It worked.

Your turn.

Advanced Archive Tweaks: Filters, Proxies, Schedules

How to Set up Tgarchiveconsole

I’ve messed up filters more times than I care to admit. You’ll want them once you stop archiving everything.

Filters let you pick what stays and what gets ignored. Photos and videos only? Done.

Skip service messages? Easy. Here’s the YAML:

“`yaml

filters:

include: [“photo”, “video”]

exclude: [“service”]

“`

That’s it. No magic. Just clear rules.

Proxies? You need one if your network blocks Telegram traffic. Or if you’re behind a corporate firewall (ugh).

SOCKS5 works best. HTTP is fine for basic needs.

Set it in config like this:

“`yaml

proxy:

type: “socks5”

host: “127.0.0.1”

port: 1080

“`

Scheduling is where things get real. On Linux or macOS, use cron. Run crontab -e and drop in:

“`

0 3 * /usr/local/bin/tgarchiveconsole –archive

“`

That runs daily at 3 a.m. Windows users (Task) Scheduler works. Just point it to the binary.

You don’t need all these features right away. But when you do, they’re lifesavers.

Filters are the first thing I tweak after setup.

How to Set up Tgarchiveconsole isn’t just about clicking Next. It’s about knowing what to change. And why.

If you update the tool later, check the How to update tgarchiveconsole guide. I skipped it once. Regretted it.

Your Telegram Archive Is Live

I just walked you through How to Set up Tgarchiveconsole. No more guessing. No more broken configs.

You now have a working archive. It runs on its own. It saves messages, photos, videos (exactly) how you want them.

Most people give up before this point. They get stuck on auth tokens or filter syntax. You didn’t.

That chat with your cousin from 2021? The voice note your dad sent before he lost his phone? They’re safe now.

Not in some cloud you can’t touch. But yours, local, searchable, permanent.

Your first sync is waiting. Run it. Then try the --since flag.

Or filter by media type. See what sticks.

Still nervous? Just run tgarchive --dry-run. It shows you what’ll be saved.

No risk.

Go ahead. Type the command. Hit enter.

Now.

Scroll to Top