Minecraft Server Configuration

In this post, we will see how can install our own Minecraft server on our Ubuntu (or any Debian based) system.
By installing our own Minecraft server, and exposing it to the outside world, we can play with our friends online in a Survival or a Creative world.
We also have full control off the game, and a lot of customization and modding abilities.
Install Java
And other needed software:
Create a minecraft user
Install minecraft server
Each server instance we run will need its own directory under the /opt/minecraft
directory.
For this first server instance, let’s call it survival
and create the following directory
Download minecraft server
Visit and copy link url of latest version of minecraft_server.1.*.jar
:
Rename .jar
Rename .jar
to the latest version names:
Accept terms and conditions
Give minecraft user ownership
Start server
Create startup script
Create a start.sh
script and write the following:
Xmx
Maximum RAM usageXms
RAM usage on startup
Make it executable
Run server to test
Start server with screen
Open a screen session
Start server in the session
Detach from session
Hold down Ctrl
and hit A
and D
in the session.
Reattach to session
Make server a systemd service
Create template systemd script
Create a systemd template script, can be used for other server instances:
Paste the following content in the new file
Start Minecraft Server
Check minecraft server status
Enable minecraft server status
In order to start at system reboot: