How to make a minecraft server


We’ll show you how to make a Minecraft server with beginner-friendly step-by-step instructions. It will be a persistent multiplayer server that you can play on with your friends from all around the world. You don’t have to be in a LAN.

At a very high level, making a Minecraft server follows a few basic steps:

  1. Install the latest version of Java

  2. Install the latest version of the Minecraft server software

  3. Configure your server & network

  4. Start the server

  5. Check that your server is accessible

Things to keep in mind before you start.

Setting up a server takes some effort. You need a bit of technical know-how to properly configure a Minecraft server.

You should have a basic understanding of computer and networking concepts, which are fundamental to managing any kind of server.

Specifically, you should be comfortable and familiar with:

  • Using the command line
  • Networking (IP, DHCP, ports)
  • Your system configuration
  • Your network configuration
  • Your router configuration (for home setups)

Running a Minecraft server from home?

You don’t need a top-of-the-line system to run a Minecraft server, but a desktop computer is ideal.

While you can run a Minecraft server and play on the same machine, you’ll need a more powerful system to do it.

And lastly, use a wired ethernet connection for your server instead of wireless. A wired connection is more reliable.

What if you don’t want to host your server at home?

Hosting any kind of server from home means you’re exposing your home network to the world.

If you’d rather not take that risk, then you can use a hosting provider instead. You’ll need to pay a monthly or annual fee, but you won’t have to deal with the hassle of managing the server hardware.

A Virtual Private Server is a good fit if you’re just getting started. Just keep in mind that you’re sharing hardware with other users, so keep an eye on resource usage.

If you need a little more oomp and you want to hook up a lot of players, you might try a dedicated server instead.

Why you should NOT use your personal computer

We noticed lots of tutorials showing you how to host a server on your own computer. There are downsides to doing that, like:

  • Your home internet is not secured enough to handle DDoS attacks. Game servers are often prone to DDoS attacks, and your home network setup is most probably not secured enough to handle them. It’s most likely not powerful enough to handle a small attack.
  • You’ll need to handle port forwarding. If you’ve tried making a Minecraft server on your home network, you’ve surely stumbled upon port forwarding and had issues with it.
  • You’ll need to keep your computer on at all times. Your electricity bill will sky-rocket and you’ll add unnecessary load to your hardware. The hardware most servers use is enterprise-grade and designed to handle loads, with improved stability and longevity.
  • Your home internet is not fast enough. Home networks are not designed to handle multiplayer games. You’ll need a much larger internet plan to even consider making a small server. Luckily, data centers have multiple high-speed, enterprise-grade internet connections making sure they have (or strive to have) 100% uptime.
  • Your hardware is most likely not good enough. Again, servers use enterprise-grade hardware, latest and fastest CPUs, SSDs, and much more. Your personal computer most likely does not.
  • You probably use Windows/MacOS on your personal computer. Though this is debatable, we believe that Linux is much better for game hosting. Don’t worry, you don’t really need to know everything about Linux to make a Minecraft server (though it’s recommended). We’ll show you everything you need to know.

Our tip is not to use your personal computer, though technically you can. It’s not expensive to buy a cloud server. We’ll show you how to make a Minecraft server on cloud hosting below. It’s easy if you carefully follow the steps.

How to Make a Minecraft server (Video)

How to Make a Minecraft server on Windows

Get the latest Java version

Since Minecraft is based on Java, we will have to install the latest version to ensure that everything runs smoothly. You may use the command prompt to check if you meet to requirements. Execute the following:

java -version

Then, make sure it matches the latest Java version in the official website. Download and install it in case your current version is older or if you do not have Java at all. How to Make a Minecraft server-1

Choose a location for your Minecraft server files.

Before you download the Minecraft server software, choose a location on your PC where you’d like to run the server from.

When you first run the server, it’ll create a few configuration files. It’s best to have all of these files stored in a dedicated folder.

You could place this folder on your Desktop, in your Documents folder, in your Programs folder, or anywhere else you’d like. It’s entirely up to you.

Download and start the Minecraft server software.

Download the server software from the Minecraft website. It comes as a Java .jar file. Save it to the location you chose in the previous step.

Double-click the .jar file to start the server. It’ll create the server configuration files, which need to be modified before the server is ready to use.

Accept the EULA: A text file called eula.txt was created. Open the file in a text editor and change eula=false to eula=true. Failing to accept the EULA will prevent you from starting the Minecraft server.

What if you see a “Can’t save server properties” error? Run the Minecraft server as an administrator by right-clicking the .jar file and selecting “Run as administrator”.

Enable port forwarding on your router.

Note: Port forwarding can be a security risk.

If you’re just hosting a server for players on your local network, you don’t need to worry about port forwarding. If, however, you want to make your server accessible to the world, you’ll need to enable port forwarding on your router. (To learn more about port forwarding, check out PortForward.com for tutorials.)

Refer to your router’s documentation to find specific instructions on how to configure port forwarding for your device. For Minecraft, you’ll need to forward TCP port 25565.How to Make a Minecraft server-2

You’ll also need to enter your server’s local IP address as the Output IP or Server IP for the forwarded port. This tells the router which device to point at. To find your server’s local IP, open a command prompt and enter ipconfig.

Installing Minecraft Server on Windows

Next, you should choose a location where you’ll set up the Minecraft server. To keep everything organized, we recommend creating a dedicated folder for this task. How to Make a Minecraft server-3Move the .jar file to the directory that you created earlier and double click it.Before proceeding to start the Minecraft server, you will need to accept the EULAagreement. This can be done by editing eula.txt file and changing from eula=false to eula=trueHow to Make a Minecraft server-4

Running Minecraft Server

You can start the Minecraft server with the help of Windows command prompt. Use it to navigate to your dedicated Minecraft server directory. For example:

cd Desktop/MinecraftServer

Initiate Minecraft server by executing the following command:

java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

Alternatively, you may double click the .jar file again and it will also do the trick. You might need to allow the Minecraft server through the firewall. How to Make a Minecraft server-5

If you see a similar screen, it means that your Minecraft server has been successfully started: How to Make a Minecraft server-6

Make a Minecraft server on your Mac

Installing Java and Screen

Java is included by default if you’re using a newer MacOS version. You can double check by entering this command in your Terminal:

java -version

If it’s not available, you may download a legacy Java version from the Apple website

Choose a location for your Minecraft server files.

Create a folder to contain your Minecraft server files. You could create the folder on your desktop, for example, but the choice is completely up to you.

Download the Minecraft server software.

Download the server software from the Minecraft website. It comes as a Java .jar file. Save it to the location you chose in the previous step.

Open TextEdit. Set the format to plain text. Enter the following:

#!/bin/bash
cd "$(dirname "$0")"
exec java -Xms1G -Xmx1G -jar {server file name} nogui

(Replace {server file name} with the actual server file name.)

Save the file as start.command in the same folder where the server’s .jar file is located.

Open the Terminal and grant permissions for the new start.command file so it can be run. Type chmod a+x with a space after the command. Drag and drop the start.command file into the terminal window. Press Enter.

Enable port forwarding on your router.

Note: Port forwarding can be a security risk.

If you’re just hosting a server for players on your local network, you don’t need to worry about port forwarding. If, however, you want to make your server accessible to the world, you’ll need to enable port forwarding on your router.

Refer to your router’s documentation to find specific instructions on how to configure port forwarding for your device. For Minecraft, you’ll need to forward TCP port 25565.

You’ll also need to enter your server’s local IP address as the Output IP or Server IP for the forwarded port. This tells the router which device to point at. To find your server’s local IP, open the Terminal and enter ifconfig.

Installing Minecraft Server on Mac

To keep everything neat and organized, it’s best to dedicate a folder for your Minecraft server.How to Make a Minecraft server-7Upload it to the created directory. Then, open TextEdit and set the format to plain text (Format › Make Plain Text). Paste the following:

#!/bin/bash
cd "$(dirname "$0")"
exec java -Xms1024M -Xmx1024M -jar minecraft_server.jar nogui

Save this file as startmc.command in the same directory where the Minecraft server setup file resides. To make it work, execute permission will be needed. We can grant them with the help of Terminal located in Applications › Utilities section. Once opened, enter your dedicated Minecraft folder. For example:

cd Desktop/MinecraftServer

You can grant the required permission with the help of this command:

chmod a+x startmc.command

Running Minecraft Server

If all steps were followed correctly, you’ll be able start your Minecraft server by double clicking the startmc.command file. After that, a new Terminal windows will pop up. How to Make a Minecraft server-8You may notice a few missing file/directory warnings when doing it for the first time. No need to worry though, as that is completely normal!

Start the Minecraft server.

Double-click the “start.command” file you created in step 3. A Terminal window will open. You’ll probably see error messages the first time you run the server. This is normal.

Once the server is running, you can invite others to connect to your server via your local IP address if they’re on your home network, or via your external/public IP address if they’re not on your home network.

You can find your public IP address by searching for “my ip address” on Google.

To check if your server is accessible, enter your public IP address into the Minecraft Server Status Checker.

Make a Minecraft server on a Linux host

If you’re not inclined to host a Minecraft server at home, you can spin up a Linux hosting plan to do it instead. This way you’re not responsible for managing any of the hardware, plus you’re not exposing your private home network to the public.

As mentioned before, a Linux VPS hosting is a lightweight option if you’re experimenting or not expecting a lot of players to join your server. If, however, you’re expecting a lot of players, you should look at using a dedicated Linux server instead.

To follow these steps you’ll need to connect to your hosting with SSH.

1. Install Java

While SSH’d into your host as the root user, enter the command:

    apt-cache search openjdk

This’ll list the available OpenJDK packages that can install Java. For this example we’ll select openjdk-7-jdk, which is the OpenJDK 7 Development Kit.

Update the list of available packages from the remote repositories:

    apt-get update

Then install the selected software package:

    apt-get install openjdk-7-jdk

Press “Y” when prompted to authorize the required storage space for installation. Once that’s done, verify that Java has been successfully installed:

    java -version

You should see the version of Java that has just been installed.

2. Create a location for your Minecraft server files.

Create a directory on your host where the Minecraft server files will be saved, then change to that directory.

    mkdir minecraft
    cd minecraft

3. Download the Minecraft server files.

Within the Minecraft directory, run the wget command to download the Minecraft server files:

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

(Tip: Double-check the Minecraft download page for the URL to the latest version.)

Next, we’ll need to install and run “screen”, so that your server continues to run even when you’re not connected:

    yum install screen
    screen

4. Start your Minecraft server.

java -Xmx512M -Xms512M -jar minecraft_server.jar nogui

(Tip: You can change the -Xmx and -Xms settings to adjust allocated memory for the Minecraft server. For example, you could enter -Xmx1G -Xmx1G to bump it up to 1GB of RAM. The available memory will depend on your hosting plan.)

To make sure everything is running correctly, stop your server with:

    stop

Then edit the “server.properties” file and set:

    enable-query=true

Save the “server.properties” file and restart your server. From there, enter your server IP address into the Minecraft Server Status Checker to see if it’s publicly accessible.

5. Point a domain at your Minecraft server.

Providing players with an easy-to-remember domain name instead of a complicated IP address makes it even easier for people to connect to your Minecraft server.

It’s super simple: Update your domain’s DNS records by adding an “A” record for your domain (using @ as hostname), or subdomain (using something like “mc” as the hostname), that points to your Minecraft server’s IP address.

Here is the game on Minecraft Server

Minecraft Game

How to Make a Minecraft Server – FAQs

We’ll answer some frequently asked questions about Minecraft Servers and our guide.

How do I restart the Minecraft server?

If you followed every step from our tutorial, including enabling the server to start on boot, you can just reboot your Ubuntu server. If you didn’t set it up to start at boot, you can just run the start script again which will restart the Minecraft server:

/opt/minecraft/startminecraft.sh

How do I configure my Minecraft server?

You can configure your server using the server.properties file. Check the Minecraft Wiki for more info, though you can leave everything as-is and it will work perfectly fine.

If you want to change the game mode, difficulty and stuff like that, you can use the server console. Access the server console by running:

screen -r minecraft

And execute commands there. Commands like:

difficulty hard
gamemode survival @a

You may need to restart the server depending on what command you used. There are many more commands you can use, check the wiki for more.

How do I upgrade my Minecraft server?

If there’s a new release, you need to do this:

Navigate to the minecraft directory:

cd /opt/minecraft

Download the latest version, example 1.12.3 with wget:

wget https://s3.amazonaws.com/Minecraft.Download/versions/1.12.3/minecraft_server.1.12.3.jar

Next, run and build the new server:

java -Xms2048M -Xmx3472M -jar minecraft_server.1.12.3.jar nogui

Finally, update your start script:

nano /opt/minecraft/startminecraft.sh

And update the version number accordingly:

#!/bin/bash
cd /opt/minecraft/ && java -Xms2048M -Xmx3472M -jar minecraft_server.1.12.3.jar nogui

Now you can restart the server and everything should go well.

Why is your Minecraft server tutorial so long, and yet others are only 2 lines long?!

We tried to make this beginner-friendly and be as detailed as possible. We also showed you how to make the Minecraft server persistent and start it automatically at boot, we showed you how to configure your server and everything. I mean, sure, you can start a Minecraft server with a couple of lines, but it would definitely suck, for more than one reason.

 

How do I install mods on my server? How do I install plugins?

Our article is intended to be a starting guide. You should check the Minecraft wiki for more info, or just google it. There are plenty of tutorials online.


0 Comments

Your email address will not be published. Required fields are marked *