Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I ran a Minecraft server off a raspberry pi like this for a while. I had the VPS for another project, so stuff was running there, but Minecraft was just too much for it. On the other hand it could run on my pi, but my router wouldn't let me open that up to the internet. So I used SSH to tunnel from the VPS to the pi and it worked pretty well.

It's also a lot easier to show off demo projects like this - you don't need to copy everything to your VPS and figure out how to run it, you just need to have it running on your local machine (e.g. your development laptop) and let other people access that. Obviously that's not a great system for anything long-term, but if you just want to show a friend something you've made, it's quite useful.



What kind of VPS is less powerful than a pi?


Pi 4 has a dedicated quad core ARM A72 @ 1.5Ghz and up to 8GB of RAM.

A $5 VM from Digitalocean has 1vCPU and 1GB of RAM.


Can confirm for the specific task of a Minecraft server that a Pi4 beats the pants off the first few tiers of DO VPS. You have to get up to a cost equivalent of nearly buying a (bottom-tier) Pi per month to get close.

One problem with these VPS is contention for physical CPU between multiple tenants. Lots of CPU context-switching. Kills performance. You can get dedicated-CPU VPS, but at that point you're basically renting a fraction of a real server and the prices tend to be high.

A $100-$150 old x86 workstation or server off Ebay will do even better (I run several things, including a Minecraft server, on mine, and it performs great for all of it), but your power use will be much higher than with a Pi.


Also, Raspberry Pi 4 (Model B) costs ~35 USD as a one-time cost, the 5 USD VM from DigitalOcean is per month. If you're planning to run something for longer than ~7 months, you'll save money (and get better CPU/IO [not network probably though] performance) by going with the Pi instead of DigitalOcean.


The SD card in the Raspberry has to be purchased + wears out pretty fast if you utilize it.

The VPS power bill is already paid with its price. For the Raspberry you have to pay the power bill.

Here in Germany we now reach 40 Euro Cents/kWh. 5 Watts 24/7 are 17.52 Euro/Year 10 Watts 24/7 are 35.04 Euro/Year. The Raspberry is somewhere between.

That is the reason why I replaced my Dell t30 Server with two Contabo VPS servers. I also don't have to worry about my ISP screwing up my connection.


> The SD card in the Raspberry has to be purchased + wears out pretty fast if you utilize it.

Buy a high-endurance card or simply use external media if you have I/O heavy services you run on it.

> The VPS power bill is already paid with its price. For the Raspberry you have to pay the power bill.

True, but that cost is so small. Not sure if those German prices are accurate for most places, but where I live, it's nowhere near 0.40 EUR /kWh, so the cost of electricity per year is marginal at worst, unnoticeable at best.

> That is the reason why I replaced my Dell t30 Server with two Contabo VPS servers. I also don't have to worry about my ISP screwing up my connection.

Taking a look at Contabo (never seen them before), it seems their "Cloud VPS" is all virtual CPUs (not dedicated ones), so not really comparable.


That SD card quickly wearing out might be only relevant to Raspberrys before v4, because they could (try to) draw up to 15 W, while USB 2 could only deliver 2.5 or 7.5 W at best ?


I don't see how you can run a minecraft server on those specs. Just turning the draw distance will cause problems. Add a couple users and you are fucked.


It's fairly trivial to overclock Raspberry PI 4 (Model B) to ~2GHz if you have active cooling, and with a single one I've run Minecraft servers for ~5 players without hiccups. Of course it's not gonna be able to host large servers as the specs are low, but for the price, it works out well for small friend-groups.


It's hard! I only had two users consistently (myself and a friend, and occasionally guests but they taxed the system a lot so it wasn't very often), but I still even up having to fiddle around with a lot.

* As someone else said, overclocking helped, and I had a reasonable passive cooling case to help there.

* I used Paper instead of the normal Minecraft server, and I ended up spending a decent amount of time optimising the configuration. Paper by default comes with a bunch of optimisations, I enabled some more, although I also disabled some that were interfering with the more technical areas of Minecraft that I enjoy more.

* Whenever things started lagging, I went on a killing spree for our main farms, and that tended to work well enough. Most of our contraptions were turned off by default, or designed not to be too laggy. I also restarted the server every night, which worked reasonably well as a sort of ultimate GC.

If I were going to do it again more seriously, I'd probably get a cheap mini PC and use that instead, but for what it was - me and a friend rediscovering Minecraft after having not played it probably in about 5-10 years - the pi4 held up pretty damn well.


VPSes usually have "virtual CPUs", meaning they are shared between people who rent "virtual CPUs" at that hosting company. When you have a Raspberry, you most certainly have a dedicated CPU. This makes a big difference in terms of consistent performance, you always know how fast it can go and won't suddenly perform worse because your "neighbor" on the VPS hosting is also using a lot of CPU.

This is also why dedicated instances are usually way better for performance-sensitive hosting compared to beefier VPS instances.


> > I had the VPS for another project, so stuff was running there, but Minecraft was just too much for it

Presumably the pi is just running Minecraft


T4g.nano has 2vcpus at 5% "baseline utilization" (=sustainable utilization). That is not very much. Also only .5GB memory


Wouldn’t the game need a udp connection and isn’t that not doable w the ssh tunnel ?


Last time I checked, minecraft uses TCP for its connections, which explains a lot of the performance issues with multiplayer minecraft. But games generally uses UDP, so it's a fair assumption to make.


IIRC the original Java version uses TCP and the bedrock one UDP.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: