How to Setup a Minecraft Server on Windows, Mac or Linux

You have probably heard a lot about Minecraft over the past several years. Having sold more than 120 million copies worldwide, it is the second most popular video game ever made… only falling short of Tetris in terms of total sales (yes, the game made in 1984). Reminiscent of the Lego blocks we cherished as kids, Minecraft has introduced that same premise as a digital platform for mobile, console and desktop computers.

Categorized as a sandbox game, a player’s creativity is often the only limit as to what is possible. Gamers are encouraged to collect, craft and build a virtual world as they see fit, either as a solo campaign or with friends in a multiplayer environment. For those looking to play online, Minecraft Realms is one such option, renting an official server direct from the game developers. Since Realms lacks much in the way of customization, many turn to third party hosting providers such as MCProHosting and GGServers, who provide feature rich server hosting packages.

If you are however looking for the full experience, hosting your own Minecraft server for family and friends, we’re going to show you exactly how to get started. For those hosting on a personal Windows or Mac computer, we will cover the brief setup on a local machine. Otherwise, we will look at the steps using Linux as well, for those who prefer hosting a server remotely (such as a VPS).

A Couple Things to Note…

Minecraft servers can run on just about any computer built in the last 10 years. You can host it on your personal PC or an old laptop sitting in the closet. There are however a few things to consider first to save yourself headaches in the future.

  • Memory: Minecraft servers are heavily dependent on the system memory (RAM) above all else. While 256 MB is sufficient to start a server, a minimum of 1 GB is recommended for optimal performance. Most recent computers include 4 GB or more, but older systems should be checked to ensure sufficient resources.
  • Network: Use a wired internet connection for the hosting machine if possible. WIFI can be unreliable and may impact the connection quality of players at times, where an Ethernet cable will offer more consistent pings and minimize lag.
  • Software: The server is only accessible to players as long as the software is running. In order to keep it online 24/7, you may prefer to host somewhere other than your primary PC, especially if it is the same computer used to run the Minecraft game.

Assuming these don’t pose any concerns, we are ready to get started setting up the Minecraft server software. Depending on which operating system you plan to use, scroll to the appropriate section and we will pick up the instructions from there!

Make a Minecraft Server on Windows PC

With almost 90% of computers running on the Windows operating system, we will look at the steps for PC based hosting first. Although the process is relatively straight forward, there are several points that we must be aware of. If this is your first time setting up a Minecraft server, make sure to follow the steps closely to avoid running into unexpected problems.

1) Download the Minecraft Server Software

We first need to grab the latest version of the Minecraft server software. Available on the Minecraft website, this is a free Java applet (jar) file that will run the server from your computer. This acts much like an installer, where it will create all necessary files when ran for the first time.

Once you have downloaded the file, create a folder where you would like to store the server data. In our case, we will make the directory “E:\MinecraftServer” and place the JAR file there. Don’t run it yet, just set it aside for now and we will circle back to it in a moment.

Minecraft Server Download

 

2) Get the Latest Version of Java

Since Minecraft is built on Java, it is necessary to have the latest version of Java installed on the host machine. Most Windows computers will already have this loaded, but it is a good idea to make sure it is there and up to date as well. Check the latest version available at Java.com and then use one of the following methods to see what you have.

A) Go to Control Panel -> Java, then find the current version using the “About” button on screen. This will open a dialog box that contains the current Java version (8) and update revision (151) on your machine.

B) Open a Command Prompt by pressing Windows Key+R then typing “cmd” in the box. Once the prompt is open, type “java -version” and the version should be displayed.

If your version is out of date or you don’t have Java installed, go ahead and grab the latest release from their website. This will need to be completed before moving forward, otherwise the Minecraft software will fail to load as expected.

Java Download

3) Accept the EULA License Agreement

Open the folder we created back in step 1, where the downloaded server JAR file is located. Double click this to launch the server, then wait a few seconds while it generates the various configuration files needed to run.

Once it has finished, we should have a new text file called “eula.txt” in our folder. Open this in your preferred text editor, find the line that says eula=false and change it to eula=true. This accepts the Mojang End User License Agreement, which in turn allows you to run a Minecraft server. These are essentially terms you agree to uphold, such as not profiting from their software or distributing the game without consent.

 

4) Launch the Minecraft Server

After the EULA has been accepted, we can just double click the server JAR file once again to bring it online. This will open a basic GUI showing server stats, connected players and console logs. There is also a chat box under the console, allowing you to send messages and commands to the server without being connected.

While this works to get started, we still need to set how much memory the server is allowed to use. Close the window out and create a new batch (BAT) file in our folder, such as server.bat. Open this using a text editor and insert the following line of text…

java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

  • Make sure to replace the value minecraft_server.jar with the name of the server file you downloaded, which will look something like “minecraft_server.1.12.2.jar”.
  • The example allocates up to 1 GB (or 1024 MB) of memory to the server but change the numbers after -Xmx and -Xms to adjust as desired.
  • Setting nogui at the end will launch the server in a console window, but you can delete this text to keep the basic management GUI available.

Save the changes and then double click the BAT file to launch your server. If everything has been configured correctly, it will launch the JAR file you specified, allocate a max amount of system memory and start your server in a console or GUI window.

Make a Minecraft Server on your Apple Mac OSX

With Apple OSX products always on the rise, Mac is now being used more than ever before. They are entirely capable of hosting Minecraft servers and you may even have an extra one laying around, perfect to convert into a hosting machine. We will take a look at how to get a server up and running in just a few quick steps.

1) Download the Minecraft Server Software

To get started, we first need to grab the server files from the Minecraft website. Using the Safari browser, navigate to Minecraft: Java Edtion page and download the software from the link provided. This is a single Java (jar) file that works as an installer, building a complete server system on the first launch.

Choose a location to store your server data and create a new folder there. We will use the desktop in this case, making a directory called “MinecraftServer”. Drop the newly downloaded file into this folder and leave it for now. We will take care of a few other things first before we launch it.

Minecraft Server Download

2) Get the Latest Version of Java

The latest versions of MacOS will already have Java installed by default, but it is a good idea to check and make sure it is loaded. Older Macs may not have it, where we will need to install the legacy version if that is the case. To check and see if you have it installed…

  • Click the Apple icon in the top left of the screen
  • Go to System Preferences
  • Click the Java icon to access the Java Control Panel

From here, you can click the “About” button under the “General” tab, bringing up information about the currently installed version. If Java is not listed under System Preferences, your machine does not have it installed. If this is the case, download the legacy Java software from Apple’s website and run it before moving forward.

Java (Legacy) Download

3) Prepare the Minecraft Server

As we are now ready to launch the server, navigate to the folder you created when we first downloaded the software. Open the TextEdit application and go to the Format menu -> Make Plain Text. Paste the following text into the file and save it as “start.command” in our server folder.

#!/bin/bash
cd "$(dirname "$0")"
exec java -Xms1G -Xmx1G -jar minecraft_server.jar
  • Rename the value of minecraft_server.jar to match the name of the server file we downloaded. This will look similar to “minecraft_server.1.12.2.jar” but the version numbers may be different.
  • The -Xms1G and -Xmx1G assign 1 GB of maximum memory to the server when it is started. You can change this value to allocate more or less RAM as needed simply by changing the numerical values. For example, -Xms2G and -Xmx2G will give the server 2GB of maximum memory instead.

Save the changes when you are finished and make sure the “start.command” file is now in our folder. To grant ourselves permission to use it, open the Terminal application (located in Utilities) and type chmod a+x with a space at the end. Drag and drop the “start.command” file into the Terminal window, then press Enter to apply the changes.

4) Start the Minecraft Server

Double click the start.command we created in the previous step, where this will open a terminal window and launch the server. The initial run will cause errors but it will generate several files we need.

Close the terminal window and find the new eula.txt file in our server folder. Open this file in the text editor and locate the last line that says eula=false, then change the value to eula=true. This will accept the Mojang End User License Agreement and permit you to run an instance of Minecraft server software. Save your changes to the file and close it.

Double click the start.command file once again, where this should successfully launch the server GUI and bring it online. During the initial run, it may take several minutes as it generates your world, which you can observe via the console on the right hand side. Once complete, your server is running and ready for player connections!

Note: You many need to monitor lag and speed issues with a 3rd Party program on OSX if you start having choppy gameplay – Here’s a good Reddit thread that talks more bandwidth issues.

Make a Minecraft Server on Linux VPS

For those less inclined to host a Minecraft server at home, a cheap Linux based VPS is the perfect alternative. These have the added benefit of using server grade hardware, better network security and are of course always online. Unless you are hosting locally (i.e. for other users on your network), home servers will require extra ports be opened to the internet, which has inherent security concerns. This is often one of the most enticing perks of using a third party company to facilitate your server needs.

While there are plenty of options, we can definitely recommend Digital Ocean as a great choice for VPS. They have top notch performance, competitive prices and their system is a breeze to use. You just deposit a minimum of $5.00, click through a few settings and your Droplet (their term for server) is created almost instantly.

For these steps, we will be using Ubuntu 16.04 (x64) and assume you are connected via SSH. If you are new to Linux, you can use this Initial Server Setup Guide with Ubuntu 16.04 to get started.

1) Create the Server Directory

Before we grab the software, we first need to create a directory that will house all of the server files. For our example, we will proceed with the current path and name the folder “MinecraftServer”, then make that the current directory.

mkdir MinecraftServer
cd MinecraftServer

2) Download the Minecraft Server Software

Within our MinecraftServer folder, we can go ahead and grab the latest software from their website. Using the wget command, we will download the JAR into the folder we just created. Double check the Minecraft Download Page to ensure this is the latest version and update the URL if needed.

wget -O minecraft_server.jar https://s3.amazonaws.com/Minecraft.Download/versions/1.12.2/minecraft_server.1.12.2.jar
chmod +x minecraft_server.jar

Before we continue, we will also install the latest Java and Screen software as well. As Minecraft is written in Java, we must ensure we have the newest version available. We will use the open source implementation of Java 8, which is now required as of Minecraft 1.12. While Screen is an optional package, it will keep the server running after we have disconnected from the SSH session.

apt-get install openjdk-8-jre-headless screen

3) Launch the Minecraft Server

With Java 8 installed and the Minecraft software ready, we can prepare to launch our server. As a final step, use the following command to generate a eula.txt file in the MinecraftServer folder, with the contents “eula=true” set. The server will fail to start if this is not configured, where doing so confirms acceptance of the Mojang End User License Agreement.

echo “eula=true” > eula.txt

That’s it! We can now go ahead and launch the server with a couple basic parameters. If you installed Screen during step 2, we can start the server instance inside of it, keeping it online and running after we have disconnected from the session. Otherwise, just omit the first line and skip directly to the Java launch parameters.

screen
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

The Xms and Xmx flags set the amount of RAM that the Minecraft server is allowed to use. Make sure not to assign all of the system memory to your server, usually a minimum of 512 MB is still required for the operating system to function as well. As such, we can probably assign 1024 MB (or 1 GB) to our server if the VPS has 1.5GB, although this may vary in some cases.

Resources for Minecraft Server Hosting

Minecraft servers are easy enough to setup, yet there are infinite customization options that you can use to build the perfect virtual world. Once your server has been created, you can check out some of these other resources to learn commands, install mods and upload extra content. The list is ordered in terms of importance and complexity, where we suggest starting at the top and working through them at your own pace.

How to Modify the ‘server.properties’ Configuration File
How to Manage and Maintain a Minecraft Server
The MCMyAdmin Control Panel
How to Install Craft Bukkit on a Minecraft Server
How to Install Forge Mod on a Minecraft Server

REVIEW
Emil Dayan
Aug 14, 2018 at 12:49  |  Updated  Sep 10, 2018 at 15:14