snippetbashTip
Minecraft — Run a headless Minecraft server. More information: <https://minecraft.wiki/w/Tutorial:Setting_up_a_J
Viewed 0 times
servercommandrunheadlessminecraftclimore
Problem
How to use the
Minecraft command: Run a headless Minecraft server. More information: <https://minecraft.wiki/w/Tutorial:Setting_up_a_Java_Edition_server>.Solution
Minecraft — Run a headless Minecraft server. More information: <https://minecraft.wiki/w/Tutorial:Setting_up_a_Java_Edition_server>.Start a Minecraft server and generate a world if it doesn't exist:
java -jar {{path/to/server.jar}} --noguiSet the minimum and maximum amount of memory a server is allowed to have (Note: Setting them the same prevents lag caused by heap scaling):
java -Xms{{1024M}} -Xmx{{2048M}} -jar {{path/to/server.jar}} --noguiStart a server with a GUI:
java -jar {{path/to/server.jar}}[Interactive] Shut the server down:
stopCode Snippets
Start a Minecraft server and generate a world if it doesn't exist
java -jar {{path/to/server.jar}} --noguiSet the minimum and maximum amount of memory a server is allowed to have (Note: Setting them the same prevents lag caused by heap scaling)
java -Xms{{1024M}} -Xmx{{2048M}} -jar {{path/to/server.jar}} --noguiStart a server with a GUI
java -jar {{path/to/server.jar}}[Interactive] Shut the server down
stopContext
tldr-pages: common/Minecraft
Revisions (0)
No revisions yet.