[Support] binhex - MinecraftServer


Recommended Posts

Just installed this docker and whenever I try to start it, it fails about 20 seconds in. I get the following error message:

 

error: failed to initialize alpm library:
(root: /, dbpath: /var/lib/pacman/)
could not find or read directory

 

*Fixed*

Setting privileged mode to "on" solved the issue.

Edited by Berstuck
  • Thanks 1
Link to comment
Just installed this docker and whenever I try to start it, it fails about 20 seconds in. I get the following error message:
 
error: failed to initialize alpm library:
(root: /, dbpath: /var/lib/pacman/)
could not find or read directory
 
*Fixed*
Setting privileged mode to "on" solved the issue.
The real fix is to update to 6.9.2, is related to runc issue see sticky posts at the top of this thread.

Sent from my CLT-L09 using Tapatalk

  • Thanks 1
Link to comment
7 hours ago, NLS said:

I haven't managed to make my Crafty server work outside of my LAN (and VPN).
I tried both with reverse proxy (swag) and with service entry in external DNS.

 

I must be missing something.

 

Did you set up port forwarding? Just to make sure. Did you fill out server IP in your server properties?

Link to comment

As far as i understand, the most common way is to forward 25565 to the docker container. A whitelist can also be set.

Since the reverse proxies i know only work for 80 and 443, they don't work for the minecraft server.

 

Is port forwarding to a container safe enough or are there better solutions?

 

Thanks and have a good day.

 

 

Link to comment

- Of course I have forwarded 25565.

 

- Reverse proxies don't only work for 80 and 443, but anyway I didn't use it.

 

- Whitelist where?

 

- Server IP in what server properties? Crafty? I tried that with 127.0.0.1 and 0.0.0.0. No difference. Both work OK in my LAN. Also tried with container in Bridge and Host (as it doesn't conflict in any port). To be honest I don't remember all the things I tried.

 

 

Link to comment

... i use a different container, so i cannot help with crafty.

 

What are the Port Mappings (App to Host) when the container runs?

 

Whitelisting is something one can use within binhex minecrafserver docker, in order to limit players, but as said, probably not your case.

 

So which reverse proxies could i use for my mc server?

 

 

Link to comment

I was just giving MC server 1.18 pre 4 a try and found the required Java version runs into a conflict in the layers of support.

 

Relevant log:

2021-11-17 21:15:57.321425 [info] JAVA_VERSION defined as '17'
2021-11-17 21:15:57.338131 [warn] Java version '17' not valid, defaulting to Java version 'latest

 

I suspect latest has a max (currently 16) and that max aligns with stable release and not anything pre.

 

I don't know the reasoning behind the need for version 17.  Only that its required as documented here: https://minecraft.fandom.com/wiki/Java_Edition_1.18_Pre-release_2 and that the minecraft instance seems to be dead on container start further supporting its needed.  I don't see any logging showing any issues for the container.  The web UI has this post:
 

There is no screen to be attached matching minecraft.

 

Update:

After looking at the build script https://github.com/binhex/arch-minecraftserver/blob/245160ea1a0c347d32dba70f67a67d4c5ac76b51/build/root/install.sh I believe its just one of those timing of build container things where at time of build latest was 16, but around October 23 it seems pacman had 17 available.  This MC container was built on Oct 17th.  A re-build should capture that version 17 and whalla.

 

I also newly discovered while playing around with this that MC 1.18 has a release date of Nov 30th.

Edited by Sn3akyP3t3
Link to comment

Played around with this for about an hour and found a way to run the non-release builds of Minecraft server fairly easily.  Getting version 17 of Java was indeed solved by just capturing a new docker build binary, but looks like the script under /build/root/install.sh needs some additional configuration settings to target the non-release versions of Minecraft server.

 

The down side of this is that MC pre-release versions of the server are churning really quickly now and if you're using the MC launcher you don't have any control of the client version offered (always latest... thanks a lot Microsoft!) forcing a new build of the server's docker container to maintain compatibility.  Still fun to play around with though.

 

The attached patch reveals the code change necessary and an example of the docker build command needed to pick which MC server version wanted to pack into the docker container.0001-Change-target-release-of-MC-server-to-snapshot-and-p.patch

Pick the desired snapshot name from the list of available versions from here https://launchermeta.mojang.com/mc/game/version_manifest_v2.json

 

To make use of the newly built container I installed the official docker registry https://hub.docker.com/_/registry/ on UnRaid.  You can probably just get the app store similar wrapped version in the app store.  Just search registry.

 

Ran the following commands:
 

docker tag arch-minecraftserver_local localhost:5000/arch-minecraftserver_local
docker push localhost:5000/arch-minecraftserver_local

 

Then used the existing arch-minecraftserver template to add a new server to test out 1.18.  Changed the repository to grab the local registry version just pushed recently.  Also +1 to each of the two ports.  JAVA_VERSION doesn't need changing from latest (also works with 17 if ya happen to gots some of that there OCD).

 

From here its just a matter of launching Minecraft and under multiplayer you specify your network connection with this pseudo syntax:

Quote

UnraidIpAddress:Port1

Using the above technique will let you run multiple MC servers on UnRaid all dockerized.  As many as you got resources to allocate for.  This also makes for fun experiments and checking out those special game seeds like Pillager Outpost.

0001-Change-target-release-of-MC-server-to-snapshot-and-p.patch

Edited by Sn3akyP3t3
Link to comment

@NLS I'm not familiar with Crafty Server, but I've been struggling to get reverse proxy to work with my setup at home and I found the reason I can never get it to work is because of my ISPs over the past decade have been either mobile carrier hotspot plans or Starlink.  Both of which are limited due to use of GGNAT.  If that applies to you then try getting around that limitation with ngrok https://ngrok.com/ or Cloudflare https://blog.cloudflare.com/tunnel-for-everyone/.  I've not tried Cloudflare so I can't say it is applicable to anything beyond serving web pages.

 

If you are able to use reverse proxy I would suggest using the user defined custom network option described in this video.  Keep in mind the video is a bit dated, but can be applied to swag as a drop-in replacement.

 

Also, it sounds like there might be a little bit of gross conceptual error going on with how Docker works just from observation of the last comments on server IP properties.  There are tons of resources explaining this and it can be experimented with as well to reveal lots of information, but this is a helpful video about Docker as it pertains to Unraid in case it helps you:

 

 

Link to comment

In preparation for Minecraft 1.18 I have bumped up the version of Java from 16 to 17 in the latest image. My understanding is that the current release 1.17 should work fine with Java 17, if you find this is not the case then please let me know

Sent from my CLT-L09 using Tapatalk

Link to comment
  • 2 weeks later...

I've set this up for my son and his friends, works well. I am not however a player so I'm not sure where to look....

 

Is there a way to pause or stop the world when no one is playing? Been running nonstop and my son is telling me its up to 11000 days! LOL Most of the time no one was playing.

Link to comment

Hey Guys, Following this thread has helped me tremendously. I had no issues running a 1.18 server, or running a 1.16.5 (preferred)

 

My biggest questions is How do I add mods to my server? I've tried adding the normal 'mods' folder with mods in there, like we would with standard Minecraft. I will normally use CurseForge to install and run my mods, not Forge. But it doesn't seem to load the mods when i restart the docker.

 

Does anyone know the best way to add mods to your server?

Edited by WildManAK
Link to comment
22 hours ago, WildManAK said:

Hey Guys, Following this thread has helped me tremendously. I had no issues running a 1.18 server, or running a 1.16.5 (preferred)

 

My biggest questions is How do I add mods to my server? I've tried adding the normal 'mods' folder with mods in there, like we would with standard Minecraft. I will normally use CurseForge to install and run my mods, not Forge. But it doesn't seem to load the mods when i restart the docker.

 

Does anyone know the best way to add mods to your server?

I don't have any immediate need or desire to play around with running a modded server, but in the coming month I probably will give it a shot just for sake of learning and seeing how bad resource consumption really is with some modded servers.  Also providing support in MC forums is somewhat necessary when mod questions come up so it would be helpful to have a test server available on demand.

 

I recommend you review some of the key points mentioned in this video:

being careful of course not to walk away with everything he says in that video pertains to this server install!  What I think you need to scrape from that video is mostly the steps needed to prepare a modded server to that folder he sets up on his desktop and move any necessary files over to the UnRaid folder where your server is running from.

 

The last piece i don't know how to solve yet is the Forge launch.  He runs a .bat file to kick it off, but perhaps you can read that and extract the flags used from there to use in a docker config in the Extra Parameters section.

Edited by Sn3akyP3t3
  • Like 1
Link to comment

hi everyone. minecraft noob here, wanted to set this server up for my boys, and i think i must be missing something (hopefully simple). just installed, pretty straightforward, but even on my LAN, i'm not able to connect to the server from an ipad on the same lan. 

 

local ip is 192.168.1.121, port is 25565, confirmed here in screenshots. 

801396455_2021-12-0511_30_18pm.png.a5a43020c79271738ecf6ccf6ffecb4d.pngIMG_3672.thumb.jpeg.a5d656080e4f6c78eb5095e361c18df7.jpegIMG_3674.thumb.jpeg.7b9705a5327f7cbf43bfea3068e3cf64.jpeg

 

it's not showing any ping at all, and won't connect when i click on it. aside from setting a web ui password, i left the container settings as default. i can connect to the web ui just fine, and the container log shows the ip of the machine connected to the webui just fine - i don't see any errors anywhere either. i'm trying to connect to the server from ios devices if that makes an difference. any help appreciated, happy to provide any info. thanks!

 

Link to comment
4 hours ago, Cpt. Chaz said:

i'm not able to connect to the server from an ipad on the same lan. 

you are running the wrong version of the server, you need bedrock edition, quote from mojang:-

Bedrock, or Bedrock Edition, is the version of Minecraft that brings together consoles, iOS/Android, and Windows 10. Bedrock originated as "Pocket Edition" (MCPE/PE), as it was originally only available on mobile devices.

go take a look in CA for the minecraftbedrockserver

  • Thanks 1
Link to comment
3 hours ago, binhex said:

you are running the wrong version of the server, you need bedrock edition, quote from mojang:-

Bedrock, or Bedrock Edition, is the version of Minecraft that brings together consoles, iOS/Android, and Windows 10. Bedrock originated as "Pocket Edition" (MCPE/PE), as it was originally only available on mobile devices.

go take a look in CA for the minecraftbedrockserver

Much appreciated!

Link to comment

Heads up to anyone with public facing Java MC servers hosted out there!  Got a vulnerability that any script kiddie out there can do in their sleep that's about as severe as it can get (full server control)!

 

Shut them down and apply the mitigation until a patch is rolled!  Do it right meow!

Full details and code example: https://www.lunasec.io/docs/blog/log4j-zero-day/

Borrowed explanation from MCEdit Discord

Quote

This vulnerability has the potential, with the right keystrokes, to allow anyone to run arbitrary code on your machine by writing something to the server chat. This vulnerability has been observed to exist since Minecraft 1.12. Un-whitelisted players can trigger this exploit even if they can't join.

 

As for right now and until Mojang can patch this exploit, here's how you can protect yourself (for both clients and servers): - Put this java argument into your launcher/server arguments (before the -jar flag): -Dlog4j2.formatMsgNoLookups=true

 

3rd party server software, like Spigot/Paper/etc. may have patches in-place for now but their patches won't be as effective in preventing this exploit like using the flag will and the extent at which their patches are implemented to fix this aren't 100% known.

 

  • Like 1
  • Thanks 1
Link to comment

In regards to the recent zero day log4j exploit found in Minecraft.  The client (old and new) is patched automatically when running the launcher so the only remaining thing to do is to ensure you're running MC server 1.18.1 to be fully patched.

If you choose to run an older version of MC server you're going to need to add an extra flag in the startup config as per
https://www.minecraft.net/en-us/article/important-message--security-vulnerability-java-edition

 

Happy safe and secure gaming!

  • Like 1
Link to comment

For those looking for version info to confirm this container is running the fixed version(according to this: https://www.minecraft.net/en-us/article/important-message--security-vulnerability-java-edition):

 

I couldn't find the version in the log for this docker container.

However, I went to the shell for the container and navigated to /config/minecraft/logs and found a file called latest.log

And in this file, near the top, I see this: [15:41:33] [Server thread/INFO]: Starting minecraft server version 1.18.1

So I think I'm good to go.

Link to comment
For those looking for version info to confirm this container is running the fixed version(according to this: https://www.minecraft.net/en-us/article/important-message--security-vulnerability-java-edition):
 
I couldn't find the version in the log for this docker container.
However, I went to the shell for the container and navigated to /config/minecraft/logs and found a file called latest.log
And in this file, near the top, I see this: [15:41:33] [server thread/INFO]: Starting minecraft server version 1.18.1
So I think I'm good to go.
Simpler way is to look at the tag name, go to OP click on docker hub link, go to tags tab, and yes latest is indeed the patched 1.18.1

Sent from my CLT-L09 using Tapatalk

Link to comment
17 hours ago, nraygun said:

For those looking for version info to confirm this container is running the fixed version(according to this: https://www.minecraft.net/en-us/article/important-message--security-vulnerability-java-edition):

 

I couldn't find the version in the log for this docker container.

However, I went to the shell for the container and navigated to /config/minecraft/logs and found a file called latest.log

And in this file, near the top, I see this: [15:41:33] [Server thread/INFO]: Starting minecraft server version 1.18.1

So I think I'm good to go.

 

Also a reminder for those who use a custom server jar that they have to update manually themselves. I grabbed the latest PaperMC server version that had the fix a few days ago and swapped it out on mine.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.