ThatoneAJ
Posts: 3
Joined: Wed Oct 30, 2019 11:13 pm

Minecraft Server

Wed Oct 30, 2019 11:21 pm

I recently have gotten a raspberry pi 4 with the hopes of setting up a Minecraft server, but I have no idea how, could someone please give me a step by step tutorial on how to set up a server on the pi 4?

User avatar
HawaiianPi
Posts: 5838
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Minecraft Server

Thu Oct 31, 2019 12:54 am

For which version of Minecraft?

I ran a Java Edition 1.14.4 test server on a Raspberry Pi 4B 2GB for couple of months and was disappointed with the results. It was playable, but there were annoying lag spikes and rubber-banding. My 9-year-old broken Sony laptop works much better.

I've been meaning to try it again with a 64-bit OS and 4B4, but I haven't had the time.

On the other hand, I have a Java 1.12.2 SMP server that's been running since 2017 on a 3B (now a 3B+) which works well.
Image
(SpigotMC with Oracle Java 8, Raspbian Lite, headless)
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?


ThatoneAJ
Posts: 3
Joined: Wed Oct 30, 2019 11:13 pm

Re: Minecraft Server

Fri Nov 01, 2019 11:29 pm

HawaiianPi wrote:
Thu Oct 31, 2019 12:54 am
For which version of Minecraft?

I ran a Java Edition 1.14.4 test server on a Raspberry Pi 4B 2GB for couple of months and was disappointed with the results. It was playable, but there were annoying lag spikes and rubber-banding. My 9-year-old broken Sony laptop works much better.

I've been meaning to try it again with a 64-bit OS and 4B4, but I haven't had the time.

On the other hand, I have a Java 1.12.2 SMP server that's been running since 2017 on a 3B (now a 3B+) which works well.
Image
(SpigotMC with Oracle Java 8, Raspbian Lite, headless)
I would like a 14.4 but if that is lagy whatever would run better on a 4

User avatar
HawaiianPi
Posts: 5838
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Minecraft Server

Sat Nov 02, 2019 9:37 am

ThatoneAJ wrote:
Fri Nov 01, 2019 11:29 pm
I would like a 14.4 but if that is lagy whatever would run better on a 4
My test server was made when 32-bit Raspbian was the only OS and I could not get a 4GB model. It might work better with a 64-bit OS and Java on a 4GB Pi4, but like I said above, I just haven't had the time to try it (I do have a 4GB now).

There's a 64-bit kernel and multi-arch support in Raspbian that I just started playing with tonight. Not sure if it will do what we want. If not, then there's Sakaki's 64-bit Gentoo, but you'll have to check if the RAM limit bug was fixed. I'll play with this as time allows.

If you want to give this a try yourself, I suggest you use the SpigotMC server. It's much faster than the Mojang server (and more versatile). They have an easy to use build tool (BuildTools.jar), so it's not hard to get Spigot up and running.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
bomblord
Posts: 266
Joined: Sun Jul 14, 2019 2:54 am

Re: Minecraft Server

Sat Nov 02, 2019 8:34 pm

I've run some stress tests and this was my setup using the Mojang provided Server.

- 4GB Pi 4 overclocked to 1.75GHZ (with a Flirc case for cooling I've since upped that to 2ghz)
- Command line only 64 bit Ubuntu
- Ethernet connection
- External 256GB SSD that the Minecraft server was running off. This was to make sure I wasn't being limited by the R/W speed of the SD card.

I also made a few tweaks to the server settings to eke out a bit more performance
- Launched with 2GB reserved and a max of 4GB
- Set a max world size of 2048. That keeps world complexity and file sizes down so you're not loading too much into RAM at once I wanted to do 1024 but certain structures only spawn further out.
- Set max rendering distance to 5 chunks. You can set this lower to make it better but I felt like that was the best trade-off between playability and performance

As far as I'm concerned this is the absolute best case scenario and with 2 people on there was no measurable lag during normal play. We walked around in adventure mode at night, mined blocks, and fought an abnormally large number of mobs. To further stress it we set up a large sphere of TNT and it went off without a hitch. Flying off in a random direction to force it to load and generate new chunks also kept up even at max flying speed. However, when I combined new chunk generation with another TNT sphere it did slow down new chunk generation to slightly slower than sprinting speed until the TNT finished going off.

Hope that helps let me know if you have any questions!

User avatar
sakaki
Posts: 548
Joined: Sun Jul 16, 2017 1:11 pm

Re: Minecraft Server

Mon Nov 04, 2019 12:20 am

HawaiianPi wrote:
Sat Nov 02, 2019 9:37 am
If not, then there's Sakaki's 64-bit Gentoo, but you'll have to check if the RAM limit bug was fixed. I'll play with this as time allows.
So, the full RAM has been available via gentoo-on-rpi-64bit since v1.5.0 (shipped Aug 15th) (the current release is v1.5.1).

hth, sakaki

User avatar
HawaiianPi
Posts: 5838
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Minecraft Server

Mon Nov 04, 2019 1:47 am

sakaki wrote:
Mon Nov 04, 2019 12:20 am
So, the full RAM has been available via gentoo-on-rpi-64bit since v1.5.0 (shipped Aug 15th) (the current release is v1.5.1).

hth, sakaki
Thanks for the info, and all your work on Gentoo!
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

ThatoneAJ
Posts: 3
Joined: Wed Oct 30, 2019 11:13 pm

Re: Minecraft Server

Sat Nov 23, 2019 7:09 pm

HawaiianPi wrote:
Sat Nov 02, 2019 9:37 am
ThatoneAJ wrote:
Fri Nov 01, 2019 11:29 pm
I would like a 14.4 but if that is lagy whatever would run better on a 4
My test server was made when 32-bit Raspbian was the only OS and I could not get a 4GB model. It might work better with a 64-bit OS and Java on a 4GB Pi4, but like I said above, I just haven't had the time to try it (I do have a 4GB now).

There's a 64-bit kernel and multi-arch support in Raspbian that I just started playing with tonight. Not sure if it will do what we want. If not, then there's Sakaki's 64-bit Gentoo, but you'll have to check if the RAM limit bug was fixed. I'll play with this as time allows.

If you want to give this a try yourself, I suggest you use the SpigotMC server. It's much faster than the Mojang server (and more versatile). They have an easy to use build tool (BuildTools.jar), so it's not hard to get Spigot up and running.
I am fairly new to the pi could you please create a step by step, that would be amazing

Return to “Gaming”