Running your own mail server gives you full control over email management, privacy, and custom domains. Poste.io is a modern, easy-to-use, all-in-one mail server that runs inside a Docker container. It’s an excellent choice for individuals, developers, and small teams who want a self-hosted mail solution without the pain of complex setup.
Prerequisites
Before we begin, make sure you have the following:
A fresh Debian 11+/Ubuntu 20.04+ server
A domain name with DNS access (e.g.,
mail.example.com
)A user with sudo privileges
Docker and Docker Compose installed
Port 25, 80, 443, 587, and 993 open.
Install Docker (if not already)
Installation of Poste.io
This is the free version of the Poste.io. If you want a PRO version, refer to their page.
1.Create a directory where it will install the necessary data files:
mkdir -p ~/poste && cd ~/poste
2. Run docker image through CLI:
docker run -d \
--restart=always \
--net=host \
-e TZ=Europe/Prague \
-v /poste/data:/data \
--name "mailserver" \
-h "mail.example.com" \
-t analogic/poste.io
Change these to match your details:
-e TZ=Europe/Prague
-v /poste/data:/data
--name "mailserver"
-h "mail.example.com" Hostname for your mailserver
3. If done correctly, at the end you should see green sign.
Poste.io administration available at https://SERVER_IP:443 or http://SERVER_IP:80
If you see this page in your browser, congratulations, the Poste.io email application is now installed on your server!
Configuration
4. Initial Web Setup
Open the URL in your browser
Set the admin email and password
Configure your domain name (e.g.,
mail.example.com
)Choose storage options (defaults are fine for most users)
5. DNS Configuration
On your domain DNS manager, add the following records:
Type | Name | Value |
A | mail.example.com | Your server IP |
MX | @ (or blank) | mail.example.com (Priority 10) |
TXT | @ (or blank) | v=spf1 a mx ptr -all |
TXT | mail._domainkey | (from admin panel → DKIM) |
6. SSL Certificates
Poste.io can automatically obtain SSL via Let's Encrypt:
Go to Admin Panel → SSL Certificates
Click “Install Let’s Encrypt certificate”
Ensure port 80 and 443 are open and domain points correctly.
Conclusion
Congratulations! You now have a fully functioning, secure mail server using Poste.io on your Debian/Ubuntu server.
With this setup, you can:
Host custom email addresses (e.g., [email protected])
Manage users and domains from a clean web interface
Use SSL encryption, spam protection, and DKIM/DMARC
Send/receive emails using standard clients like Thunderbird or Outlook
Poste.io makes it easy to run your own mail server — without needing to configure every component manually. Perfect for power users, small businesses, or developers who want control and privacy.