https://github.com/hpi-swa/native-minecraft-server Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Copilot + Packages + Security + Code review + Issues + Discussions + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Skills + GitHub Sponsors + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} hpi-swa / native-minecraft-server Public * Notifications * Fork 2 * Star 128 Use GraalVM Native Image to turn the Minecraft server into native executables that are small in footprint, fast, and cheap to deploy. medium.com/graalvm/ native-minecraft-servers-with-graalvm-native-image-1a3f6a92eb48 License MIT license 128 stars 2 forks Star Notifications * Code * Issues 2 * Pull requests 0 * Actions * Security * Insights More * Code * Issues * Pull requests * Actions * Security * Insights hpi-swa/native-minecraft-server This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 0 tags Code * Clone HTTPS GitHub CLI [https://github.com/h] Use Git or checkout with SVN using the web URL. [gh repo clone hpi-sw] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @jgrenda jgrenda Add project files ... b7300a3 Sep 1, 2022 Add project files b7300a3 Git stats * 2 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows Add project files Sep 1, 2022 assets Add project files Sep 1, 2022 configuration Add project files Sep 1, 2022 .gitignore Add project files Sep 1, 2022 LICENSE Initial commit Aug 11, 2022 README.md Add project files Sep 1, 2022 build.sh Add project files Sep 1, 2022 View code Native Minecraft Servers with GraalVM Native Image Getting Started How It Works Limitations and Known Issues Contributions License README.md Native Minecraft Servers with GraalVM Native Image Build Native Minecraft Server Banner The Minecraft server is known to require a lot of CPU and memory resources and can be hard to deploy. This project makes it possible to compile the Minecraft server into a self-contained native executable using GraalVM Native Image. As such, it is supposed to require fewer CPU and memory resources, provide better startup times, and be easier and cheaper to deploy. A native Minecraft server is less than 120MB in size, and with that significantly smaller than Minecraft's server.jar plus a JDK required to run it. With upx compression, the size of the native executable can be reduced even further to less than 40MB, which is smaller than just the server.jar. Initial experiments also suggest competitive run-time performance with a reduced memory footprint. For best results, build with GraalVM Enterprise Native Image, which provides better performance and lower memory usage than the Community Edition, and try out the G1 GC and Profile-Guided Optimizations. The Oracle Cloud Free Tier not only provides four Ampere A1 cores and 24 GB of RAM always free, which is plenty for hosting a Minecraft server, but also free access to GraalVM Enterprise. Check out this blog post for more information. Disclaimer: This project is meant for demonstration purposes only and intended to help the Minecraft community evaluate the use of GraalVM Native Image. Please use at your own risk. Getting Started 1. Download GraalVM Community or Enterprise (GraalVM 22.2.0 or later is required). Optional: make sure upx is on your $PATH to enable compression. 2. Download or check out this repository and run the build.sh. 3. Launch the native Minecraft server with ./ native-minecraft-server. The first time you run the server, you will have to follow the regular procedure of accepting Minecraft's EULA. How It Works This project only contains the build.sh script and reachability metadata for building a native Minecraft server. The build.sh script first downloads Minecraft's server.jar and extracts jars and other resources from it. Afterward, it invokes GraalVM Native Image with an appropriate configuration to generate a native version of the Minecraft server. Finally, and only if upx is on the $PATH, the script will compress the native executable. Limitations and Known Issues * The configuration currently only supports Minecraft 1.18.2. * The server GUI is not yet supported. * Mods are currently not supported. * There is no build script for Windows yet, but the WSL should work. * The native executable sometimes fails on startup. Restarting it a few times usually helps. Error: com.mojang.datafixers.types.templates.List$ListType cannot be cast to java.lang.Comparable. Contributions Please report any issues here on GitHub and open pull requests if you'd like to contribute to the project. License This project is released under the MIT license. About Use GraalVM Native Image to turn the Minecraft server into native executables that are small in footprint, fast, and cheap to deploy. medium.com/graalvm/ native-minecraft-servers-with-graalvm-native-image-1a3f6a92eb48 Topics minecraft minecraft-server graalvm graalvm-native-image Resources Readme License MIT license Stars 128 stars Watchers 11 watching Forks 2 forks Languages * Shell 100.0% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.