Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to Make a Minecraft Server on Linux and Windows (Step by Step)

How to Make a Minecraft Server on Linux and Windows. In this step-by-step guide, we will show you how to setup a Minecraft server on Linux and Windows operating systems for free.

Minecraft is one of the most popular sandbox games developed by Mojang Studios. It allows multiple players to play Minecraft with each other over the internet. It can run on any dedicated server hosting and supports all major operating systems, such as Linux, macOS, and Windows. You can customize Minecraft in different ways, such as installing mods or plugins, modifying gameplay mechanics, adding new features, etc.

Minecraft Dedicated Server vs. Minecraft Server Hosting

There are two ways you can host a Minecraft server for you and your friend,  1) a Dedicated server and 2) Hosted server.

1. Dedicated Minecraft Server

A dedicated Minecraft server is a server or a desktop computer hosted by a player on their home or local network.

Pros Cons
Free. You don’t need to pay for the server. Requires high-speed and stable internet connection.
Full control of files, and customization. No protection from DDoS attacks.
  Only good for a few players on the server.
Also Read

Best Dedicated Server Hosting Providers

2. Hosted Minecraft Server

A hosted server is a server where you can buy a Minecraft server from the Minecraft hosting companies for a better experience.

Pros Cons
Very fast and reliable compared to a dedicated server. You will need to pay for the service.
Instant deployment and easy to manage. You have not full control over the server.
DDoS protection.  
Lot’s of pricing options depending on your server’s requirements.  
Get quick support if you’re stuck.  
Also Read

Best Minecraft Server Hosting Providers

Quick Tip

You will need powerful hardware, fast internet, and very good technical knowledge to run your own Minecraft server. However, there are many Minecraft server hosting providers available that offer reliable hosting services, where you can rent server space and manage your Minecraft server through a web-based control panel. So, I would recommend investing a small amount to pay for a Minecraft dedicated server hosting.

How to Make a Minecraft Server on Linux

In this section, we will show you how to setup a Minecraft server on Linux. We will use Ubuntu as an operating system to create a Minecraft server.

Step 1 – Minecraft Server Requirements

  • Any Linux Operating system installed on your system ( Get a Free Server from Kamatera Cloud. They offer a 30-day free trial ).
  • Minimum 4GB RAM and 4-core CPUs.
  • A root user or a user with sudo privileges.

Also Read

How to Get a Free Linux Server from Kamatera Cloud – Step by Step Guide

Step 2 – Install Java JRE

Minecraft is a Java-based software. So Jave JRE must be installed on your server. You can install it using the following command:

apt update -y
apt install openjdk-17-jre-headless -y

Now, verify the Java installation using the command given below:

java --version

You will get the Java version in the following output.

openjdk 17.0.6 2023-01-17
OpenJDK Runtime Environment (build 17.0.6+10-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 17.0.6+10-Ubuntu-0ubuntu122.04, mixed mode, sharing)

You will also need to install the screen utility to keep your server running.

apt install screen

Step 3 – Download Minecraft Server

First, create a directory for the Minecraft server:

mkdir minecraft

Next, visit the Minecraft official website, copy the Minecraft download link then run the wget command inside the Minecraft directory to download the Minecraft server Java edition.

cd minecraft
wget https://piston-data.mojang.com/v1/objects/8f3112a1049751cc472ec13e397eade5336ca7ae/server.jar

This will download the server.jar file in your current directory.

Step 4 – Setting Up a Minecraft Server

Before running a Minecraft server, start a screen session using the following command.

screen

This will start a new detachable session where you can run a command and leave it running.

Now, run the following command to run the Minecraft server.

java -Xms1024M -Xmx1024M -jar server.jar nogui

A brief explanation of each option is shown below:

  • Xms1024M – This will start the server using 1024M or 1 GB RAM. You can set it as per your server capacity.
  • Xmx1024M – This will set up your Minecraft server to use a max 1024 MB of RAM. You can also increase this RAM as per your server capacity.
  • jar – Define the name of your downloaded Minecraft jar file.
  • nogui – We are running the server on the server without GUI. This option tells the server not to launch GUI.

When you run the above command first time, you will get the following error.

The reason for these errors is the server could not find two necessary files (eula.txt and server.properties) required for execution. So you will need to create both files manually to fix the error.

First, open a eula.txt file:

nano eula.txt

Change the line eula=false to eula=true:

eula=true

Save and close the file then edit the server.properties file.

nano server.properties

The default file contains the following configurations.

You can change it as per your requirement and then save the file.

Now, start the Minecraft server again:

java -Xms1024M -Xmx1024M -jar server.jar nogui

This will take some time to initialize a server. Once the Minecraft server is started successfully, you will get the following output.

Now, run the following command on the Minecraft admin console to get the help information:

help

You will get the following output.

You can now manage and control your Minecraft server from this command line console.

Step 5 – Keep Your Minecraft Server Running

Since you have set up a Minecraft server via SSH session. So you need to keep your server running after disconnecting from the SSH session.

First, press the CTRL+A+D to detach from this screen session. You will get the following output.

[detached from 4695.pts-0.ubuntu]

You can list all your active screen session using the following command.

screen -list

This will show you the ID of your active screen session.

If you want to resume your screen session again, run the following command followed by your session ID:

screen -r 4695

This will again connect to your Minecraft server console.

How to Make a Minecraft Server on Windows 10/11 or Windows Server 2016/2019/2022

In this section, we will show you how to host a Minecraft server on Windows for free.

Step 1 – Install Java on Windows

Before setting up a Minecraft server, you will need to download the Java JDK from their official website.

Next, double-click on the downloaded file to install Java on your system.

Step 2 – Download and Install Minecraft Server

First, go to the Minecraft official website and download the server file to your system.

Once the Download is completed, double-click on the downloaded file to run the Minecraft server. When you run the Minecraft server first time, it will create some files and directories to your current directory.

Next, edit the eula.txt file in a notepad editor then update eula=false to eula=true to accept the end user license agreement.

Save and close the file then run the Minecraft server file again to start the Minecraft server. After the successful initialization, you will see a Minecraft status window.

Your Minecraft server is now successfully installed on Windows.

Connect to Minecraft Server from Minecraft Client

At this point, your Minecraft server is up and running. Now, you will need to connect it from the Minecraft client to play with other players.

Step 1 – First, download the Minecraft Java Edition from their official website.

Step 2 – Next, launch the Minecraft client (Java Edition).

Step 3 – Select the “Multiplayer” option and click on “Direct Connection”.

Step 4 – Type the IP address of your Minecraft server then click on “Join Server” to connect your Minecraft server.

How to Set Up a Minecraft Server: Final Thoughts

In this step-by-step guide, we explained how to create a Minecraft server on Linux. We also showed you how to make a Minecraft server on Windows and connect it from the Minecraft Java edition client. I hope you can now set up your own Minecraft for friends without any cost.

The post How to Make a Minecraft Server on Linux and Windows (Step by Step) appeared first on LinuxBuz.


This post first appeared on A Linux And Technology, please read the originial post: here

Share the post

How to Make a Minecraft Server on Linux and Windows (Step by Step)

×

Subscribe to A Linux And Technology

Get updates delivered right to your inbox!

Thank you for your subscription

×