Ruin The assorted ramblings of Brendan Tobolaski

Using a Mac Mini as a server

As some of you may know, Iʼve used a Mac Mini as a server. There are a couple of different providers that will host a Mac Mini in a datacenter for you, Mac Mini Colo and Mac Mini Vault. I used Mac Mini Vault mainly for the Rent to Own option. There are a couple of well known people that hosts their sites on a Mac Mini: Brett Terpstra and Ben Brooks.

The most obvious thing that having a Mac Mini server gets you is a server that runs OS X. The Mac Mini is one of only 2 Macs that you could host in a data center and therefore one of only 2 “servers” that can legally run OS X. This can be extremely useful. There is OS X Server where you can run a number of different server type things such as email or web sites. There is also Mamp (which Mac Mini Vault will give you a license for) for hosting multiple PHP and MySQL websites. All of this means that its extremely easy to get a server up and running for yourself. It can also be useful for running things like SpamSeive or Apple Mail rules continuously.

The downside of running OS X on a server is that you do lose some performance. Its also a bit harder to get more exotic setups than just Apache, PHP and MySQL. The best way to manage you Mac Remotely is by using a Remote Desktop connection. This does make if very easy to get started with a server but, its not very convent to have to use the GUI to configure your server. Since it is a remote connection, there is inherently a bit of lag which can grow to be quite severe.

Fortunately, there are a few other options. Mac Mini Vault will install an alternative OS on your Mac Mini. The options include ESXi, Windows Server and Ubuntu. While it may be tempting to use it as an ESXi host, it will give up a considerable amount of performance. I started out using OS X on my Mac Mini and eventually I decided to run Ubuntu 12.04 on it. The benefit to this approach is that you are able to use standard linux tools to manage your server. Iʼm very comfortable with managing Linux servers. It can also give you better performance as many software stacks are tuned for running on Linux.

It is not without its drawbacks. While running Ubuntu on Mac Mini does perform very well, its performance isnʼt great. The Mac Minis run a generation old mobile cpu. For my use case, the Mac Mini is fairly slow. I serve my website over https because I value my readerʼs privacy. Establishing ssl connections on a Mac Mini is quite slow. It only manages around 200/s. Thats quite a bit more traffic than this site receives but, in comparison to vps servers, its pretty bad even considering the price. This is mostly my fault as I chose the base model but, even if the server model doubles the performance, its not good. A $20 Linode can manage at least 300 connections per second. $20 is cheaper than either the Mac Mini Colo or the Mac Mini Vault colocation plans.

The performance characteristics of Mac Mini are a little bit strange. I chose to install the maximum amount of ram, 16 Gb. As mentioned before, the cpu is quite weak. If you happen to have a very memory intensive application, this is great. If not, youʼll get much better performance by simply spending an extra $10 a month on a Linode.

Another challenging issue with using Ubuntu on a Mac Mini is that you are basically managing a bare metal server. VPSs are much more convent as you never need to worry about messing up. If you do, you are able to just create a new server and not repeat the same mistake. With a bare metal server or Mac Mini, you donʼt have that luxury. If you mess something up, you need to wait for support to fix it for you. I did this once. Mac Mini Vaultʼs support was great but, I happened to mess up my server during non-support hours. If I had been using Linode, I could have just fired up a new server and gotten everything up and running in a few minutes.

All in all, I donʼt think its a good idea to use a Mac Mini as a server unless you have special circumstances that make it a requirement. If you feel that you need to own your serverʼs hardware, then it is a great option. The other reason that you might want to run a Mac Mini server is if you need to have a server that runs OS X. Its a great option for a build server or if you want an extremely easy to manage web server. It appears that Apple let slip that its going to rev the Mac Mini very soon. Assuming that they upgrade the cpu options, it may be a great server option. Iʼll probably go back to using it.