A self-hosted email client inspired by HEY. Kurir connects to your existing email via IMAP/SMTP and gives you a calmer, more focused experience. Open source under the O'Saasy License.
Website · Documentation · GitHub Sponsors
- Screener — New senders land here, not your inbox. You decide who gets through.
- Imbox — Only mail from approved senders. The important stuff.
- The Feed — Newsletters and subscriptions in a browsable feed.
- Paper Trail — Receipts and notifications, kept separate.
- Full-text search — PostgreSQL-powered search across every email.
- Snooze & follow-ups — Snooze messages until later. Set follow-up reminders.
- Scheduled send — Write now, send later.
- Threaded conversations — Messages grouped by thread, reply inline.
- Compose in Markdown — Rich email authoring with auto-save drafts.
- Keyboard-first — Full shortcuts, command palette, vim-style navigation.
- Mobile PWA — Install on iOS and Android with push notifications.
- Dark mode — Light, dark, or match your system.
- Multi-account — Connect multiple email accounts, send from any.
- Archive — Archive with undo, swipe gestures on mobile.
- Contacts — Browse all senders, view conversation history.
- Admin dashboard — System health, sync status, user management.
- One-command install — Single
curlcommand provisions a fresh server. - Auto-updates — Checks for new versions, one-click update from admin.
- Backup & restore — Full database + config backup and restore.
Provisions a fresh Ubuntu 22.04+ or Debian 12+ server with everything:
# Public domain (default) — Caddy + Let's Encrypt
curl -fsSL https://raw.githubusercontent.com/cfarvidson/kurir-server/main/install.sh | sudo sh
# Tailscale-only deploy — Tailscale Serve handles TLS
curl -fsSL https://raw.githubusercontent.com/cfarvidson/kurir-server/main/install.sh | sudo sh -s -- --mode tailscale
# HTTP-only (local VM testing — passkeys won't work)
curl -fsSL https://raw.githubusercontent.com/cfarvidson/kurir-server/main/install.sh | sudo sh -s -- --mode httpThe installer handles Docker, PostgreSQL, Redis, TLS, and all secrets. Once running, open the URL to complete the setup wizard. Run with --help to see all options.
On first visit, Kurir walks you through:
- Create account — Set your name and register a passkey (WebAuthn)
- Connect email — Enter your IMAP/SMTP credentials (or use OAuth for Gmail/Outlook)
- Initial sync — Kurir fetches your emails with a live progress indicator
- Done — You land in your Imbox
pnpm install
docker compose up postgres -d
cp .env.example .env
pnpm db:generate
pnpm db:push
pnpm dev- Framework: Next.js 15 (App Router, Turbopack)
- Auth: NextAuth.js v5 (passkeys via WebAuthn, OAuth for Gmail/Outlook)
- Database: PostgreSQL 16 + Prisma 6
- Email: ImapFlow (IMAP), Nodemailer (SMTP)
- Search: PostgreSQL full-text search (tsvector + GIN index)
- Cache: Redis 7 (SSE push, sync jobs)
- UI: Tailwind CSS, shadcn/ui, Framer Motion
- State: TanStack Query, Zustand
- PWA: Service worker with Web Push notifications
Kurir works with any IMAP/SMTP provider:
| Provider | IMAP Host | SMTP Host | Auth |
|---|---|---|---|
| Gmail | imap.gmail.com | smtp.gmail.com | OAuth or App Password |
| Outlook | outlook.office365.com | smtp.office365.com | OAuth or App Password |
| iCloud | imap.mail.me.com | smtp.mail.me.com | App Password |
| Fastmail | imap.fastmail.com | smtp.fastmail.com | App Password |
| Yahoo | imap.mail.yahoo.com | smtp.mail.yahoo.com | App Password |
For other providers, use the custom option and enter your server details.
curl -fsSL https://raw.githubusercontent.com/cfarvidson/kurir-server/main/install.sh | sudo shHandles everything: Docker, secrets, HTTPS, database. Idempotent — safe to re-run.
cp .env.production.example .env
# Edit .env — set DOMAIN, generate secrets
docker compose -f docker-compose.production.yml up -dFor multi-host deploys across Tailscale-connected servers. See DEPLOY.md.
kamal setup # First deploy
kamal deploy # Subsequent deployspnpm dev # Dev server (Turbopack, port 3000)
pnpm build # Production build
pnpm lint # ESLint
pnpm db:push # Push Prisma schema to DB
pnpm db:generate # Regenerate Prisma client
pnpm db:studio # Prisma Studio GUI
pnpm add-user # CLI: add user with IMAP/SMTP config
pnpm sync-user # CLI: trigger sync for user(s)
pnpm backup # Create backup archive (pg + redis + env)
pnpm restore # Restore from backup archiveO'Saasy License — open source with one restriction: you cannot take this code and offer it as a competing hosted email service. Self-hosting for personal or business use is fully permitted.