Does it make any sense to colocate your own hardware for running a single Discourse instance?

Are there any preconditions for running a single Discourse instance on your own hardware (colocation), rather than renting a VPS (e.g. Digital Ocean) or a dedicated server (e.g. Softlayer or Hetzner)?

I’ve never had an experience managing my own server hardware, but from what I read, you need direct access to the premises for maintenance tasks like the following:

  • SSD / HDD replacement when they fail
  • hard reset if not available as a service
  • other tasks?

Does it worth the effort, or it is mostly a rigmarole for most communities, except very huge ones? Is there any community size that would make it worth the effort?

For example, a small community like ours with 2300 members and 200k-500k views per month runs smoothly on a $20/mo VPS + $10/100GB/mo Block Storage at Digital Ocean. In 2 years time, I’m likely to get even better hardware at Digital Ocean for the same money. Yet, if we do calculations for 2 years, it is $30 / mo * 24 = as little as $720 expenses. If we go the colocation way, just colocating might cost us ~$80 AUD / month, plus the price of the server hardware to colocate. Plus hardware replacement on failures. Looks like it is not worth the effort and the money invested AT ALL. But I might be mistaken — anyone can give any insight and advice?

This question is addressed to the ones who have experience colocating their own servers. Comments from the Discourse team are very welcome too!

1 Like

@codinghorror has done it – stuffed a little shuttle PC into a rack somewhere. I’m having trouble finding a write-up of it, though. It’s pretty darn cheap to do, although you’re basically saving money by increasing your risk and hassle factor, so whether it’s “worth it” is a very personal decision.


I never actually wrote that up formally…

:mega: Overall, colocation is only worth it if you have a pretty big, heavy, active Discourse instance – I’ve seen it be worth it for sites with very large 10GB + databases of posts dating back to 2003, for example.

If your site is small or only moderately active, $20/month (or less) is going to be a better deal, because that’s only $240/year. You can’t get much hardware for $240, even $480.

If you can find a place to cheaply colocate a ~$700 mini-pc – think the Mac Mini colocation services, but extended to cheaper hardware – I do think it’s worth it, bearing in mind the caveat above, this is only proper for fairly large, active Discourse sites. I would not bother colocating very low end hardware, when you can get a very fast Kaby Lake box with nice SSD for $700. Once the hardware is there, it will sit for years, so cheaping out in the beginning is like … cursing yourself. :mage: It’s not a good idea.

The other advantage is that the performance / storage speed of these mini-pcs is really quite high relative to the average $20/month cloud instance. But again that won’t matter a lot unless your instance is large or busy, or both!

Some ideas:

  • Colocate two boxes, so if one fails, you can just switch to the other one. Kind of a warm spare sort of thing. Upload the latest backup (obviously stored off-site on S3 or what have you) and you only lose 1 day of activity. But you’d be up and running within an hour, probably?

  • Colocate with a company that rents out their own stable of hardware servers, then if you have a fail, you’re only paying for them to switch out the box from their stable of existing hardware. Maximum downtime, probably a few hours. Cost per month will be higher though, but hey, no $700 (or $1500) up front investment! Trade-offs, they abound!

  • Buy two boxes, have the colocation center keep one on-hand. This way you can avoid any monthly costs as the other box won’t be connected to the Internet, just sitting nearby ready to spring into action when powered on; give the colocation center a call, swap the cables, power up and you’re back and running. Maximum downtime, a few hours, maybe?

  • Buy two boxes, keep one at home primed, updated, and ready to ship. Maybe the datacenter won’t allow you to keep a spare on site? This way if one fails you can deliver the pre-built replacement to the datacenter fast, maybe fedex overnight. Maximum downtime, two-ish days?

I do feel that modern hardware is pretty darn reliable, provided you go with a quality SSD vendor – I heartily recommend Samsung based on our experience using them. But, as they say, :poop: happens. In general, you need to decide how OK you are with outage / downtime lengths. That’s what you are betting against here. For some sites, two days, or two hours, of downtime might not be a big deal.

You’d need to research and decide what your budget is vs. your risk tolerance… and your willingness to be a sysadmin on your own site.