How to Set Up A Minecraft Server On Linux

Here's How to Set Up a Minecraft Server on Linux

With Minecraft’s immense popularity, many Linux users also wish to join in on the fun. However, such users must set up a Minecraft server to experience the game in all its glory. Setting up a Minecraft server on your Linux computer does not have to be difficult. With the step-by-step instructions in this guide, you can easily set it up in no time.

Best Minecraft Hosting Providers for Linux

ProviderUser RatingRecommended For 
4.8PerformanceVisit Kamatera
4.6Ease of UseVisit Hostinger
4.9SecurityVisit Ultahost

Want to host your Minecraft server with the best? Check out our full list of the top Minecraft hosting providers.

  • Verify the integrity of your Minecraft download with virus and malware scans to ensure that it is secure and safe to install
  • Create a dedicated directory for your server files, then proceed to download and install the software associated with running the Minecraft server
  • Configure the server properties file to tailor your gameplay experience. This includes specifying the server name, game mode, and difficulty level.
  • Configure the firewall to allow incoming connections from players
  • Test your server by attempting to connect with a friend or family member


There are certain hardware and software requirements that must be met before you can host a Minecraft server. Here is a detailed overview:

Software Requirements

To start hosting your own world of adventure and exploration in Minecraft, make sure to meet the software requirements. You will need Java for running all components of your game environment, the official Minecraft Server Software, and a few additional tools or applications needed for setup.

1. Java

To download Java:

  •  Head to the official Oracle website and select the appropriate version for your operating system
  • Once you have downloaded and installed Java, set it as your default program in your system environment variables if necessary
  • Ensure you have updated Java regularly by running the ‘Check for updates’ feature from time to time

2. Minecraft Server Software

The official Minecraft Server Software can be downloaded for free from its website. Ensure you download the correct version compatible with your operating system. After you have downloaded and installed it, follow the instructions provided within the Minecraft server software to get started.

3. Additional Tools and Applications

Depending on your server configuration, there may be additional tools or applications that you need to use. For example, if you’re running your server on Linux, you may need to install specific libraries or packages for the software to run properly.

In addition, check for any updates and patches that might become available for your setup from time to time in order to keep it running smoothly.

Here are a few additional applications that may be useful:

  • FTP Client
  • Web Control Panel (cPanel, Direct Admin, etc.)
  • Firewall Software
  • Antivirus Software.

All of these should be installed and configured correctly to ensure the best performance of your Minecraft server.

Final: How to Set Up A Minecraft Server On Linux

Hardware Requirements

The following hardware components must be kept into consideration when setting up a Minecraft server:

1. RAM

Ensure that your system has at least 7GB of RAM and is compatible with the operating system (OS) you will be using to run your Minecraft server. To check this, use a program such as CPU-Z, which should tell you what type of RAM your computer can accept.

2. CPU

For a smooth and seamless experience while running a Minecraft server, an Intel Core i5 processor or equivalent is necessary. If you are unsure about what processor your computer has installed, open up the System Information panel under Settings and look for the ‘Processor’ section.

3. Storage

Ensure you have at least 55GB of available storage space on your computer to run a Minecraft server. If you need additional space, add an external hard drive or SSD.

4. Ethernet Connection

Make sure you have access to a wired connection with 5 Mbps speeds or higher when running a Minecraft server. If necessary, connect an Ethernet cable directly from your router to the computer where you will be running the server.

Be sure to consult with a professional IT technician if you are unsure about any steps necessary to get started.

Install Java on Linux

Final: How to Set Up A Minecraft Server On Linux

1. Check If Java Is Installed

It is important to know if Java is already installed on your Linux system. To check, you will need to open the command line interface and run a command. You can do this by entering ”java -version” in the terminal window. If Java is installed, you will see a message displaying the version number of Java on your system.

Alternatively, you can check the system settings to see if Java appears in the list of installed programs. This will indicate that Java is currently installed on your computer. If Java does not appear in either location, it means it has not yet been installed on your Linux system and should be added.

2. Install Java on Linux

Installing Java on Linux can be done quite easily. Here is a step-by-step guide to help you get started:

  1. Download the Java software package from the official Java website. You can find this here. Select an appropriate version for your system and download it in the format most suitable for your machine (For example, a .deb file is ideal for Debian-based systems).
  2. Open up a command line interface and navigate to the directory where you
  3. Once there, run this command: sudo apt install <name-of-the-package>. This will begin installing Java on your system.
  4. During the installation process, you may be prompted to enter command-line arguments. If so, please provide them as instructed by the software package installer.
  5. Upon successfully completing the installation, you can verify that Java is installed on your system by typing Java -version in a command line interface and hitting Enter. This should show you information about your Java version.
  6. Congratulations! You have successfully installed Java on Linux!

3. Verify Java Installation

Verifying Java installation correctly on a Linux system is a crucial step in ensuring it will be compatible with other programs and applications. Here are some ways to check that the installation was successful:

1. Running Commands

You can use the command line to view the version of Java installed on your system by running “java -version.” This will display a message telling you which version has been installed and if any problems were encountered during installation.

2. Checking System Settings

You can also go into your system settings and ensure that Java is listed as one of your installed programs. If it does not appear there, it could mean there was an issue with the installation process and you may need to reinstall it.

3. Testing a Java-Based Program or Application

The most reliable way to check if Java is installed correctly is by testing a program or application that requires it. If the program or application runs without any problems, then you can be sure that Java is working properly on your system.

If you encounter any issues with your Java installation, there are some troubleshooting tips you can try. For example, make sure that all required files were downloaded during installation and that none were corrupted during download. You may also need to uninstall and reinstall the software if an issue arises after the initial installation process has been completed.

Download and Install Minecraft Server

1. Download the Minecraft Server Software

The official Minecraft server software for Linux is available to download from the Minecraft website. Before you start, it is important to verify that your download is authentic and secure, so be sure to follow the steps below:

  • Visit Minecraft’s official website and click ”Download Now”.
  • Once the download is completed, open your file manager and look for a folder named “Minecraft_Server” in the directory where you saved the file.
  • Navigate and look for a file called “minecraft_server.jar” – the actual server software executable should match what was downloaded from the website.
  • To verify that the download matches what is provided on the website, you can compare the file size and SHA-1 hash value of your download with those given in the release notes for your version on the Minecraft website. This will ensure that malicious software has not tampered with or replaced the downloaded file.
  • Finally, scan your download using a reputable antivirus program to make sure it is free from viruses or malware before proceeding with the installation.

2. Create a New Directory for Minecraft Server

Creating a new directory for your Minecraft server is vital in setting up and running the game. A dedicated directory will ensure that all server files are properly organized and safely stored.

When choosing a location for the directory, it’s best to select one with plenty of storage space so that you don’t run out of room over time. This can be done by looking at the free hard drive space available on the computer or checking with your hosting provider to determine how much space they offer.

It’s also necessary to make sure that any other applications installed on the system won’t conflict with your Minecraft server or interfere with its performance.

Once you’ve chosen an appropriate location for your Minecraft server, you’ll need to open a command prompt window and type in the following commands:

1. `mkdir <directory_name>` – Creates the directory for your Minecraft Server files

2. `cd <directory_name>` – Changes into the new directory

3. `touch` – Creates a file for storing configuration settings and other data related to your server

4. `chmod 777 <directory_name>` – Sets permissions on the new directory so that everyone has access to it

5. `echo “eula=true” >` – Appends a line to the file indicating agreement with Mojang’s End User License Agreement (EULA)

Final: How to Set Up A Minecraft Server On Linux

6. Execute a bash script in the root folder of your Minecraft server to run an SSH independent server

Final: How to Set Up A Minecraft Server On Linux

7. Once the script has been successfully executed, you will need to open up a port to allow incoming connections from players.

Final: How to Set Up A Minecraft Server On Linux

By default, Minecraft uses port 25565 – this can be changed in the file located in your server root directory.

Final: How to Set Up A Minecraft Server On Linux

8. With the necessary steps taken care of, it’s time to start the server! This can be done either in the command prompt, or from within the GUI.

By following these steps, you can successfully create a dedicated directory for your Minecraft server. This will ensure that all of the necessary files are stored in an organized manner and that any conflicts with other applications can be avoided.

Install Minecraft Server on Linux

Installing a Minecraft server on Linux is an easy process and can be done in just a few simple steps.

  • First, download the latest version of the Minecraft server software from the official website. Once you have downloaded the software, extract it to a folder of your choice.
  • Next, open a terminal window and navigate to the directory where you extracted the files. From there execute the following command line arguments: “java -Xmx1024M -Xms1024M -jar {server-file-name}.jar nogui”. This will launch the Minecraft server with 1024 megabytes of RAM allocated for its operation.
  • Once you have successfully launched your server, it is important to ensure that all of the necessary ports are open on your system. To do this, make sure to run: “netstat -an” to check which ports are currently being used. If any of the required ports are not present, you need to configure them manually using iptables or an equivalent program.

If you encounter any errors during the installation process, it is important to troubleshoot them as soon as possible. Common errors include failing to launch the server with the correct command line arguments or having port conflicts due to other programs running on your system simultaneously. To solve these issues, refer back to the official Minecraft documentation for guidance.

Configure the Minecraft Server

Access Server Properties File

Accessing the server properties file for a Minecraft Server is relatively straightforward. The first step is to locate the file, which can be found within the Minecraft folder on your computer or server. The default location of this folder is usually in %appdata%\.minecraft\server\.

Once you have located and opened the folder, look for a text document named “”. This is the server properties file that you will need to access and edit when setting up or altering your server’s settings.

To open and edit your server properties file, you will need a basic text editor like Notepad or TextEdit (on Mac). Once you have opened the file in an appropriate text editor, scroll through it until you find the setting that you wish to edit. Once you locate the setting, simply change the value to what you would like it to be and save the changes.

It is important to remember that some settings may require a server restart for them to take effect. If a server restart is required after making changes, ensure that all players know this before proceeding.

Set Server Name, Game Mode, and Difficulty Level

  • Server Name: This refers to the name that appears when a player connects to your server. To set this value in the properties file, find the line beginning with “server-name” and replace it with whatever you would like your server name to be.
  • Game Mode: This setting determines how players interact with each other on your server. The options include Survival (default), Creative, Adventure, or Spectator mode. You can change this setting by finding the line containing “gamemode” in the properties file and replacing the value with whichever mode you would like to use.
  • Difficulty Level: This setting determines how difficult the game is for players. The available difficulty levels are Peaceful, Easy, Normal, and Hard. To change this setting, locate the line beginning with “difficulty” in the properties file and replace it with one of these values.

Once you have made all your changes to the server’s settings, remember to save the changes to the properties file before restarting your server. Next, check that all of your chosen settings have been applied correctly. If everything looks good, you are now ready to enjoy playing on your newly configured Minecraft Server!

Configure Firewall

Final: How to Set Up A Minecraft Server On Linux

Check If Firewall Is Enabled

You can use either of two methods to check if the firewall is enabled: running a command to check the firewall status or checking the system settings.

To run a command to check the firewall status, open up a terminal and enter one of these commands:

  • sudo ufw status – This will show whether UFW (the Uncomplicated Firewall) is enabled.
  • sudo iptables -L – This will display any rules that have been applied to the server’s network interface(s). If no rules are displayed, then no firewall has been configured.
  • sudo ip6tables -L – This is the same as iptables, but for IPv6.

Alternatively, you can check the system settings for firewall configuration. On most Linux-based systems, this is done by navigating to System -> Administration -> Firewall Configuration (or something similar). Here, you can check the status of the firewall and make changes to its configuration.

Depending on your system’s requirements, you can make necessary adjustments to the firewall settings. If the firewall is disabled, enable it immediately for enhanced security.

Configure Firewall to Allow Incoming Connections

To allow incoming connections to the Minecraft server, you will need to configure the firewall rules accordingly. The following ports should be opened to ensure smooth traffic flow:

  • UDP port 25565 – This is the default port for Minecraft servers. If a custom port has been specified, it should be opened instead.
  • TCP port 25565 – This is the default port for Minecraft servers. Again, if a custom port has been specified, it should be opened instead.
  • UDP and TCP ports for RCON (if in use) – The default port is 25575, however using a different one is recommended for added security.

To open these ports, you will need to add the appropriate firewall rules. Depending on which type of firewall is in use (e.g. ufw or iptables), the instructions may differ slightly. For example, with UFW, you can run a command such as “sudo ufw allow from any to any port 25565 proto tcp” to open TCP port 25565.

Next, you will need to save and apply the changes for them to take effect. On most Linux-based systems, this can be done by navigating to System -> Administration -> Firewall Configuration. Here, you can save and apply the changes, thus allowing incoming connections to the Minecraft server.

Start Minecraft Server

Once the Minecraft server is installed, it’s time to start playing. Starting a Minecraft server is simple. Here ‘s how to do it:

  1. Open the command prompt (or terminal on a Mac).
  2. Navigate to the directory where you installed your Minecraft server.
  3. Type in “java -Xmx1024M -Xms1024M -jar {server file name}.jar nogui” and hit Enter.
  4. Wait for the server to finish starting up. You’ll see a “Done” message in the command prompt once it’s finished.

Once your Minecraft server is running, you’ll need to connect to it from another computer or device on the same network. To do this, open Minecraft and select Multiplayer from the main menu. Next, add a new server and enter the IP address of your computer, followed by the port number (typically 25565).

Now you’re ready to start playing on your own Minecraft server! Have fun!

Kamatera: The Best Minecraft Hosting

Visit Site Coupons 1


Setting up your own Minecraft server on Linux is a great way to experience the industry’s most popular game while providing yourself and others with an enjoyable, collaborative gaming experience like no other. With the steps outlined above, you can start drifting into the world of survival and adventure!

When getting started, make sure to reference more comprehensive, platform-specific instructions for best results, as configurations may differ from environment to environment. Additionally, it is always important to remain mindful of security when setting up a Minecraft server. This includes considering installations that use firewalls and encryption protocols.

Lastly, if you need more help or guidance when setting up your Linux Minecraft server, feel free to visit Hostadvice for expert advice and helpful resources from the best website builders.

We have the best hosting for gamers who want to get the most out of their gaming experience.

Gaming Hosting
Minecraft Hosting
best option

Next Steps: What Now?

Further Reading – Useful Resources

Frequently Asked Questions

What is a server?

Server is a computer or device on a network that manages network resources. Servers can provide various services, such as web hosting, file storage, email, and more. They may also be used to host applications, manage databases, or perform other tasks that require a high level of security and performance.

What are the prerequisites for setting up a Minecraft server on Linux?

The prerequisites for setting up a Minecraft server on Linux are a computer with an operating system that supports Linux, root access to the computer, and some basic knowledge of Linux commands. Additionally, you will need to install Java 8 or higher and any additional software packages needed by the server.

How do I download and install the Minecraft server software on Linux?

The Minecraft server software can be downloaded from the official website. Once downloaded, it must be extracted and placed in a directory of your choice. You will also need to create a user account with sufficient permissions to run the server and configure its settings.

How do I configure the Minecraft server on Linux?

Configuring the Minecraft server on Linux requires editing a file named “,” which is located in the same directory as the server software. In this file, you can configure various settings, such as player profiles, world size and type, and game modes. Additionally, you can also edit other configuration files, such as “ops.txt” to add additional players with administrator privileges.

How do I configure the firewall for the Minecraft server on Linux?

To allow players to connect to the server, you will need to open up ports in your firewall. To do this, you can use commands like iptables or ufw to open the ports needed for communication with the server. Additionally, you will also need to ensure that your router is configured to forward traffic from these ports to the computer running the server. Once everything is set up properly, your Minecraft server should be accessible over the internet.

What is the best Linux hosting?

Linux hosting can be tricky, as there are many hosting services available to choose from. In general, the best Linux hosting is one that can provide good uptime and reliable performance, as well as support for popular applications and technologies like PHP, MySQL, and Apache.

HostAdvice Speaks to ScalaHosting: An Interview with Chris Rusev

HostAdvice had the opportunity to speak with Chris Rusev, the CEO and co-founder of , a web hosting company that offers shared, cloud VPS, and res...
8 min read
Eddie Segal
Eddie Segal
Digital Marketing Specialist

Email Deliverability: What Is It, Key Factors & Best Practices

What is Email Deliverability? Think of it like mailing a letter and making sure it lands right in the recipient's hands, not lost or thrown...
17 min read
Ela Gal-Kfir
Ela Gal-Kfir
Digital Marketing Specialist

Email Marketing vs. Social Media: Which is More Effective?

What is Email Marketing? Email marketing is a  that involves companies reaching out to potential and existing customers via email ...
10 min read
Ela Gal-Kfir
Ela Gal-Kfir
Digital Marketing Specialist

Email Engagement Metrics, Calculation & Best Practices

Email engagement tells us how interested recipients are in the content of emails they receive. It provides insights into what types of em...
12 min read
Ela Gal-Kfir
Ela Gal-Kfir
Digital Marketing Specialist provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top