Open source Β· MIT Β· v2.2.0

Your files encrypted.
Stored in Telegram.
Free forever.

TAS turns a private Telegram bot chat into zero-knowledge cloud storage. AES-256-GCM encryption, FUSE mount, folder sync, expiring share links. One CLI. No accounts. No subscriptions.

npm i -g @nightowne/tas-cli copy
Origin

This started with a spreadsheet I didn't want Google to read.

I had a tax spreadsheet, a folder of scanned contracts, and a growing paranoia about what Google does with files sitting in Drive. They scan them. It's in the terms. They scan your documents to serve you better ads. That's the deal.

Dropbox wants twelve dollars a month. iCloud is fine if you live inside Apple's ecosystem and don't mind another monthly charge. Mega gives you 20 gigs for free with closed-source encryption β€” you're trusting a company in New Zealand that's been through multiple ownership changes to keep your files safe and honest.

I started thinking about where I could store encrypted files for free, with no cap, using infrastructure that already exists. And then it clicked: Telegram's Bot API lets you send documents up to 2 GB to a private chat with your own bot. There are no storage limits. No monthly fees. It just… works.

So I wrote a CLI that compresses files, encrypts them locally with AES-256-GCM, splits them into 49 MB chunks, and uploads them to a Telegram bot chat. The bot never sees plaintext. Telegram never sees filenames. The password never leaves your machine.

That was the first version. Then I added FUSE mounting so you can drag files in like a regular folder. Then folder sync, so changes upload automatically. Then expiring share links with a download page. Then resume for interrupted uploads, integrity verification, JSON output for scripting, and a diagnostics command. It became a real tool.

I'm not pretending this replaces proper backups. Telegram is a messaging app, not a storage provider. They can delete messages. They can change their API. Use TAS alongside real backups, not instead of them. But for a personal encrypted vault that costs nothing and doesn't require trusting anyone with your data β€” it works remarkably well.

How it works

Local encryption. Telegram transport. Nothing in between.

Every file goes through the same pipeline before it touches the network.

1Compress
Gzip level 6. Skipped automatically for formats that don't benefit β€” mp4, zip, jpg, pdf, and about 30 others.
2Encrypt
AES-256-GCM with a key derived from your password via PBKDF2-SHA512 at 600,000 iterations. Random 32-byte salt and 12-byte IV per file.
3Chunk
Split into 49 MB pieces with a 64-byte WAS1 header containing size, chunk index, and flags. Telegram's Bot API limit is 50 MB.
4Upload
Sent to your private bot chat with rate limiting (1 msg/sec) and exponential backoff retry. If it fails, it retries. If the process dies, tas resume picks up where it stopped.

Downloads reverse the process. After decryption and decompression, TAS compares the SHA-256 hash of the output against the original. If a single bit is wrong, it tells you.

What Telegram sees in your bot chat

a7f3b2c1e9d4.tas β€” 12.4 MB β€” application/octet-stream

No filename. No metadata. No content type. Encrypted noise.

Capabilities

It does more than you'd expect from a CLI.

FUSE mount

Run tas mount ~/cloud and Telegram storage appears as a regular folder. Open files in any app. Save directly. Unmount when you're done. Requires libfuse on Linux, macFUSE on macOS.

Folder sync

Register a directory with tas sync add and TAS watches for changes. New and modified files upload automatically with debouncing. Like Dropbox, except the backend is your Telegram bot.

Expiring share links

Generate a one-time download URL that expires after a set duration or download count. TAS spins up a local HTTP server and decrypts on-the-fly. The recipient gets the file. They never get your password.

Tags and search

Organize files with arbitrary tags. Search by name or tag with fuzzy matching. All metadata lives in a local SQLite database β€” fast, offline, and yours.

Resume interrupted uploads

Connection dropped at chunk 14 of 20? Run tas resume. TAS tracks which chunks uploaded successfully and picks up from chunk 15. Zero wasted bandwidth.

JSON output

tas list --json and tas status --json output machine-readable data. Pipe to jq, parse in scripts, feed into dashboards. First-class automation support.

Integrity verification

Every download verifies the SHA-256 hash against the original. tas verify checks all stored files at once. If Telegram lost or corrupted a message, you'll know immediately.

Self-diagnostics

tas doctor checks your Node.js version, config format, database health, disk space, FUSE availability, and encryption parameters. One command tells you if anything is wrong.

Security

Not "we take security seriously." Actual implementation details.

The encryption is real, auditable, and open source. Here's exactly what happens to your data.

Cipher
AES-256-GCM
Authenticated encryption. Any tampering is detected and rejected.
Key derivation
PBKDF2-SHA512 Β· 600,000 iterations
OWASP 2025 recommended minimum. Makes brute-force impractical.
Salt
32 bytes, cryptographically random
Unique per file. Precomputed tables are useless.
IV / Nonce
12 bytes, cryptographically random
Unique per file. Same plaintext produces different ciphertext.
Config protection
Bot token encrypted at rest
Your Telegram bot token is AES-256-GCM encrypted in config.json using your password.
Password hash
PBKDF2-based verification
No plaintext or fast-hash storage. Password verification is computationally expensive.
Download integrity
SHA-256 post-download
Every file hash-checked after decryption. Single bit flip = error.
Share server
XSS-safe output, RFC 6266 headers
HTML-escaped filenames. Proper Content-Disposition encoding. No injection vectors.
Landscape

Other tools exist. TAS isn't the only way to do this.

TeleDrive gives you a web UI for Telegram storage. Various Python scripts on GitHub do basic upload/download. rclone can mount Telegram as a backend with some configuration. restic and BorgBackup are serious backup tools that TAS borrows reliability patterns from.

TAS is different because it's a purpose-built CLI for Telegram-as-storage with end-to-end encryption, FUSE mount, folder sync, share links, resume, and integrity verification in one package. It handles Telegram's API quirks β€” the 50 MB chunk limit, rate limiting, 429 retries β€” so you don't have to.

Where TAS falls short: no file versioning (yet), no web UI, no multi-user support, and the fundamental limitation that Telegram is a messaging platform that can delete your content. Google Drive and Dropbox have SLA-backed reliability. TAS doesn't. Be honest about your threat model.

Install

Two minutes. Zero cost.

# Install
npm install -g @nightowne/tas-cli

# Setup wizard β€” creates a Telegram bot, sets your password, links your account
tas init

# Upload
tas push document.pdf

# Download (decrypts + verifies hash)
tas pull document.pdf

# Mount as a folder
tas mount ~/cloud

# Sync a directory
tas sync add ~/Documents && tas sync start

# Share with an expiring link
tas share create document.pdf --expire 1h

# Automation mode
export TAS_PASSWORD="your-password"
tas list --json | jq '.[].filename'
FAQ

Straight answers.

Is this actually free?

Yes. TAS is MIT-licensed open source. It uses Telegram's Bot API, which is free with no storage limits. The catch: Telegram is a messaging app, not a storage provider. They could change their API or delete messages. Don't use TAS as your only backup.

Can Telegram read my files?

No. Everything is encrypted on your machine before upload. Telegram receives opaque binary blobs. Without your password, the data is indistinguishable from random noise.

What if I forget my password?

Your data is gone. Zero-knowledge means nobody β€” including you β€” can recover files without the password. Write it down somewhere safe.

How big can files be?

Unlimited in practice. Telegram supports 2 GB per document. TAS chunks files into 49 MB pieces and reassembles them transparently.

Does this violate Telegram's ToS?

No. TAS uses the official Bot API β€” the same API used by millions of bots. It sends documents to a private chat with your own bot. Nothing in Telegram's terms prohibits this.

Why not restic or rclone?

Great tools β€” TAS borrows patterns from both. But TAS is purpose-built for Telegram: it handles the 50 MB limit, Bot API rate limiting, and provides Telegram-specific features like share links. If you want cloud-agnostic backup, use restic.

Windows support?

CLI works everywhere Node.js runs, including Windows. FUSE mount is Linux/macOS only.

Your files. Your encryption. Your storage.

No corporation reading your documents. No monthly invoice. Just a CLI and a Telegram bot.