Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?
share|improve this question
    
How did you go with this. Any answers work for you? –  Drew Khoury Aug 22 '13 at 6:36

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
1  
I run a script every 5 minutes on my backup MX to check the state of the primary. If it is down, then it opens port 25 on the firewall, otherwise port 25 stays closed. No spam! –  fukawi2 Jul 18 '13 at 7:22
    
Thanks. Backup MX is certainly a consideration - for cost reasons I am hesitant to use a second VPS, but I guess I need something. I hadn't thought about the downside of DNS on the same machine; thanks for pointing that out - one more thing to think about! –  caesarsgrunt Jul 18 '13 at 21:11

are there any reasons not to use the same VPS for both?

There are plenty. Security. Reliability. Scalability.

Are there any security downsides to this arrangement I should be aware of?

Yes. Any vulnerability in one service could impact the security of the other service. For example, if your website allows uploads and you don't keep your CMS updated an attacker might gain access to your server, which includes emails.

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.

Yes. Spikes in one service could impact the other. For example if you run out of memory or storage on your server this would mean that your website and your email would be impacted. Also if the server goes down for any reason, both services are impacted.

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?

You should consider your backup and disaster recovery plan.

Should you do it (email and web on the same server)?

It's completely up to you to decide if the cost benefits outweigh the security, reliability & scalability ones.

Outsourcing your email can save you plenty of time (in planning, servers, backups, downtime, keeping up to date on best practice, spam messages, upgrades) and can certainly be done for free or at a very cost effective rate.

IMPORTANT NOTE

If you already have a Google Apps account you can add multiple domains to that and continue to enjoy FREE email.

For example if you had an account that previously allowed 50 free users, and you're only using 2 users currently ... you can add a domain and add a few (up to 48) new users for free.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.