1.18.2 Minecraft Server Setup (Linux)
In this guide I will show you how to set up a 1.18.2 Minecraft Server on Debian/Ubuntu, Fedora, and Arch based distros.
- Installing Java 17:
- Debian/Ubuntu: sudo apt install openjdk-17-jre
- Fedora: sudo yum install java-17-openjdk.x86_64
- Arch: sudo pacman -S jdk17-openjdk
- Checking that Java 17 is your default Java version: On all linux distros run "java -version" if it is not Java 17 follow the following steps.
- Debian/Ubuntu/Fedora: "sudo update-alternatives --config java" then follow the instructions to choose Java 17.
- Arch: sudo archlinux-java set java-17-openjdk
- Download The 1.18.2 Server Jar
- Move server.jar to the location you would like your server files to be (I recomend either ~/Desktop/1.18.2 or ~/Minecraft/1.18.2 but you can put it wherever you want.)
- Open the directory you put the server.jar file into in the terminal (there is normally a button for this if you right click in your file manager) and run "java -jar server.jar".
- Open eula.txt in a file manager and change eula=false to eula=true.
- Run "java -Xms1024M -Xmx1024M -jar server.jar --nogui" to start the server.(-Xms1024M is the minimum ammount of Ram and -Xmx is the maximum ammount. I would recomend giving -Xmx2048M if you can. If the server has low TPS and none of the CPU threads are at 100% give the server more RAM or lower the max render distance in server.properties (if one of the threads is at 100% lowering the max render distance is also a good idea))
- To stop the server type "/stop" into the terminal window the server is running in.
Post Installation
Now that your server is setup computers on your local network (LAN) can access it by using your ip address in the server ip box in the minecraft multiplayer menu. For computers on networks that are not your lan you need to open a port on your firewall (if you have one) and router.