Skip to content

Nid

Nid is a self-hosted Gmail management and archiving application, deployed entirely via Docker on your NAS.

It replaces tools like Gmail Cleaner and OpenArchiver, without sending your data to third-party servers.


Features

ModuleFeatures
📊 DashboardTop senders, largest mails, timeline, label breakdown
📬 Mail ManagementBulk delete/label/archive, reading, attachments, auto rules
📦 ArchivesEML storage on NAS, full-text search, differential
⚙️ JobsReal-time tracking of long operations (BullMQ + SSE)
🔐 AuthLocal JWT + Google SSO + multi-providers, 2FA/TOTP, multi-user
📧 NewslettersList-Unsubscribe header scan, bulk cleanup
📎 AttachmentsDedicated manager (live Gmail + archives), sort by size
🔁 DuplicatesDetection and deletion of duplicate archived mails
📋 TemplatesPre-configured rule library, one-click activation
📈 AnalyticsHeatmap, clutter scores, cleanup suggestions, Inbox Zero
📝 Audit LogActivity journal tracking sensitive actions
🔗 WebhooksDiscord, Slack, Ntfy or generic HTTP notifications
🛡️ IntegrityArchive consistency check: disk ↔ database
🔒 PrivacyTracking pixel detection, PII scanner, AES-256 archive encryption
⌨️ Keyboard ShortcutsFast navigation and actions in My Mails
💾 Export/ImportConfiguration backup and restore (rules, webhooks)
🌐 i18nFrench / English, language selector, preference persistence
📬 Unified InboxAll your Gmail accounts in a single view
🔍 SearchesSaved searches with icons and colors
⚙️ Ops & ResilienceS3/MinIO storage, retention policies, Gmail API quota tracking, IMAP/mbox import, mbox export

Documentation

This documentation is organized in three parts:

  • 📥 Installation — Quick start, Google Cloud setup, environment variables, production deployment, development environment.

  • 📖 User Guide — How to use each feature of the application. Ideal for users of all levels.

  • 🔧 Technical Documentation — Architecture, database, security, complete API reference. For developers and contributors.


Quick Start

bash
git clone https://github.com/le-nid/nid.git
cd nid
cp .env.example .env
# Edit .env with your Google credentials and secrets
docker compose up -d

The application is accessible at http://localhost:3000.

First Use

Check the first steps guide to create your account and connect Gmail.


Tech Stack

Frontend   →  React 19 + Ant Design + react-i18next
Backend    →  Fastify + TypeScript
Auth       →  Local JWT + OAuth2 Gmail + Multi-provider SSO
Database   →  PostgreSQL 16 (Kysely)
Queue      →  BullMQ + Redis
Archives   →  EML + PostgreSQL index
i18n       →  French 🇫🇷 / English 🇬🇧 (extensible)

Why Self-hosted?

  • ✅ Your mails stay on your NAS — no data leaves your network
  • ✅ Free, no subscription
  • ✅ Full control: archives in standard EML format, readable by any mail client
  • ✅ Multi-account Gmail from a single interface