You’ve got your new web hosting product and want to use custom email addresses for your domain, such as info@yourdomain.com? Unlike the old webspace product, your new web hosting product (a VPS Cloud with a local Coolify instance) no longer comes with a mail server. Instead, you can easily set up your own mail server using One-Click Apps.
In this article, we’ll explain why this is a good approach and how to get working mailboxes for your own domain in just a few steps.
Email hosting is technically much more complex than it might seem at first: a reliable mail server needs spam and virus protection, encrypted transmission (TLS), a webmail interface, and proper IMAP/SMTP configuration, among other things. Rather than configuring all of this from scratch, simply install a ready-made mail server template from our One-Click Apps catalog—for example, Mailu, a well-known, open-source, Docker-based mail server package that includes all these features.
What is Mailu? Mailu is an open-source mail server package that bundles webmail, IMAP/SMTP, and spam and virus protection. It’s an example of a suitable mail app from the One-Click Apps catalog—just look for terms like “Mail” or “Mailu” when browsing the catalog.
The basic installation process is the same for every app in the One-Click Apps catalog. For general instructions on installing an app on your web hosting product using One-Click Apps, see the article “VPS: One-Click Apps”.
Search the catalog for a mail server app (e.g., Mailu) and install it as usual using the installer.
Plan for enough resources Your mail server runs continuously in the background and requires some RAM and storage, especially when spam and virus protection is enabled. When choosing your VPS plan, make sure it has enough resources available for the mail app.
To make sure emails for your domain reach your new mail server and are trusted by other mail servers, you’ll need to update a few DNS records for your domain:
- MX record: The MX (Mail Exchanger) record tells other mail servers which server should receive emails for your domain. It must point to your new mail server’s hostname.
- SPF record: The SPF (Sender Policy Framework) record is a TXT record that specifies which servers are authorized to send emails on behalf of your domain. This helps protect against spoofing (forged sender addresses).
- DKIM record: DKIM (DomainKeys Identified Mail) digitally signs outgoing emails so recipients can verify that a message really came from your server and hasn’t been altered.
- DMARC record: DMARC builds on SPF and DKIM and specifies how recipient servers should handle emails that fail these checks (e.g., reject them or move them to the spam folder).
Your mail app provides the exact values Your installed mail app will display the exact values for MX, SPF, DKIM, and DMARC (including the public DKIM key) in its interface after setup. Then enter these values in the DNS section of your domain management panel.
After you add the DNS records, it may take some time for them to propagate worldwide (DNS propagation). Please be patient before testing email sending and receiving.
Once your mail server is running and the DNS records are in place, create your desired mailboxes and email addresses in the web interface or admin area of your installed mail app. You can also manage passwords, forwarding, and other mailbox settings there.
Don’t want to run your own mail server? If you’d rather not manage your own mail server, you can use an external email provider for your domain, such as Google Workspace or Microsoft 365. You’ll still need to set up the appropriate DNS records (MX, SPF, DKIM) for your domain using the values provided by the respective provider.
Your web hosting product gives you flexibility when setting up email: use One-Click Apps to install your own mail app, such as Mailu, in just a few clicks, connect it to your domain with DNS records, and then create the mailboxes you need.
If you need help with setup, our support team will be happy to assist you at any time.
