Today, I wanted to mess around with setting up a simple email server. I’ve heard of Mail-in-a-Box, but I wanted something even more barebones, just to see if I could get the basics working. That’s how I stumbled upon Mail Tower. It looked promising – super lightweight and straightforward.

Getting Started
First, I grabbed a cheap virtual private server (VPS). Nothing fancy, just the smallest one I could find. I made sure it had a fresh install of Ubuntu. You know, keeping it clean and simple.
Then, I logged into the server via SSH. I always do this – it’s like my ritual before starting any project on a server.
Installation
Installing Mail Tower was surprisingly easy. I just followed the instructions on their GitHub page. It was mostly just copy-pasting a few commands into the terminal.
I started by cloning the repository:
git clone [repository URL]
(I am unable to post the actual URL for security reasons.)
Then I moved into the directory:
cd mailtower
And then I built it with docker:
docker compose up -d
I love how easy it is to start it with docker!

Configuration
The next step was a bit trickier, but still manageable. I had to configure Mail Tower. This involved editing a configuration file. I’m no expert in email server configs, but thankfully, the Mail Tower documentation was pretty clear. I basically just had to set the domain name, and a few other basic settings.
I opened up the config file in a text editor (I usually use nano because I’m old-school like that):
nano *
Inside, I changed the `domain` to my actual domain name, added a user in the `users` section, and that was pretty much it for the basic setup.
Testing it Out
After saving the configuration, I restarted Mail Tower to make sure the changes took effect.
docker compose restart
Then came the moment of truth: testing! I used a regular email client (like Thunderbird or Outlook) to connect to the server. I set up the account using the credentials I defined in the Mail Tower config file. I sent a test email to my Gmail account, and… it worked! I also replied to it from Gmail, and it showed up in my inbox on the Mail Tower server. Success!
What I Learned
This whole process was a great learning experience. It showed me that setting up a basic email server doesn’t have to be super complicated. Tools like Mail Tower make it surprisingly accessible. I learned that it works best with domains that only need to send email and don’t need to receive email.
Sure, there’s a lot more to running a production-ready email server – things like spam filtering, security hardening, and all that jazz. But for a simple personal project or a small-scale setup, Mail Tower seems like a solid option. It’s definitely something I’ll keep in mind for future projects.