Your Telegram history,
searchable and askable,
on your own machine.
Telegram History turns the chat exports from Telegram Desktop into a private archive you can browse by date, search by words or by meaning, and question with an AI that cites the exact messages behind every answer.
What you can do
Everything runs in your browser against a database on your computer.
Import your exports
Upload a JSON export in the browser or point to a folder. Follow progress live, see exactly what was imported, and continue an interrupted import where it stopped. Importing the same export again never creates duplicates.
Browse any chat
Find a chat by name and read it in order. Jump to a date or a date range, open any message with its replies and surrounding conversation, and see which attachments it had.
Search by words or meaning
Keyword search finds exact words. Semantic search finds messages about the same thing, even when phrased differently. Hybrid combines both. Filter by chat, sender, date and message type.
Ask questions, get cited answers
Start research conversations limited to the chats, people and dates you choose. Ask for summaries or comparisons; every claim links back to the numbered source messages it came from.
How it works
Four steps from Telegram to answers. The AI part is optional: without it, importing, browsing and keyword search work fully.
1. Export
Telegram Desktop saves your chats as a machine-readable JSON file: one chat or your whole account.
2. Import
The importer reads the file in batches, records every problem it finds, and can pick up again after an interruption.
3. Store
Messages, senders, replies and attachment details go into a PostgreSQL database on your computer, which also holds the search indexes.
4. Explore
The web app lets you browse and search. If you connect AI models, it can also search by meaning and answer questions.
Your data stays yours
Private chats deserve a private tool. Here is what that means in practice.
-
Runs on your computer. The app is only reachable from the machine
it runs on (
localhost). There are no accounts, no cloud service and no public hosting. - No AI needed for the basics. Importing, browsing and keyword search never contact any outside service.
- Local AI works too. You can use models running on your own hardware, such as Ollama or LM Studio, so nothing leaves your machine at all.
- API keys are encrypted. Keys for AI providers are stored encrypted, so a copy of the database never contains them in plain text.
- Telegram is never touched. The app does not log in to Telegram, sync, send messages or change anything there. It only reads the files you export.
What is sent when you turn AI on
- Semantic and hybrid search send message text and your search queries to the embedding service you configure.
- Research conversations send your questions and the retrieved messages to the model you pick. The app always shows which provider and model answered.
Get started
You need Docker. Everything else, including the database, comes in the box.
-
Install Docker
Install Docker Desktop or Docker Engine with Docker Compose. Optionally install Go Task for the short
taskcommands below. -
Export your chats
In Telegram Desktop, export a single chat from its menu (Export chat history), or your whole account from Settings → Advanced → Export Telegram data. Choose Machine-readable JSON as the format.
-
Prepare the configuration
In the project folder, copy the example settings, create the import folder and generate four random secrets:
cp .env.example .env mkdir -p data/imports for secret in 1 2 3 4; do openssl rand -hex 32; doneOpen
.envand paste one value into each of the four empty secret lines at the top of the file. -
Start the app
task up # without Go Task: docker compose up --detach --build --waitThen open http://localhost:8000.
-
Import your export
Go to Imports. Upload the
result.jsonfile (up to 100 MiB), or copy the whole export folder intodata/importsand enter its path, which also keeps attachment details and suits large exports. -
Optional: turn on AI
- Research: open Models, add a provider (DeepSeek, OpenRouter, Alibaba Cloud Model Studio, Yandex AI Studio, Ollama, LM Studio or any OpenAI-compatible address) and pick the models to use.
- Semantic search: set
EMBEDDING_API_BASE_URL,EMBEDDING_MODELandEMBEDDING_DIMENSIONSin.env, then runtask upagain. Your archive is indexed in the background; Index status shows the progress.
A tour of the app
The main menu has six pages.
- Imports
/imports - Start an import and see every past one: live progress, counts, per-message results, a plain-language event log, and buttons to cancel, continue or retry. Download an error report without any message text in it.
- Chats
/chats - All your chats, newest activity first. Open one to read it page by page, jump to the first or last page, or narrow it to a date range.
- Search
/search - Choose Hybrid, Keyword or Semantic, add filters, and sort by relevance, newest or oldest. Each result links to the message in its conversation.
- Research
/research - Your AI conversations. Each one has its own scope (chats, senders, dates) and history. Pick a mode (deep, research or quick answer) and a model per question; rename, archive or restore conversations at any time.
- Models
/models - Add AI providers, test the connection, choose which models research may use, and set the default.
- Index status
/status - How much of your archive is ready for semantic search, and any indexing problems.
Good to know
A few things the app deliberately does not do.
- One person, one Telegram account. Repeat exports from your account are welcome; mixing exports from unrelated accounts is not supported.
- Text, not media. Photos, voice messages and videos are listed with their details, but not shown, transcribed or analysed.
- Read-only. Nothing is ever sent to or changed in Telegram.
- Exports, not live sync. To add newer messages, export again and import the new file.