Installation
This guide covers different methods to install Mailpilot on your system.
Interactive Setup Wizard
Not sure where to start? Use our interactive wizard to generate a customized configuration:
Interactive Setup Wizard
Choose your email provider:
System Requirements
- Node.js: Version 22.0.0 or higher
- pnpm: Version 10.28.0 or higher (or npm)
- Memory: Minimum 512MB RAM (2GB+ recommended for local LLM models)
- Disk Space: 500MB for application + data storage
Method 1: From Source
Best for development and customization.
1. Clone the Repository
git clone https://github.com/metal0/mailpilot.git
cd mailpilot2. Install Dependencies
pnpm installThis will install all required dependencies including the backend, dashboard, and optional tools.
3. Create Configuration
cp config.example.yaml config.yamlEdit config.yaml with your settings. See the Configuration Guide for details.
4. Build
pnpm buildThis compiles TypeScript and builds the dashboard.
5. Run
pnpm startThe application starts on http://localhost:8080 by default.
Method 2: Docker
Best for production deployment.
Basic Docker Setup
Create a docker-compose.yml:
services:
mailpilot:
image: ghcr.io/metal0/mailpilot:latest
ports:
- "8080:8080"
volumes:
- ./config.yaml:/app/config.yaml:ro
- ./data:/app/data
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- GMAIL_USER=${GMAIL_USER}
- GMAIL_APP_PASSWORD=${GMAIL_APP_PASSWORD}
restart: unless-stoppedRun:
docker compose up -dFull Stack with Tika + ClamAV
For attachment extraction and antivirus scanning:
docker compose -f docker-compose.full.yaml up -dThis includes:
- Mailpilot
- Apache Tika (for PDF/document text extraction)
- ClamAV (for virus scanning)
Docker Environment Variables
| Variable | Description | Required |
|---|---|---|
OPENAI_API_KEY | Your OpenAI API key | If using OpenAI |
GMAIL_USER | Gmail email address | If using Gmail |
GMAIL_APP_PASSWORD | Gmail app password | If using Gmail |
You can also use a .env file with docker compose.
Method 3: Pre-built Binary
Pre-built binaries coming soon! Check releases for availability.
Once available:
- Download the binary for your platform
- Make it executable:
chmod +x mailpilot - Create
config.yamlin the same directory - Run:
./mailpilot
Verification
After installation, verify it's working:
1. Check the Dashboard
Visit http://localhost:8080 in your browser. You should see the Mailpilot dashboard.
2. Check Logs
# If running from source
tail -f logs/mailpilot.log
# If running in Docker
docker logs -f mailpilot3. Test Configuration
Use the dashboard's Testing Sandbox to verify your classification rules.
Updating
From Source
git pull
pnpm install
pnpm build
pnpm startDocker
docker compose pull
docker compose up -dTroubleshooting Installation
Node.js Version Issues
Mailpilot requires Node.js 22+. Check your version:
node --versionIf you have an older version, install Node.js 22 or use nvm:
nvm install 22
nvm use 22pnpm Not Found
Install pnpm globally:
npm install -g pnpmOr use corepack (included with Node.js 16.9+):
corepack enable
corepack prepare pnpm@latest --activateBuild Fails on better-sqlite3
This is a native dependency. Ensure you have build tools installed:
Linux/macOS:
# Debian/Ubuntu
sudo apt-get install python3 make g++
# macOS
xcode-select --installWindows:
npm install --global windows-build-toolsDocker Permission Denied
On Linux, you may need to add your user to the docker group:
sudo usermod -aG docker $USER
# Log out and back inNext Steps
Getting Help
If you encounter issues:
- Check the Troubleshooting Guide
- Search GitHub Issues
- Ask in Matrix Chat