Comprehensive up-to-date news coverage

HomeBlogsInstall Minecraft server on Ubuntu Server 22.04

Install Minecraft server on Ubuntu Server 22.04

Published on

Follow us on Google News for latest updates and information.

In this article, we’ll show you how Install Minecraft on Ubuntu Server 22.04. The Minecraft craze started in 2009, and while it’s no longer on everyone’s lips, it still has some appeal. Even now, it is one of the most popular video games in history. But it’s not all about fun and games: installing a Minecraft server allows you to bring some fun to your LAN, and it’s also a great exercise to teach new admins how to work with Linux.

The beauty of having your own Minecraft server is that you have full control over your gaming experience. You can decide what settings are used on the server, you can use (or abuse) your admin powers to your advantage, and you can share them with your gaming buddies. You can set up a private server just for you and your friends, or make it available to everyone. Ubuntu 22.04 Jammy Jellyfish is the best choice for hosting a Minecraft server because Linux is known for its stability when running servers and Ubuntu for ease of use. Below we will walk you through the steps to get your Minecraft server up and running.

No instruments, no shelter, not even a sense of direction or course. If you survive the night, whatever you do and wherever you go will depend entirely on your choices. Isn’t it amazing? There are a lot of shocks in the minecraft account. There are many other locations to find and explore, including lakes, rivers, valleys, mountains, deserts, waterfalls, forests, and lava flowers. The game is created by a small group dedicated to the continuous development of Minecraft. Below are the steps to install Minecraft on Ubuntu Server 22.04.

How to Install Minecraft Server on Ubuntu Server 22.04

Installation prerequisites

There are a few packages we’ll need to run the Minecraft server, so let’s start by installing them. Open a command line terminal and type the following two commands:

$ sudo apt update $ sudo apt install wget screen openjdk-18-jdk nmap

An explanation of each package we install:

See also  Connect Alexa to iPhone

Step 1: wget will be used to download Minecraft server outages

Step 2: screen is used to start Minecraft server in backround

Step 3: openjdk-18-jdk is a Java package which Minecraft needs to run

Step 4: nmap will be used later for basic troubleshooting purposes

Create a Minecraft user

The best practice is to have the Minecraft server run under its own dedicated account, rather than using root or some other account. Create a new account in Ubuntu using the following command:

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

Install a Minecraft server

Step 1: It is possible to run multiple instances Minecraft server on one host. We’ll show you how to do this later in the article, in case you want to run multiple servers. Each server instance we run will need its own directory in the /opt/minecraft directory. For this first server instance, let’s call it survival and create the following directory:

$ sudo mkdir /opt/minecraft/survival

Step 2: Now we need to download the minecraft server java file wget. Since Minecraft receives regular updates, you’ll need to make sure you’re downloading the latest version by going to the official Minecraft download page and copying the link to the .jar file. To download the file, use the following command, replacing the link in this example with the current available link: You must accept the terms and conditions before you can install the Minecraft server. Use this command:

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

Finally, we need to give ownership of our minecraft user account in the minecraft server directory:

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

Create a Minecraft SystemD startup script

Adding the Minecraft startup script to SystemD will make it really convenient to start the Minecraft server whenever you need it, such as after a system reboot. It also provides an easy way to stop the server from restarting.

See also  Change the Desktop Background in Windows 11

Step 1: Start by creating the following file with nano or your preferred text editor:

$ sudo vi /etc/systemd/system/minecraft@.service

Step 2: Insert the following content in the new file:

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

On:

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

Now you can save the changes to the file and exit.

Start the Minecraft Server

Startup Minecraft server it is very easy. Use the following systemctl command to locate it:

$ sudo systemctl start minecraft@survival $ sudo systemctl status minecraft@survival

If you want, enter the following command Minecraft server to run automatically on every system reboot:

$ sudo systemctl enable minecraft@survival

To make sure your Minecraft server is listening on incoming connections, use the nmap command to check Minecraft’s default port, which is 25565:

$ nmap -p 25565 localhost

Provisioning a new Minecraft server instance on the same host

If you want to host another instance of Minecraft, most of the work has already been done for us. Now we need to copy some of our existing configurations for the new instance. Since the first server is running on port 25565, we will run the second Minecraft server on port 25566 in this example.

Step 1: First, create a new directory for this instance. We’ll just call this new server linuxconfig:

$ sudo mkdir /opt/minecraft/linuxconfig

Step 2: Next, copy .jar file from the other Minecraft directoryand accept the terms and conditions again:

$ sudo cp /opt/minecraft/survival/minecraft_server.jar /opt/minecraft/linuxconfig/ $ sudo bash -c “echo eula=true > /opt/minecraft/linuxconfig/eula.txt”

Step 3: Use the following command to add a line inside Minecraft configuration file. This will configure the server instance to run on port 25566:

$ sudo bash -c “echo server-port=25566 > /opt/minecraft/linuxconfig/server.properties”

Step 4: Enter yours Minecraft user ownership of the new directory:

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

Step 5: Use now systemctl to enable server startup at system startup and server startup:

$ sudo systemctl enable minecraft@linuxconfig $ sudo systemctl run minecraft@linuxconfig

Step 6: Verify that the new instance is running correctly:

$ sudo systemctl status minecraft@linuxconfig

Step 7: Finally, use the following content as a reference for the various settings you can use for your servers. These settings are stored in the server.properties file in /opt/minecraft/linuxconfig.

$ sudo nano /opt/minecraft/linuxconfig/server.properties

Final words

We hope you enjoy this article on How to Install Minecraft Server on Ubuntu Server 22.04. This article taught us how to use the command line to install and remove Minecraft on Linux using Ubuntu 22.04. The article is now complete and you know how to install Minecraft on Ubuntu Server 22.04. If you are a Windows user and facing Minecraft update problem, you can also read our Windows 11 Minecraft update article.

See also  Use Emoji on Windows keyboard

Originally posted 2022-08-24 18:28:48.

Latest articles

Enable/Disable Mono Audio in Windows 11

Hello everyone, in this article we will show you how Enable/disable mono sound in...

New Orleans man gets probation for drug money laundering

In Science and Space: At this point, U.S. Attorney Duane A. Evans announced...

Crypto is the Last ‘bipartisan Issue’ on Capitol Hill. Exec at Coinbase Said

News Tech: Democrats and Republicans might cooperate on crypto if it works. Faryar Shirzad,...

Bitcoin exchange Coinbase is being sued for patent infringement

News Tech: Veritaseum Capital LLC, which claims that the cryptocurrency exchange has violated...

More like this

Enable/Disable Mono Audio in Windows 11

Hello everyone, in this article we will show you how Enable/disable mono sound in...

New Orleans man gets probation for drug money laundering

In Science and Space: At this point, U.S. Attorney Duane A. Evans announced...

Crypto is the Last ‘bipartisan Issue’ on Capitol Hill. Exec at Coinbase Said

News Tech: Democrats and Republicans might cooperate on crypto if it works. Faryar Shirzad,...

Bitcoin exchange Coinbase is being sued for patent infringement

News Tech: Veritaseum Capital LLC, which claims that the cryptocurrency exchange has violated...

Improve Your Gaming Experience

Hello everyone, in this article we will show you how Improve your gaming experience....

Waymo appoints a new chief financial officer to focus on driving the company’s growth

In Science and Space: As the manufacturer of autonomous vehicles continues to improve...