Skip to content

Installation

This guide is for running your own MailFellow instance. If you're using the hosted version at mailfellow.com, you can skip this entirely.

Requirements

  • Go 1.24 or later
  • PostgreSQL 15+
  • Node.js (for building CSS, optional if using Docker)

Build

git clone https://github.com/emir/mailfellow.git
cd mailfellow
go build -o mailfellow ./cmd/mailfellow

Run

Create a .env file:

ENV=production
BASE_URL=https://your-domain.com
PORT=:8080
SESSION_SECRET_KEY=generate-a-random-64-char-string
DATABASE_URL=postgres://mailfellow:your-password@localhost:5432/mailfellow?sslmode=disable

Then start MailFellow:

./mailfellow

Open your browser and complete the setup wizard to configure your Discord/Slack bot and email provider credentials. See Getting Credentials for how to obtain tokens.

Docker (recommended)

services:
  mailfellow:
    build: .
    ports:
      - "8080:8080"
    env_file: .env
    volumes:
      - mailfellow-attachments:/app/data/attachments
    depends_on:
      postgres:
        condition: service_healthy
    restart: unless-stopped

  postgres:
    image: postgres:17-alpine
    environment:
      POSTGRES_USER: mailfellow
      POSTGRES_PASSWORD: mailfellow
      POSTGRES_DB: mailfellow
    volumes:
      - pgdata:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U mailfellow"]
      interval: 5s
      timeout: 3s
      retries: 5

volumes:
  mailfellow-attachments:
  pgdata:
docker compose up -d