How to host a Minecraft Server

You want a Server Rent your own server
fully customized Layten Hosting

How to make a Minecraft server

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

  1. Install the latest version of Java
  2. Download and start the Minecraft server software

Click here to jump to the guide on how to make a Minecraft server for a Mac, and here for the guide on how to make a Minecraft server with your own Linux server.

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; 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.

Layten Hosting 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 oomph and you want to hook up a lot of players, you might try a dedicated server instead.

Make a Minecraft server on your Windows PC

1. Get the latest version of Java.

Open the Windows Control Panel. Under Programs, look for Java, and click Update Now.

Open a command prompt and enter java -version. You should see a version number.

Check the Java website to see what the most recent version is.

If your version is outdated, or if you donโ€™t have Java installed, download it from the official website.

2. 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 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.

3. 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โ€.

4. 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.

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.

5. Start the Minecraft server.

To start the Minecraft server, open the Windows command prompt.

Navigate to the file path where the Minecraft server file (named something like โ€œminecraft_server.1.12.2.jarโ€) was installed.

Start the server with the following command:

java -Xmx1024M -Xms1024M -jar {server file name} nogui

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

If youโ€™d rather use the serverโ€™s UI, exclude the โ€œnoguiโ€ parameter:

java -Xmx1024M -Xms1024M -jar {server file name}

You can also create a .bat file to batch the commands together.

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.

6. Connecting to your server

Players can join your server by following these steps:

  1. Selecting โ€œmultiplayerโ€ in Minecraft.
  2. Clicking โ€œadd serverโ€.
  3. Entering your server name.
  4. Entering your server address. Your server address is your IP address followed by the port number 25565. You can find your public IP address by searching for โ€œmy ip addressโ€ on Google. If you have an IPv6 address, you should put square brackets [] around it
  5. Clicking โ€œdoneโ€.
  6. Minecraft should now connect to the server and players will be able to click โ€œjoin serverโ€.

If you encounter any problems, check if your server is accessible by entering your public IP address into the Minecraft Server Status Checker.

Make a Minecraft server on your Mac

1. Make sure you have Java installed.

Newer versions of MacOS includes Java by default. If youโ€™re running an older version of MacOS (OS X), you may need to download the legacy version of Java from the Apple website.

2. 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.

3. 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.

4. 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.

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.

5. 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.

Follow these steps to have people connect to your server.

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 plan from Layten 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. (If youโ€™re not familiar with the process, this Help article has you covered.)

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.

Note that it can take up to ~24 hours for DNS changes to take effect globally.

If youโ€™re not sure how to change DNS records, take a look at this Help article for adding an A record.

Leave a Comment