Can I create my mail server on the same droplet that i am hosting my website on?

Posted October 29, 2019 18.9k views

I have my website on -let’s say on- droplet X
I want to create an email account say"“, how i can create it?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
6 answers

Hi @amiralbtal,

Since you haven’t mentioned what OS you are running on your droplet, I’ll take a guess and say it’s Ubuntu 18.04 since it’s the most used one.

I’ll recommend using Postfix to send out mails and configure mail accounts. Digital Ocean have a very good article on how to configure your mail server on a droplet - How To Install And Configure Postfix On Ubuntu


by Justin Ellingwood
by Hanif Jetha
Postfix is a popular open-source Mail Transfer Agent (MTA) that can be used to route and deliver email on a Linux system. It is estimated that around 25% of public mail servers on the internet run Postfix. In this guide, we'll teach you how to get up and running quickly using the Postfix mail server.

Hey guys!

Sorry for bothering, but the answer is not clear to me.
Is it possible to create a mail server on the same droplet that i am hosting my website on?
Im running Magento2 on Ubuntu 16.

Thank you in advance.

thanks for you fast reply!
i will give a try


“For the purposes of this tutorial, we will assume that you are configuring a host that has the FQDN of”

what’s suppose to mean?

“fully qualified domain name”. You are supposed to replace “” with your own domain name.

this is not the proper answer. is it yes or is it a no?

  • Yes, you can. A droplet is (almost always) a generic virtual machine on which you can install any kind of compatible software package (like any other computer). As such, you can install your web server (for your website) as well as your mail server.

    Be careful, however, that proper setup and configuration of a mail server takes time and patience, and maintenance, and a little of know-how with the operating system you chose (i.e. Ubuntu?).

    Since the question shows little knowledge about server administration, I would advice against doing it quickly or putting critical systems on a public server that is exposed to hackers.

    As mentioned before by other responses, Digital Ocean has excellent articles on how to setup the mail server. They can be a good place/reference to start.

    Good luck

    • I just went through the process of trying to build a mail server on a digital ocean droplet (I chose postfix, but I’ve also used exim4 in the past). I believe it is no longer feasible to run a mail server on digitalocean. My server was correctly configured with DKIM, SPF, a PTR record, a DMARC policy, and SRS for forwarded messages. The problem is that almost all of the IP addresses belonging to digital ocean are now tainted by being on various spam blacklists. I tried several different addresses, but the result was the same - mail was blocked by various services including,,, and (who uses for filtering). Note that our domain does NOT send any marketing emails. We only send receipts and news messages that users have explicitly signed up for. The problem is that digital ocean has had too many customers abuse the mail protocol to send spam, and as a result their address blocks now have such a bad reputation that you are unlikely to get your mail delivered. If you are intending to send spam then maybe this doesn’t matter to you since most of your mail will get ignored anyway. If you are intending to use mail for legitimate non-spam non-UCE purposes, then digitalocean is no longer viable.