Self-Host Prunebox
Deploy your own privacy-first email cleanup tool
Option 1: Docker Compose (Recommended)
Fastest way to get running
- Clone:
git clone https://github.com/kazimurtaza/prunebox.git - Copy env file:
cp .env.example .env - Edit
.envwith your values (see below) - Run:
docker-compose up -d
Option 2: Pre-built Docker Image
Pull from GitHub Container Registry
docker pull ghcr.io/kazimurtaza/prunebox:latestAvailable tags: :latest, :develop, :vX.Y.Z
Option 3: Build from Source
For development or customization
npm installnpm run buildnpm startConfiguration
Required Environment Variables
Add these to your .env file
postgresql://prunebox:password@localhost:5432/pruneboxhttps://yourdomain.comopenssl rand -base64 32openssl rand -base64 48openssl rand -base64 64Google OAuth Setup
- Go to Google Cloud Console
- Enable Gmail API
- Create OAuth 2.0 credentials (Web application)
- Add redirect:
https://yourdomain.com/api/auth/callback - Set
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET
Gmail API Scopes Required
This app uses restricted scopes that require Google verification for production use. Without verification, you're limited to 100 test users.
- •
gmail.readonly- Read email headers - •
gmail.modify- Move emails, trash, apply labels - •
gmail.labels- Create/manage labels - •
gmail.send- Send digest emails
Tech Stack
Frontend
Next.js 15, React 19, TypeScript
Backend
Next.js API, PostgreSQL
Deployment
Docker, Prisma