{"id":18699010,"url":"https://github.com/hpi-swa/native-minecraft-server","last_synced_at":"2025-04-07T16:17:51.233Z","repository":{"id":74840523,"uuid":"530238260","full_name":"hpi-swa/native-minecraft-server","owner":"hpi-swa","description":"Use GraalVM Native Image to turn the Minecraft server into native executables that are small in footprint, fast, and cheap to deploy.","archived":false,"fork":false,"pushed_at":"2022-09-01T13:51:52.000Z","size":102,"stargazers_count":368,"open_issues_count":0,"forks_count":9,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-03-31T15:18:09.185Z","etag":null,"topics":["graalvm","graalvm-native-image","minecraft","minecraft-server"],"latest_commit_sha":null,"homepage":"https://medium.com/graalvm/native-minecraft-servers-with-graalvm-native-image-1a3f6a92eb48","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hpi-swa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-29T13:44:10.000Z","updated_at":"2025-03-30T00:29:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6270c1d-6045-48d2-b77d-d03cba47bc59","html_url":"https://github.com/hpi-swa/native-minecraft-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpi-swa%2Fnative-minecraft-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpi-swa%2Fnative-minecraft-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpi-swa%2Fnative-minecraft-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpi-swa%2Fnative-minecraft-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hpi-swa","download_url":"https://codeload.github.com/hpi-swa/native-minecraft-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247685628,"owners_count":20979085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graalvm","graalvm-native-image","minecraft","minecraft-server"],"created_at":"2024-11-07T11:30:42.841Z","updated_at":"2025-04-07T16:17:51.212Z","avatar_url":"https://github.com/hpi-swa.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Native Minecraft Servers with GraalVM Native Image\n\n[![Build Native Minecraft Server](https://github.com/hpi-swa/native-minecraft-server/actions/workflows/main.yml/badge.svg)](https://github.com/hpi-swa/native-minecraft-server/actions/workflows/main.yml)\n\n![Banner](./assets/graalvm_native_image_minecraft_banner.jpg)\n\nThe Minecraft server is known to require a lot of CPU and memory resources and can be hard to deploy.\nThis project makes it possible to compile the Minecraft server into a self-contained native executable using [GraalVM Native Image][ni].\nAs such, it is supposed to require fewer CPU and memory resources, provide better startup times, and be easier and cheaper to deploy.\n\nA 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.\nWith [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`.\nInitial experiments also suggest competitive run-time performance with a reduced memory footprint.\nFor best results, build with [GraalVM Enterprise][ee] Native Image, which provides better performance and lower memory usage than the Community Edition, and try out the [G1 GC][g1gc] and [Profile-Guided Optimizations][pgo].\nThe [Oracle Cloud Free Tier][oci-free] not only provides four Ampere A1 cores and 24 GB of RAM always free, which is plenty for [hosting a Minecraft server][oci-minecraft], but also free access to GraalVM Enterprise.\n\nCheck out [this blog post][blog-post] for more information.\n\n*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.*\n\n## Getting Started\n\n1. Download GraalVM [Community][ce] or [Enterprise][ee] *(GraalVM 22.2.0 or later is required)*.  \n*Optional: make sure [upx] is on your `$PATH` to enable compression.*\n2. Download or check out this repository and run the [`build.sh`](build.sh).\n3. Launch the native Minecraft server with `./native-minecraft-server`.  \n*The first time you run the server, you will have to follow the regular procedure of accepting Minecraft's EULA.*\n\n## How It Works\nThis project only contains the `build.sh` script and [reachability metadata][metadata] for building a native Minecraft server.\nThe `build.sh` script first downloads Minecraft's `server.jar` and extracts jars and other resources from it.\nAfterward, it invokes GraalVM Native Image with an appropriate configuration to generate a native version of the Minecraft server.\nFinally, and only if [upx] is on the `$PATH`, the script will compress the native executable.\n\n## Limitations and Known Issues\n\n- The configuration currently only supports Minecraft `1.18.2`.\n- The server GUI is not yet supported.\n- Mods are currently not supported.\n- There is no build script for Windows yet, but the [WSL] should work.\n- The native executable sometimes fails on startup. Restarting it a few times usually helps.  \n*Error: `com.mojang.datafixers.types.templates.List$ListType cannot be cast to java.lang.Comparable`*. \n\n## Contributions\nPlease [report any issues here on GitHub][issues] and open pull requests if you'd like to contribute to the project.\n\n## License\nThis project is released under the [MIT license](./LICENSE).\n\n\n[blog-post]: https://medium.com/p/1a3f6a92eb48\n[ce]: https://github.com/graalvm/graalvm-ce-builds/releases/latest\n[ee]: https://www.oracle.com/downloads/graalvm-downloads.html\n[g1gc]: https://www.graalvm.org/22.2/reference-manual/native-image/optimizations-and-performance/MemoryManagement/\n[issues]: https://github.com/hpi-swa/native-minecraft-server/issues\n[metadata]: https://www.graalvm.org/22.2/reference-manual/native-image/metadata/\n[ni]: https://www.graalvm.org/native-image/\n[oci-free]: https://www.oracle.com/cloud/free/\n[oci-minecraft]: https://blogs.oracle.com/developers/post/how-to-set-up-and-run-a-really-powerful-free-minecraft-server-in-the-cloud\n[pgo]: https://www.graalvm.org/22.2/reference-manual/native-image/guides/optimize-native-executable-with-pgo/\n[upx]: https://upx.github.io/\n[wsl]: https://docs.microsoft.com/en-us/windows/wsl/install\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhpi-swa%2Fnative-minecraft-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhpi-swa%2Fnative-minecraft-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhpi-swa%2Fnative-minecraft-server/lists"}