This tutorial walks you through setting up a complete mail server with CeyMail Mission Control. By the end, you will have a working email system with Postfix, Dovecot, DKIM signing, spam filtering, a web dashboard, and Roundcube webmail.
What you need
Before you start, you need:
- A VPS running Ubuntu 22.04/24.04 or Debian 11/12 (512 MB+ RAM, 1 GB+ recommended)
- A domain name with access to DNS settings
- Root access to the server
- An external email address for Let's Encrypt (e.g., a Gmail address)
Popular VPS providers like DigitalOcean, Linode, Vultr, and Hetzner all work well. Any provider that gives you a clean Ubuntu or Debian installation with a public IP address will do.
Step 1: Point DNS to your server
Before installing anything, create two DNS A records pointing to your server. The installer needs these to set up SSL certificates and the reverse proxy.
| Type | Host | Value |
|---|---|---|
| A | mail.example.com | Your server IP |
| A | mc.example.com | Your server IP |
Verify the records are live:
dig +short mail.example.com
dig +short mc.example.com
Both should return your server IP. If they do not, wait for propagation -- most registrars update within a few minutes.
Tip
If DNS has not propagated yet, the installer will still complete successfully -- it just skips SSL and serves the dashboard over HTTP. You can re-run the script later to enable SSL.
Step 2: Install CeyMail
SSH into your server as root and run:
curl -sSL https://ceymail.com/install | sudo bash
The installer will prompt you for three things:
Mail domain (e.g., mail.example.com): mail.example.com
Dashboard subdomain (e.g., mc.example.com): mc.example.com
Email for Let's Encrypt (e.g., you@gmail.com): you@gmail.com
After that, everything is automatic. The installer will:
- Install Node.js 22, MariaDB, and system dependencies
- Create the CeyMail databases
- Download and deploy the Mission Control dashboard
- Configure your web server (Nginx or Apache) as a reverse proxy
- Provision SSL certificates via Let's Encrypt
The process takes about 3-5 minutes. When it finishes, you will see your dashboard URL:
Dashboard: https://mc.example.com
Web server: nginx
Server IP: 203.0.113.10
Step 3: Complete the setup wizard
Open the dashboard URL in your browser. You will be redirected to the Welcome Wizard where you:
- Verify the database connection is working
- Create your admin account (username and password)
After creating your account, log in to reach the dashboard.
Step 4: Run the install wizard
After logging in, you are taken to the Install Wizard which sets up all the mail services. It runs through these steps automatically:
- System requirements check
- PHP version selection (for Roundcube webmail)
- Core package installation (Postfix, Dovecot, OpenDKIM, SpamAssassin)
- Domain and hostname configuration
- SSL certificate generation for the mail hostname
- Service configuration file generation
- DKIM key generation
- File permissions setup
- Service activation
- Roundcube webmail installation
Each step shows real-time progress. The whole process takes a few minutes depending on your server speed.
Step 5: Add DNS records
The install wizard ends with a summary page showing all the DNS records you need to add. These are the authentication records that ensure your emails are delivered and not marked as spam.
| Type | Host | Value |
|---|---|---|
| MX | @ | mail.example.com (priority 10) |
| TXT | @ | v=spf1 mx -all |
| TXT | ceymail._domainkey | (DKIM public key shown in dashboard) |
| TXT | _dmarc | v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com |
Add these records in your domain registrar's DNS settings. You can copy them directly from the summary page -- each record has a copy button.
Step 6: Create a mailbox
Navigate to Users in the sidebar and click Add User. Enter an email address (e.g., hello@example.com), select the domain, and set a password.
Your first mailbox is ready. Users can connect with any IMAP client (Thunderbird, Apple Mail, Outlook) using these settings:
- IMAP Server:
mail.example.com - IMAP Port: 993 (SSL/TLS)
- SMTP Server:
mail.example.com - SMTP Port: 587 (STARTTLS)
- Username:
hello@example.com - Password: The password you set
Or use Roundcube webmail, which was installed during the wizard -- access it from the Webmail page in the dashboard.
Step 7: Send a test email
Compose a test email from your mail client or Roundcube webmail. Send it to an external address (like a Gmail account) and verify it arrives.
Check the Queue page in the dashboard to see the message being processed. If the message gets deferred, the queue page shows the reason.
Step 8: Verify authentication
Once the DNS records have propagated, check that everything is working:
# Check SPF
dig +short TXT example.com
# Check DKIM
dig +short TXT ceymail._domainkey.example.com
# Check DMARC
dig +short TXT _dmarc.example.com
The DNS page in the dashboard also checks all records for you and flags any issues with clear indicators.
You can also verify service health from the command line:
ceymail status
Step 9: Set reverse DNS
Contact your hosting provider to set the PTR record for your server IP to point to mail.example.com. This is critical for deliverability -- many receiving servers check reverse DNS.
What to explore next
With your mail server running, here are the features available in the dashboard:
- Add more domains -- Each domain gets its own DKIM keys and DNS records. Manage them from the Domains page.
- Configure aliases -- Forward emails between addresses without creating separate mailboxes. Use the Aliases page.
- Enable AI spam screening -- Turn on AI-powered spam detection from the Screening page. Choose between cloud mode (Gemini API) for low resource usage or local mode (Ollama) for complete privacy.
- Set up SMTP relay -- If your server IP has deliverability issues, configure a relay through a provider like SendGrid or Mailgun from Settings > Integrations.
- Create backups -- Download database backups from the Backup page.
- Monitor everything -- The dashboard home page shows live system metrics, service health, queue status, screening stats, and a real-time log stream.
- Keep up to date -- Check for updates from Settings > About, or run
ceymail updateon the command line.
For detailed configuration options, check the documentation.