Dec 02, 2025
Aris S. & Valentinas C.
8min Read
Business owners typically use pre-configured mail servers from third-party providers to host their mailing services. While they are sufficient for some users, others might need higher flexibility and control.
For such users, self-hosting email servers can be a better option. In addition to providing complete control over the service, they are more secure since each account has a dedicated, isolated environment.
In this article, we will explain how to host your own email server with Hostinger’s virtual private server (VPS) using the CyberPanel control panel. Before getting into the steps, we will also explain the benefits of creating a private mail server.
A self-hosted email server requires some technical expertise to set up and manage. However, it has many benefits compared to a third-party service:
In this section, we will explain the steps on how to host your own private email server, from purchasing a VPS hosting plan to sending a test email.
While you can host an email service on a personal computer, managing it requires more time and effort. Moreover, you would need server-grade hardware to run the machine 24/7, increasing the total cost.
Email hosting on a VPS is simpler since the provider will set up and manage the hardware. As such, it is more cost-efficient and offers various features that help simplify the email server configuration process.
To pick the best VPS hosting provider and plan for your needs, consider the following factors:
Hostinger offers four VPS KVM plans starting at 0/month with a 30-day money-back guarantee. We use reliable hardware and network infrastructure to ensure 99.9% uptime, ideal for self-hosted email for businesses.
All Hostinger VPS hosting plans include a dedicated IP address to improve email deliverability and reputation. Moreover, users can configure various operating systems and control panels in one click via hPanel without any Linux commands.
We also provide the Kodee AI Assistant to help troubleshoot server problems using simple prompts. For example, ask, “I have pointed my domain using custom nameservers, but it won’t propagate. Explain the issues and their solutions,” and the tool will give the guide to fix it. You can also ask Kodee to do basic server management tasks, like checking your VPS resource usage or adjusting firewall rules.

After purchasing a plan, navigate to the VPS section on the top menu of hPanel and select your new server. Complete the setup process by entering a hostname, selecting a server location, and choosing an operating system.
For this tutorial, we will use AlmaLinux 9 with CyberPanel. You can change the operating system anytime by following these steps:

Warning! Changing your VPS operating system and control panel will wipe all your existing data. We strongly suggest creating a backup before doing so.
If you prefer to use another Linux distribution, install CyberPanel using commands. To do so, connect to your remote server using an SSH client like PuTTY.
Enter the SSH login credentials, which you can obtain in your VPS overview’s SSH Access tab. Run the following command to start the installation wizard and follow the instructions:
sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh)
After setting up your VPS, purchase a domain from Hostinger. Log in to hPanel and follow these steps to point it to your outgoing mail server:
Wait until the propagation process is complete, which can take up to 24 hours.
Note that once finished, your domain might still not point to several DNS records. We will configure them later in CyberPanel.
Self-hosting an email server in a CyberPanel VPS requires creating an empty website as a container. It is essential for domain binding and DNS configuration.
To do so, enter https://your_vps_ip:8090 in your web browser to open CyberPanel. Alternatively, click the panel access link in hPanel’s Operating System menu.
Enter the admin username and password to log in. If you forget the credentials, reset them via the Operating System menu. On the CyberPanel dashboard, follow these steps:
Important! When accessing CyberPanel for the first time, your web browser might warn you about an unsafe website. You can ignore the warning and proceed to the login page.
Create nameservers in CyberPanel to connect your mailing service with the domain. Here are the steps:
CyberPanel will generate all the DNS records, including MX, which allows your server to receive and send emails. Check them by navigating to DNS → Add/Delete record.
In addition, head to Email → DKIM Manager and select your website from the list. Ensure your domain has the public and private key pairs. Otherwise, email providers like Gmail might flag your messages as spam.
Before creating an email account, wait until the propagation completes. Use an online DNS checker tool to see if all the records appear, then proceed to the next step.
Secure sockets layer (SSL) certificates enable encryption to improve your email server security. CyberPanel provides free, unlimited Let’s Encrypt SSL, which you can issue via the control panel dashboard.
To do so, go to SSL → MailServer SSL. Select your domain from the drop-down list, then click Issue SSL. The process might take a few minutes.
Setting up a reverse DNS helps improve message deliverability. It enables other mail servers like Gmail and Yahoo to track back your server IP address using the domain, bypassing the spam filters.
Hostinger users can set up a reverse DNS using PTR records via hPanel. Here are the steps:
Wait until the propagation process finishes. To check if your VPS IP address resolves to the correct domain, run this command on Terminal:
dig -x ip_address
Hostinger VPS users can set a reverse DNS for their server by asking Kodee AI assistant, “Set a reverse DNS for my VPS. The domain is mydomain.com and the server IP address is 123.0.0.1.” Remember to replace mydomain.com and 123.0.0.1 with their actual values.
After the server and domain are set, create your mail address. Open your CyberPanel dashboard and navigate to Email → Create Email.
Select the domain from the drop-down list. Enter your email address and password, then press Create Email.
To see all the email accounts, navigate to Email → List Emails on the sidebar. This menu also displays the SMTP and POP3/IMAP server configuration for setting up email clients like Thunderbird.
Integrating your SMTP mail server into your service helps improve deliverability and security.
Read our article to learn more about WordPress SMTP server setup and the best email provider for it.
Check whether your server works properly by sending emails. Here’s how to do so using CyberPanel’s built-in Webmail mail client:
For mobile devices, switch the Webmail user interface by enabling the Mobile version in your account settings.
In addition, test your email server’s spam score. To do so, use an online tool like Mail Tester, which will rate your email deliverability from the recipient server side.
When using this tool, ensure your test emails are long enough and don’t contain words like test. Otherwise, the anti-spam filter might falsely flag them, negatively impacting the score. Then, expand the report to see suggested areas of improvement, like configuring spam protection software.
Moreover, use Kodee, our AI assistant, to help identify deliverability problems and their solutions.
Hosting email on a Linux server provides users with control and flexibility. It also offers higher performance, storage, and scalability than third-party services, making it suitable for businesses wanting to host many accounts.
In this tutorial, we have explained the steps of email server setup with your own domain. Here’s a recap:
Keep in mind that the process might differ depending on your hosting provider and server requirements. If you have a question, leave us a comment below. Good luck!
How to Make a TeamSpeak Server
How to Make a Minecraft Server
How to Set Up a Linux VPN Server
In this section, we will answer several questions about hosting a private email server.
It depends on your needs. Self-hosting your personal email server is worth the effort if you prioritize control, flexibility, and scalability. However, email hosting services are more suitable if you want a preconfigured and simple solution.
The cost of VPS email hosting depends on the provider. For example, Hostinger VPS plans start at 0/month. Also, consider other fees like domain subscriptions and software licenses.
We don’t recommend using a personal machine since setting up and maintaining it requires a lot of effort.
A self-hosted mail server is secure if you configure it properly, like installing an SSL certificate and enabling a firewall. Conversely, DIY email hosting is more prone to cyber attacks when misconfigured since the user is responsible for managing all the security aspects.
Comments
August 28 2024
what will be the limit of mails per hour / day for the self-hosted mail server on hostinger vps with almalinux with cyber panel? do cyberpanel will charge me for smtp mails?
September 05 2024
Hello! For a self-hosted mail server on Hostinger VPS with AlmaLinux and CyberPanel, there aren't any specific restrictions from Hostinger on the number of emails you can send per hour or day. However, it's crucial to manage your server resources properly to avoid being flagged as spam. While CyberPanel doesn't charge for sending SMTP emails, it's essential to configure your server according to best practices to prevent potential issues ;)