Installation
How to install and set up CloakMail on your server
Installation
This guide covers the different ways to install and run CloakMail.
Prerequisites
Before installing CloakMail, ensure you have:
- Docker and Docker Compose (recommended method)
- A domain with MX records pointing to your server (for receiving emails)
- Port 25 accessible for SMTP traffic
Many cloud providers block port 25 by default. You may need to request access or use a VPS provider that allows SMTP traffic.
Docker Installation (Recommended)
The easiest way to run CloakMail is with Docker:
1. Clone the Repository
git clone https://github.com/DreamsHive/cloakmail.git
cd cloakmail2. Configure Environment
cp .env.example .envEdit .env with your settings:
# Your email domain
DOMAIN=mail.example.com
# Application name shown in UI
APP_NAME=CloakMail
# Email expiration time (in seconds)
EMAIL_TTL_SECONDS=3600
# Server ports
SMTP_PORT=25
API_PORT=30003. Start the Services
docker compose up -dCloakMail is now running:
- Web UI:
http://localhost:5173 - API:
http://localhost:3000
Using Pre-built Docker Images
You can also use the pre-built images from GitHub Container Registry:
# Pull the images
docker pull ghcr.io/dreamshive/cloakmail-server:latest
docker pull ghcr.io/dreamshive/cloakmail-web:latestDNS Configuration
For CloakMail to receive emails, configure your domain's DNS:
MX Record
Type: MX
Host: @
Value: mail.example.com
Priority: 10A Record
Type: A
Host: mail
Value: YOUR_SERVER_IPVerify Installation
- Open
http://localhost:5173in your browser - Generate a new inbox
- Send a test email to the generated address
- Check that the email appears in the inbox
Next Steps
- Quick Start — Create your first inbox
- Docker Configuration — Advanced Docker settings
- Environment Variables — Full configuration reference