Get Started (Self-Hosting)
Introduction to self-hosting the complete mail forwarding stack. Host and manage the service on your own infrastructure.
This is a guide for self-hosting. If you just want to use the service as an end user, see the User guide instead.
What is Self-Hosting?
Self-hosting is the practice of hosting and managing your own services on infrastructure under your control — such as a VPS, dedicated server, or home server — rather than relying on third-party platforms.
This gives you:
- Greater autonomy and privacy
- Full data control
- Complete customization
- Responsibility for maintenance, updates, and availability
Stack Overview
The complete mail forwarding stack consists of these components, deployed in this order:
| # | Component | Role | Guide |
|---|---|---|---|
| 1 | MariaDB | Domain and alias lookup backend | mail-forwarding-core |
| 2 | DNS | MX, SPF, DMARC, PTR records | DNS Configuration |
| 3 | PostSRSd | Sender Rewriting Scheme (SRS) | mail-forwarding-core |
| 4 | Postfix | SMTP engine and policy enforcement | mail-forwarding-core |
| 5 | OpenDKIM | DKIM signing (optional, recommended) | mail-forwarding-core |
| 6 | Node.js API | HTTP endpoints for alias management | mail-forwarding-api |
| 7 | Next.js UI | Web frontend for end users | mail-forwarding-ui |
The installation order is mandatory. Components 1–5 are covered in the mail-forwarding-core guide. Installing out of order will cause misleading failures.
Deployment Path
Deploy the core stack
Follow the mail-forwarding-core guide to set up MariaDB, DNS, PostSRSd, Postfix, and OpenDKIM.
Configure DNS for your domains
Use the DNS Configuration guide to properly set up PTR, MX, SPF, DMARC, and DKIM records.
Deploy the API
Follow the mail-forwarding-api guide to set up alias management endpoints.
Deploy the UI
Follow the mail-forwarding-ui guide to deploy the Next.js frontend.
Optional: Set up cleanup cronjob
Configure the cleanup cronjob to purge expired confirmation tokens.
Last updated today

