Your email history is one hacked account away from being gone forever. Here's how to fix that — for free, with no cloud storage, using a USB drive you already own.
Think about everything that lives in your Gmail inbox. Receipts, contracts, medical records, years of correspondence with clients, family, colleagues. Now think about what happens if your Google account is locked tomorrow.
It happens more often than you'd expect. Google accounts get compromised, suspended for policy violations, or simply disabled with no warning and no clear path to recovery. When that happens, everything in Gmail — every sent email, every attachment, every thread — is gone.
Gmail Takeout is a one-time export, not a backup. It produces a giant MBOX file with no search and no ongoing sync. And storing it in Google Drive or Dropbox just moves the problem to a different cloud.
What you actually need is a tool that downloads your Gmail continuously, stores it in open formats you can read forever, and keeps everything on hardware you control.
That's what this guide covers.
What you'll have at the end: A USB drive containing your complete Gmail archive in standard .eml format, indexed and searchable offline, with SHA-256 checksums on every file — all running from a free open-source app that needs no installation.
Why Existing Solutions Fall Short
Before we get to the solution, it's worth understanding why the obvious approaches don't work well.
Account lockout is real. Google locks millions of accounts every year for suspected security violations, policy breaches, or because an automated system flagged something incorrectly. The appeal process can take weeks with no guarantee of recovery. If your account is your only copy, you have no access during that entire period.
Gmail Takeout has three problems:
- One-time snapshot only. Every email you receive after the export is not backed up. To stay current, you'd need to run a full Takeout every few weeks and manage a growing collection of overlapping archives.
- MBOX format with no search. Takeout concatenates all emails into a single large file. There's no index, no search interface, and no way to find a specific email without a separate tool.
- Slow and unreliable. A large Gmail account can take hours to prepare. The download link expires. If the download fails halfway through, you start over.
The right approach: Use IMAP to download emails incrementally, store each one as a separate .eml file with a checksum, and keep a searchable index on your local device. New emails are picked up automatically on the next sync.
That's exactly what we're building.
What You Need
- A USB drive with at least 16GB free (a typical 10-year Gmail account takes 2–8GB)
- Windows 10/11 or macOS 10.15+
- Gmail with IMAP enabled
- A Gmail App Password (not your regular password — explained below)
Step 1 — Enable Gmail IMAP
- Open Gmail → gear icon (⚙) → See all settings
- Click the Forwarding and POP/IMAP tab
- Under IMAP access, select Enable IMAP
- Click Save Changes
Step 2 — Create an App Password
An App Password is a 16-character code that lets a third-party app access Gmail via IMAP without using your main Google password. You can revoke it at any time.
- Go to myaccount.google.com → Security
- Click 2-Step Verification (must be enabled first)
- Return to Security and find App Passwords
- App → Mail, Device → Windows Computer (or Mac)
- Click Generate — copy the 16-character code
Keep this code. Google won't show it again, but you can always generate a new one.
Step 3 — Download Stormbird
Stormbird is a free, open-source desktop email archiver built with Electron and React. It runs directly from a USB drive — no installation required.
Download the latest release: github.com/drvishalraut-eng/stormbird/releases
Extract the zip to your USB drive. The folder structure will look like:
E:
├── Stormbird.exe
├── resources
└── Stormbird-Data\ ← created on first launch
├── stormbird.db ← search index
└── mail\ ← your emails go here
Every .eml file gets a SHA-256 checksum stored in the database at write time. If any file is ever corrupted — from bit rot, hardware failure, or anything else — Stormbird detects it automatically on the next startup.
Step 4 — First Launch and Setup Wizard
Double-click Stormbird.exe. A four-step setup wizard appears:
- Welcome — overview of features. Click "Get started."
- Data folder — confirm the location (default is next to the exe, which is correct for USB use). Click "Continue."
- Add Gmail account — enter your email and the App Password from Step 2. Click "Test connection," then "Add account."
- Done — keyboard shortcuts reference. Click "Open Stormbird."
Windows SmartScreen: If you see "Windows protected your PC," click More info → Run anyway. This is a one-time prompt because the app isn't yet code-signed.
Step 5 — Start Your First Sync
Click ⟳ Sync all accounts in the sidebar.
The titlebar shows live progress — current folder and download count. For a large Gmail account, the first sync can take 30 minutes to several hours.
What happens for each email:
- Fetches the raw email via IMAP using
BODY.PEEK[]— does not mark emails as read in Gmail - Writes to a
.tmpfile on the USB drive - Computes SHA-256 hash of the written bytes
- Verifies the hash matches the original content
- Renames
.tmpto final.emlfilename (atomic operation) - Stores path, hash, and metadata in the SQLite index
This sequence ensures every .eml file is complete and verified. No partial files, no silent write failures.
Resumable: Stormbird saves a UID checkpoint after every batch of 100 emails. If you close the app and reopen it, sync resumes exactly where it left off. You'll never download the same email twice.
Press Ctrl + to open the developer console if you want to see detailed IMAP activity in real time.
What's on Your Drive After Sync
Stormbird-Data
└── mail
└── yourname@gmail.com
└── Inbox
├── 2023
│ └── 01
│ ├── a3f8b2c1d4e5f6a7.eml
│ ├── b9c2d3e4f5a6b7c8.eml
│ └── MANIFEST.txt ← SHA-256 checksums
└── 2024
└── ...
Each .eml file is a complete, standard email in RFC 2822 format — readable by Thunderbird, Apple Mail, Outlook, or any compatible client without Stormbird. There's no lock-in.
Each MANIFEST.txt contains every filename and its SHA-256 checksum in plain text. Verify any file manually:
# Windows (PowerShell)
Get-FileHash a3f8b2c1d4e5f6a7.eml -Algorithm SHA256
# macOS / Linux
shasum -a 256 a3f8b2c1d4e5f6a7.eml
Searching Your Archive
Folder search: Type in the search box above the message list. Filters in real time.
Global search: Press Ctrl + F to search across every account and every folder simultaneously. Click any result to navigate directly to that message.
On an archive of 50,000 emails, a typical search returns results in under 100 milliseconds. Everything runs locally — no internet required, no query leaves your device.
Keeping Your Archive Safe
Safe Eject — always do this before unplugging
Never unplug the USB drive while Stormbird is running without clicking Safe Eject first.
SQLite uses a Write-Ahead Log (WAL) for performance. Unplugging while the WAL has uncommitted changes can corrupt the database. The Safe Eject button:
- Flushes all pending SQLite writes
- Closes all database connections
- Sends the platform eject command (PowerShell on Windows,
diskutil ejecton macOS)
Click ⏏ Safe Eject in the bottom status bar. Takes about 2 seconds.
Portable mode: If Stormbird is running from the USB drive, it detects this automatically and shows a warning: "Ejecting will close Stormbird." You confirm before it proceeds.
Automatic integrity checking
Every startup: spot-check of 50 random .eml files against their stored checksums.
Every week: deep scan of every file in the archive.
If anything has been corrupted, it's flagged immediately.
NAS backup
- Click 🗄 NAS Backup in the sidebar
- Enter your NAS path (e.g.,
\\NAS\EmailBackup) or browse to a local folder - Set schedule to Daily for incremental backup
- Click Save schedule
- Click Full backup to copy everything right now
After the initial full backup, daily incremental runs copy only files changed since the last run — typically a few seconds for a day's worth of new emails.
Taking Your Archive to Another Computer
- Plug the USB drive into the other computer
- Double-click Stormbird.exe
- Your entire archive is immediately available — all accounts, all folders, full search
- Safe Eject before removing the drive
No installation. No account login. No internet required for reading.
On macOS: First launch on a new Mac requires right-click → Open, then confirm. Or run
xattr -cr /Volumes/YourDrive/Stormbird.appin Terminal once.
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl + N |
New message |
Ctrl + F |
Global search |
Ctrl + , |
Settings |
Ctrl +
|
Toggle console |
Escape |
Close current panel |
Troubleshooting
SmartScreen blocks the app: Click More info → Run anyway. One-time prompt.
"App Password is incorrect": Make sure you're using the 16-character App Password, not your regular Gmail password. Enter it without spaces.
Sync stops halfway: Close and reopen. Sync resumes from the last checkpoint automatically.
First sync is slow: Normal. Gmail's IMAP rate limits cap the throughput. A 50,000-email archive takes 1–3 hours. Subsequent syncs are much faster.
Final Thoughts
Email has accumulated decades of important communications for most of us. It's the paper trail of modern life. Treating it as safe simply because it's "in Gmail" is a comfortable assumption that a surprising number of people discover is wrong only after it's too late.
A local archive on a USB drive costs nothing and takes an afternoon to set up. Every email gets a cryptographic fingerprint, the archive is self-verifiable without any software, and the whole thing travels in your pocket.
Stormbird is free and open source.
Download: github.com/drvishalraut-eng/stormbird
If it saves your inbox: buymeacoffee.com/drvishalraut
Built by Dr Vishal Raut — paediatrician and independent developer, Maharashtra, India.
Top comments (0)