How to create your own Minecraft Server

The splendor of getting your personal Minecraft server is that you’re definitely in fee of your gaming experience. You get to select what settings are used at the server, you may use (or abuse) your admin powers for an advantage, and bestow the ones powers on in your fellow gaming buddies. You can also additionally need to create a non-public server for simply you and your friends, or make it public for all of us to access. Ubuntu 22.04 Jammy Jellyfish is a pinnacle desire for web website hosting a Minecraft server, as Linux is thought for its balance while strolling servers and Ubuntu is thought for its ease of use. Follow alongside under as we take you thru the stairs to get your Minecraft server up and strolling. In case you’re additionally thinking a way to play Minecraft on Ubuntu 22.04, we’ve were given you included for that too. Just take a look at out our different manual approximately a way to set up Minecraft on Ubuntu 22.04 Jammy Jellyfish Linux.

In this Academic you’ll learn:
  • How to put in and configure Minecraft Server
  • Create Minecraft SystemD startup script
  • Provision new Minecraft server example at the equal host

There are some programs we’ll want as a way to run the Minecraft server, so permit’s begin with the aid of using putting in them. Open a command line terminal and sort the subsequent commands:

$ sudo apt update
$ sudo apt set up wget display screen openjdk-18-jdk nmap
Explanation of every bundle we’re putting in:
  • wget may be used to down load Minecraft server fies display screen is for strolling the Minecraft server withinside the background
  • openjdk-18-jdk is a Java bundle that Minecraft wishes as a way to run
  • nmap may be used afterward for fundamental troubleshooting purposes Create a Minecraft user

It’s excellent exercise to permit the Minecraft server run beneathneath its personal committed account, as opposed to the use of root or a few different account. Create a brand new account in Ubuntu with the subsequent command:

Create a User

$ sudo useradd -m -r -d /opt/minecraft minecraft

Install Minecraft server

It’s viable to run more than one times of the Minecraft server on a unmarried host. We’ll display you a way to try this later withinside the article, in case you’re looking to run more than one servers. Each server example we run will want its personal listing beneathneath the /opt/minecraft listing. For this primary server example, permit’s name it survival and

create the subsequent listing:
$ sudo mkdir /opt/minecraft/survival

Now, we want to down load the Minecraft server Java report with wget. Since Minecraft gets everyday updates, you’ll want to make certain you’re downloading the ultra-modern model with the aid of using going to the respectable Minecraft down load web page and copying the hyperlink to the .jar report.

Use the subsequent command to down load the report, changing the hyperlink in this situation with the cutting-edge one available:

$ sudo wget -O /opt/minecraft/survival/minecraft_server.jar

You need to accept the terms and conditions before being able to install the Minecraft server. Use this command:

$ sudo bash -c "echo eula=true > /opt/minecraft/survival/eula.txt" 

Lastly, we need to give our minecraft user account ownership on the Minecraft server directory:

$ sudo chown -R minecraft /opt/minecraft/survival/

Create Minecraft SystemD startup script

Adding a Minecraft startup script to SystemD will make it sincerely handy to begin your Minecraft server any time you want to place it up, consisting of after a machine reboot. It additionally offers you an smooth manner prevent the restart the server.

Start with the aid of using developing the subsequent report with nano or your chosen textual content editor:

sudo vi /etc/systemd/system/minecraft@.service
Description=Minecraft Server: %i




ExecStart=/usr/bin/screen -DmS mc-%i /usr/bin/java -Xmx2G -jar minecraft_server.jar nogui

ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "say SERVER SHUTTING DOWN IN 5 SECONDS. SAVING ALL MAPS..."\015'
ExecStop=/bin/sleep 5
ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "save-all"\015'
ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "stop"\015'


Note that line thirteen instructs Minecraft on how lots machine reminiscence it could use. The report above will allocate 2 GB of reminiscence. If you’d want to allocate more – like four GB, for example – you will want to make the subsequent change: From:

ExecStart=/usr/bin/screen -DmS mc-%i /usr/bin/java -Xmx2G -jar minecraft_server.jar nogui


ExecStart=/usr/bin/screen -DmS mc-%i /usr/bin/java -Xmx4G -jar minecraft_server.jar nogui

Now, you may store your adjustments to the file and exit.

Starting minecraft server:

Starting the Minecraft server could be very smooth. Use the subsequent systemctl command to place it up:

$ sudo systemctl start minecraft@survival

You can affirm the modern repute of the server to make certain it’s up and strolling with the subsequent command. It ought to go back output that seems like the screenshot below.

$ sudo systemctl status minecraft@survival


In this tutorial, we noticed the way to run a Minecraft server on Ubuntu 22.04 Jammy Jellyfish. We additionally discovered the way to configure more than one times of Minecraft Server to run on a unmarried host.


minecraft server linux, ubuntu minecraft server, linux minecraft server, minecraft bedrock linux, ubuntu minecraft, install minecraft server ubuntu, setup minecraft server linux, run minecraft server on linux, minecraft debian, minecraft server debian, setup minecraft server ubuntu, minecraft server linux download, minecraft server ubuntu 20.04, setting up minecraft server on linux, ubuntu server minecraft server