Creating your own Minecraft Server (All Platforms)

If you’re one of the millions of players worldwide who enjoy Minecraft, you no doubt wish there was a way to take creating your virtual world to a whole new level. As much fun as this game is already, imagine being able to create your own rules and then invite your friends to play in your very own environment, undisturbed by unknown guests and visitors. By following these simple instructions, you can create your own Minecraft hosting server and take your gameplay experience to new heights! Whether you’re playing Windows, Linux, or Mac OSX, it is easy to create your own Minecraft Server.

Creating a Minecraft Server on Windows

  • If you are playing on a Windows PC, open up command prompt and type the following command:
java -version
  • Check the resulting data to see if you have the latest version of java installed, by visiting Java’s official website. If you do not have the latest version installed, you can visit the site now and follow the instructions to install.
  • Next, visit the server page on the Minecraft website and download the .jar file.
  • Create a new folder to house the .jar file you’ve downloaded and move the file to that folder.
  • Start the setup by double clicking, thus creating an eula.txt file.
  • Open up the eula.txt file using a text editor, and change the EULA (End-User License Agreement) value from false to true.
  • That’s it! Now you simply run the server by double clicking on the .jar file. Bear in mind that on the first run, you will need to allow the Minecraft hosting server through your PC’s firewall by clicking “Allow Access” when you are prompted.

Creating a Minecraft Server on macOS

  • Newer versions of macOS include Java pre-installed, so that takes care of that. Your first step here would therefore be in to create a folder to house your Minecraft server and download the setup program from the Minecraft website.
  • Open up TextEdit and create a plain text file by clicking Format and then Make Plain Text. Copy and paste the following script into your text file:
#!/bin/bash
cd "$(dirname "$0")"
exec java -Xms1024M -Xmx1024M -jar minecraft_server.1.14.4.jar nogui
  • Save the file as startmc.command. Be sure to save this file in the same folder that houses the Minecraft server file.
  • Now, open a Terminal window and enter the command that navigates you to the Minecraft folder. This would be the command ‘cd’ followed by the path that leads to location of the Minecraft folder. For example, if you the folder to your desktop, our command would look like this:
cd Desktop/MinecraftServer   
  • Next, Type the following command:
chmod a+x startmc.command

This gives the file permission to run on your computer system.

  • To start the server, you click on the startmc.command file. If you did everything correctly, a new Terminal window will open up. On your first run, you may see a message which says that a file is missing. That message can be ignored, as this is normal on the first run.

Creating a Minecraft Server on Linux

Things are a bit more complicated on this platform, which is why this tutorial was left for last. If you enjoy Minecraft on Ubuntu or CentOS, you must first be aware that this tutorial requires that your system be updated to Ubuntu 16.04 or CentOS 7. It is also required that you have root SSH access to your system in order to complete the following tasks.

1. Get Java and Screen on your server

First you must install Java and Screen on your Linux device. Do this by opening a terminal and connecting to your server by entering the following command:

ssh [your-server-username]@[server-ipaddress]

2. Check that java is installed on your system by entering the java -version command:

java -version
  • If your resulting message shows that java is not installed, run the following commands to download and install it.

Ubuntu:

    • sudo apt-get update
    • sudo apt-get install default-jdk

CentOS:

    • sudo yum update
    • sudo yum install java -y
  • Next, install Screen on your device by entering the following command:

Ubuntu:

    • sudo apt-get install screen

CentOS:

    • sudo yum install screen -y

Run your Minecraft server

Now that you have Java and Screen installed, it is time to install and run the Minecraft Server. First , create a directory (folder) to house the Minecraft server files by entering the following command in a terminal shell:

mkdir minecraft
  • Navigate to the created Minecraft directory:
cd minecraft
  • Install wget in order to be able to download the required files:

Ubuntu:

    • sudo apt-get install wget

CentOS:

    • sudo yum install wget -y
wget https://launcher.mojang.com/v1/objects/3dc3d84a581f14691199cf6831b71ed1296a9fdf/server.jar -O minecraft_server.1.14.4.jar
  • Enter the following command to run the Minecraft Server setup:
java -Xmx1024M -Xms1024M -jar minecraft_server.1.14.4.jar nogui
  • Running the setup file creates an EULA file, which must be altered to show that you accept the License Agreement. To do this, run the following command, and change the value from false to true:
sudo nano eula.txt
  • Save the file using the combination command CTRL + X, following by pressing the Y
  • Now, activate Screen using this command:
screen -S "Minecraft server 1"
  • Now that you have the server setup as well as Screen in place, it is time to run the Minecraft hosting server. Type the following command:
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
  • Now, here’s the explanation of what all that was entered in that command means. The Minecraft requires a minimum of 1024 MB of RAM to run. This equates to 1 GB. If you wish to increase the amount of RAM allocated to the server, you can change the value to 2048 or higher.

Final Lap

That’s it! Your server now runs in the background on your Linux system. When you are ready to dismiss Screen, use the key combination CTRL + A, then When you want to reopen a Screen window, type the following command:

screen -r

If you need to make changes to your server’s settings, use the nano file editor like so:

nano ~/minecraft/server.properties

Conclusion

Creating a Minecraft hosting server is that simple, regardless of the platform you are using. By following these simple steps, you can take your Minecraft experience and that of your friends to new heights. Be careful when changing server settings, as the slightest incorrect alteration might cause unwanted effects. Most importantly, be safe, and have fun.