Web-server – Using the same VPS for web server and mail server

email-servervpsweb-server

I'm considering moving to a VPS for my web hosting needs (my own site and a few customers; nothing major – a few hundred visitors a day, and occasionally a few thousand).

Since I'm unhappy outsourcing my email to Google – and besides, their free service is no longer available to new domains and the paid one is unaffordable – I've been considering running my own mail server too. (Again nothing major, maybe 20 accounts across 5 domains and up to a hundred or so emails a day.)

So the obvious question I find myself facing is: are there any reasons not to use the same VPS for both?

Specifically:

  • Are there any security downsides to this arrangement I should be aware of?
  • Could this have a negative impact on reliability? The reliability of the mail server is more important, but of course the web server is important too.
  • Are there any other issues I should be aware of, or reasons why I would need to do things differently from if I was running two different servers?

Best Answer

You can run both mail server and web server in the same VPS, but considering that losing access to mail server these days is quite unacceptable, consider running a HA solution with two VPS so that you have access to email even if one of your servers fail. If you can't use a HA solution, at least run a backup MX server with decent spam filtering, so that you will not lose email when your primary MX is offline.

A common mistake when running webhosting is serving DNS from the same VPS/physical server as the web server, so when that server fails you cannot serve an "service offline" notice to visitors. If you run a secondary server as backup MX, run your secondary DNS server on it for added bonus.

Related Topic