User avatar
Gavinmc42
Posts: 2900
Joined: Wed Aug 28, 2013 3:31 am

Minecraft server

Sat Jan 19, 2019 8:25 am

Minecraft server needs a 64bit OS, will it work on a Pi3B+?
https://www.raspberrypi.org/forums/view ... 3&t=231618

Main dependency seems to be PHP.
The emerge version does not install the extensions Minecraft needs - bcmath, curl, pthreads, sockets, yaml, zip.

Probably best to run without X11 when/if it works?
But then will Pi minecraft clients be able to use the server?

Minetest Server on Pi?
What other multiplayer game servers could run on Gentoo64 Pi's?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

code_exec
Posts: 271
Joined: Sun Sep 30, 2018 12:25 pm

Re: Minecraft server

Sat Jan 19, 2019 9:48 am

Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.

https://github.com/CodeExecution/Ubuntu-ARM64-RPi

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

Re: Minecraft server

Sat Jan 19, 2019 11:05 am

I have my Minecraft Java Edition 1.12.2 "Creeper Pie" SMP server running on a Pi 3B+ using 32-bit Raspbian Lite OS (no GUI) with Oracle Java and SpigotMC. The server has been running for more than a year now (originally on a 3B). It's a private server for myself and a few friends, so it doesn't have a lot of players white-listed, but you're not going to be able to run a large multi-player server on a Pi anyway. For a small group of friends or family it works fine.

Not sure about the Pocket Edition server (never tried it).
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
Gavinmc42
Posts: 2900
Joined: Wed Aug 28, 2013 3:31 am

Re: Minecraft server

Sat Jan 19, 2019 11:26 am

Minetest works and being opensource is hackable ;)
Time to get more of my Pi's up and running to try multiplayer.
Also time to go through the Gentoo emerge list and try other stuff.

Been learning OpenGL to learn how to make games.
Cubeworld games looks like a good place to start.
Gentoo64 is also a new OS for me, so learning how it works is useful.
I guess I can add , learn to make multiplayer games to my list of things to try.
These little toys of Eben's are keeping me busy.

Not a Minecraft fan or Gentoo/PHP expert, so will leave this to someone else to try to get running.
Isn't the Bedrock Minecraft versions different tech, not Java?
Previously I found Java a bit slow on Raspbian, not really usable until the 4 core Pi's came out.
And since then Baremetal with OpenGLES, EGL etc have proven just as good and smaller than Raspbian with JavaFX :D

I have yet to try Java in Gentoo64, but OpenJDK is installed. is Java in a 64 bit OS any better?
Wow lots of games listed, 882 of them, wonder how many will work, going to need a bigger SD card.
Trying to sort out dependencies will stretch my Gentoo skills.
Minecraft-server 1.13.2 is on the list of game servers, hmm bf1942, ut2004, QuakeET.
Attachments
Screenshot_2019-01-19_10-48-40.png
Screenshot_2019-01-19_10-48-40.png (250.94 KiB) Viewed 3623 times
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Minecraft server

Sat Jan 19, 2019 12:17 pm

Gavinmc42 wrote:
Sat Jan 19, 2019 11:26 am
Isn't the Bedrock Minecraft versions different tech, not Java?
Bedrock edition is written in C++ and since the Better Together update all compatible versions are referred to just as "Minecraft" now (including Pocket, Windows 10 and some console versions), while the original Minecraft is now Minecraft Java Edition, and other non-Bedrock/Better-Together versions have their own "Edition" names (PS3 Edition, etc.).
Minecraft-server 1.13.2 is on the list of game servers...
I tried the 1.13.2 server on my Pi and it failed hard (ridiculously slow). Even on the quad-core i7 with 8GB of RAM it's running on now it still chokes occasionally. SpigotMC is a much faster server for Java Edition and I've been meaning to update the 1.13.2 server to that (doubt it will run on a Pi even then, but it should help the "Broken Laptop" server run better).
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
sakaki
Posts: 204
Joined: Sun Jul 16, 2017 1:11 pm

Re: Minecraft server

Sat Jan 19, 2019 3:51 pm

Gavinmc42 wrote:
Sat Jan 19, 2019 8:25 am
Minecraft server needs a 64bit OS, will it work on a Pi3B+?
https://www.raspberrypi.org/forums/view ... 3&t=231618

Main dependency seems to be PHP.
The emerge version does not install the extensions Minecraft needs - bcmath, curl, pthreads, sockets, yaml, zip.

Just got the PocketMine-MP server running on gentoo-on-rpi3-64bit; brief instructions follow, in case anyone else is looking to do this.

Begin by downloading the 1.3.1 image (for instructions see link immediately above). Write the image to a microSD card, and boot your RPi3 with it. Ensure you have network connectivity, then open a terminal window and issue:

Code: Select all

[email protected] ~ $ sudo genup
to bring your system fully up to date. This may take around 4-5 hours to complete, but is necessary for the next step (easist thing is to leave it running overnight). Once done (you see the message "All done - your system is now up-to-date!"), install PHP plus the other deps required by PocketMine-MP:

Code: Select all

[email protected] ~ $ sudo emerge -v dev-lang/php dev-php/pecl-yaml dev-php/pthreads
These have all been pushed to the binhost, so this step shouldn't take too long (5 minutes or so).

Incidentially, I had to put together a (trivial, php-ext-source-r3 based) ebuild for pthreads, as it isn't currently in the Gentoo tree, and it won't build for php:7.3 either, so I've masked that back to php:7.2, and added a number of other required libraries via USE flag). The genup run mentioned above will pick up all these changes.

Once that's done, you can manually install PocketMine-MP (their bundled auto-install script doesn't work on Gentoo). Per the upstream instructions, as the regular (not-root) user, issue:

Code: Select all

[email protected] ~ $ mkdir pmmp && cd pmmp
[email protected] ~/pmmp $ wget -c https://github.com/pmmp/PocketMine-MP/releases/download/3.5.5/PocketMine-MP.phar
[email protected] ~/pmmp $ wget -c https://raw.githubusercontent.com/pmmp/PocketMine-MP/master/start.sh
[email protected] ~/pmmp $ chmod +x start.sh
[email protected] ~/pmmp $ ./start.sh
Answer the startup wizard questions, and you should be up and running! Screenshot (on an RPi3B+):

Image

Obviously, you'll need to set up port forwarding, access rules etc. if using a firewall / router.

Packaging this as an ebuild with a proper init script is left as an exercise for the reader ^-^

hth, sakaki

User avatar
Gavinmc42
Posts: 2900
Joined: Wed Aug 28, 2013 3:31 am

Re: Minecraft server

Sun Jan 20, 2019 3:56 am

Thanks Sakaki, yet another very comprehensive and educational post.
There is a world of difference between guessing it might work and knowing how to make it work :D
You definitely know how push these little Pi's and get the best from Gentoo.

A decade or so ago gamer's used to run lan parties, even then I was a little old with slow reflexes but I have been to a few of them.
Never thought that I would learn enough to even consider how to make Lan games from source or 3D graphics on $35 PC's.
Open Source games makes it easier to see how people construct the games :D
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Jangla
Posts: 1
Joined: Tue May 07, 2019 3:20 pm

Re: Minecraft server

Tue May 07, 2019 3:25 pm

That's a super helpful guide. I've managed to get almost all the way through it - almost - and I have less than 24 hours experience with a Pi and zero experience with Gentoo :)

I've been toying around trying to get a Minecraft server set up for my 7 year old daughter so she can access it from her Kindle Fire (I had her build the Pi and do as much of the software installation as possible) and it feels like we're pretty close now.

The one thing I'm unsure about; in the last section where we have to install PocketMine-MP, how do we add a non-root user to the Gentoo install in order to issue the commands? Told you I had zero experience with it :D

Edit: Managed to add a new user and ran the commands. Got this error when running the start.sh script:

Code: Select all

/usr/bin/php: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by /usr/bin/php)

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

Re: Minecraft server

Thu May 09, 2019 7:37 am

Hi Jangla,

what version of the glibc library do you have installed? To check, run:

Code: Select all

[email protected] ~ $ eix --installed --exact sys-libs/glibc
If < 2.29 is indicated as the installed version, try upgrading it. Ensure you have network connectivity, then issue (first):

Code: Select all

[email protected] ~ $ sudo eix-sync
Let this run to completion - it may take a little while. Then:

Code: Select all

[email protected] ~ $ sudo emerge --verbose --oneshot --update sys-libs/glibc
When that completes, reboot, then try running your minecraft server again.

hth, sakaki

Return to “Gentoo”