Minecraft server on Java 18 for better support of LunaPixelStudios modpacks (Prominence and others).
1.7K

⚠️ The repo is no longer relevant for builds from "Luna Pixel Studios" since they now recommend using graalvm-jdk-21, which is available in the parent repo
itzg/minecraft-server:java21-graalvm.
This docker image is a completely identical build to itzg/minecraft-server, but on Java 18 from Eclipse Temurin.
ITZG only provides builds for LTS versions of Java 17 and 21, while the very popular modpacks from Luna Pixel Studios (Better MC, Prominence, Medival, etc.) recommend using Java 18. Thus, to achieve the best performance of these modpacks, it is better to use this image.
version: '3.8'
services:
minecraft:
image: dexogen/minecraft-server:latest
environment:
TYPE: CURSEFORGE
CF_SERVER_MOD: /path/to/modpack.zip
SERVER_PORT: 25565
EULA: "true"
DISABLE_HEALTHCHECK: "true"
ports:
- 25565:25565
volumes:
- modpacks/:/modpacks:ro
- data:/data
Whenever a release tag appears in the repository, an automatic build of the fresh image occurs.
latest latest multi-arch imagejava18 java specific image2024.4.0 and newer tags from repoPlease note that some Luna's modpacks conflict with the built-in mc-monitor check utility, so it must be disabled via parameter DISABLE_HEALTHCHECK: true. Otherwise, every few seconds you will see an error like this in the log:
2024-03-25T18:51:00.625447306Z [21:51:00] [Netty Epoll Acceptor IO Thread/ERROR]: Exception occurred in netty pipeline
2024-03-25T18:51:00.625464718Z io.netty.channel.unix.Errors$NativeIoException: recvAddress(..) failed: Connection reset by peer
The problem is most likely due to the server not listening to connections on localhost. It's quite possible that this can be solved by redirecting mc-monitor to an external address, or by manipulating global variables, but I haven't gotten around to that yet.
If you have a large amount of RAM, you can use some optimizations that helped me increase the stability of the servers.
environment:
...
MEMORY: "16G"
JVM_XX_OPTS: "-XX:+UseG1GC -XX:MaxGCPauseMillis=130 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=28 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=20 -XX:G1MixedGCCountTarget=3 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=0 -XX:SurvivorRatio=32 -XX:MaxTenuringThreshold=1 -XX:G1SATBBufferEnqueueingThresholdPercent=30 -XX:G1ConcMarkStepDurationMillis=5 -XX:G1ConcRefinementServiceIntervalMillis=150 -XX:G1ConcRSHotCardLimit=16"
...
In some modpacks, the global variable doesn't work, so you will need to add these options to the variables.txt file inside server folder.
Also note to three addons compatible with Luna Pixel Studios modpacks:
First two addons in my case also had a positive effect on the stability and speed of chunk generation. The third addon is very useful for pre-generating chunks before launching the server for players.
Content type
Image
Digest
sha256:8a64d5f8f…
Size
284.1 MB
Last updated
almost 2 years ago
docker pull dexogen/minecraft-server