How To Setup A Minecraft: Java Edition Server
Note: This guide shows you how to set up and configure a Minecraft Server. However, doing this requires changing your home network’s configuration and is not recommended unless you know what you are doing. If you wish to purchase a small private server for friends, check out Minecraft Realms. If you still wish to set up your own private server, do so at your own risk as we cannot offer support for home networks or privately made servers.
Here is a guide to help you create a server so your friends can join and play together!
As a prerequisite, you should make sure you have Java installed and up to date on the computer that will host the server so it can run .jar files.
Recommended By Our Editors
Head to the official site,
Scroll down to the Server Software section, and look for the Java Edition Server link.
Your browser may state that this file may be harmful to your computer, or something to that effect. You’re downloading the file directly from the Mojangs official site, so you dont need to stress this. Click the Keep option.
Once the file has finished downloading, which should not take long at all, drag it into the Server folder.
Open the Server folder you should see the server.jar file inside. Technically, you could simply click the file, and let it create all the extra files you need. Don’t do that. Instead, you’re going to create a batch file, a script that launches the server for us. There’s a reason for this: You’ll want to specify commands as needed, and spot errors via the command window. Writing a batch file lets you do that. This isn’t nearly as daunting as it sounds. In fact, the instructions to do this are on the server.jar download page.
Choose An Appropriate Location For Minecraft Server Files
- Before downloading, set the system location from which the server should run
- The server would produce prerequisite configuration files during the first instance. They all are vitally important and should be collectively stored in a separate folder to ensure quick access.
- For the sake of access, you might assign a shortcut key to the folder and save it on your desktop. It is not mandatory though. You can save it at any location of your choice.
- Go to the Minecraft website and download the Java.jar file which is the server software. It should be stored in the same location where you saved the installation files.
- Start the server by double-clicking the .jar file which will generate configuration files. Make necessary modifications before the server gets ready for use
- Open eula.txt file and replace eula=false with eula=true which is mandatory to start the Minecraft server.
- You might encounter an error alerting that the server properties cant be saved. In that instance, right-click .jar file Run as an administrator that will enable you to run the Minecraft server as an administrator.
Enable port forwarding
Go to the file named Server Properties. Make the required changes in key server settings and then save it. Its default server port is Port 25565
Start the Minecraft server
Open windows command prompt to start the Minecraft server.
- Go to the folder that is containing the Minecraft server file and give the following command
Java -Xmx1024M -Xms1024M -jar nogui
You May Like: How To Play Minecraft On Piano
Port Forwarding Configure Your Router
NOTE: If you get lost in this step with setting up the Port Forward, please refer to our article on setting up a new Port Forward by clicking here.
Once you have successfully logged into your router, you’ll be looking for something along the lines of Port Forwarding,Apps & Gaming,Security, etc. This could be placed in a Security section, Advanced, a Port Forward section, or an Apps & Gaming section. Unfortunately this differs for every router, so be sure to look through all fo the settings until you find where you can add a port forward.
From there, add a new Port Forward, and for the name, we’ll call it Minecraft.
For the External Port, put 25565, and for the Internal Port add the numbers 25565 as well.
Note: The names of the ports may or may not be called External and Internal. Either way, place the numbers in the open boxes for port numbers.
For Protocol, select the option that allows you to use both TCP and UDP. Most routers will have an option for Both or TCP/UDP. If, however, your router does not allow you to do that, simply select one and then create another port forward with the same settings for the other.
From there, save the settings you’ve changed. You must save these settings in order for the server to be accessible by other people with the IP address. Be sure to Apply the settings after saving if required.
Configuring And Running The Minecraft Server
Now that you have the Minecraft jar downloaded, you are ready to run it.
First, start a screen session by running the screen command:
Once you have read the banner that has appeared, press the SPACE bar. screen will present you with a terminal session like normal. This session is now detachable, which means that youll be able to start a command here and leave it running.
You can now perform your initial configuration. Do not be alarmed when this next command throws an error. Minecraft has designed its installation this way so that users must first consent to the companys licensing agreement. You will do this next:
- java -Xms1024M -Xmx1024M -jar minecraft_server_1.15.2.jar nogui
Before examining this commands output, lets take a closer look at all these command-line arguments, which are tuning your server:
The first time you run this command, which normally starts your server, it will instead generate the following error:
Output : Failed to load properties from file: server.properties : Failed to load eula.txt : You need to agree to the EULA in order to run the server. Go to eula.txt for more info.
These errors were generated because the server could not find two necessary files required for execution: the EULA , found in eula.txt, and the configuration file server.properties. Fortunately, since the server was unable to find these files, it created them in your current working directory.
First, open eula.txt in nano or your favorite text editor:
- nano eula.txt
Recommended Reading: Code. Org/minecraft
Go Ahead And Download The Server Files
While remaining inside the directory you created, you can use the following command and the server files will download. Type in:
wget -O minecraft_server.jar https://s3.amazonaws.com/Minecraft.Download/versions/1.12.2/minecraft_server.1.12.2.jar
I recommend checking on the Minecraft download page to find the latest version. If there is a newer version, replace the download link in the line above.
Install, then go ahead and run screen. This allows the Minecraft server to continue to run while not connected. Type in the following:
yum install screen
To start the Minecraft server type in the following:
java -Xmx512M -Xms512M -jar minecraft_server.jar nogui
I do want to stress the fact that it is possible to swap the Xmx and Xms settings. This is linked to the memory allocated for the Minecraft server. An example might be entering -Xmx1G -Xmx1G if there is a need to change the RAM to 1GB.
Bear in mind that the available memory will depend on the shared hosting plan you chose, if you have gone down that route to build a Minecraft server.
You can make sure things are running correctly by stopping the Minecraft server using the command stop.
Now edit the file server-properties by typing:
Download The Serverjar File
Once you have the latest version of Java downloaded, you need to server.jar file.
If youre following along with the images/gifs in this tutorial, you may find you have a different version number than what is showing. Thats okay, the steps should be the same.
You may get a warning from your computer saying that this file may be harmful. This is a normal warning for any .jar file. If you dont know where it comes from, then you should be worried about these. That being said, I think we can trust Minecraft on this one.
If youre given the option, save this file into the My Awesome Server folder. If not, just copy and paste or drag the download into the folder once it finishes.
You May Like: Banner Numbers Minecraft
Why You Should Make Your Own Minecraft Server
Minecraft offers unlimited possibilities to create a virtual world, a place where you can let your imagination loose and build some incredible pieces of work. Whats great, you can take such experience to a whole new level by making your own Minecraft server.
Owning a private server gives you more control over your gameplay. You can invite your friends or other users, create your own rules, install any mods, and much more.
Unfortunately, many people think that building a private Minecraft server is difficult and expensive. However, the truth is, you only need a little bit of knowledge about the command-line interface. Whats more, you can set up the server on your Windows, Linux, or macOS computer, so theres no need to buy a new machine.
If youre ready, its time to learn how to make a server for Minecraft.
Creating Your Own Minecraft Mods
If you enjoy Minecraft Mods and want to create your own custom mods for use in your own servers, CodaKid has a series of courses that can teach you how to make your own custom creatures, biomes, dimensions, insane explosions and special effects, and more!
Minecraft coding is fun and creative, and teaches you real Java programming with the Eclipse IDE.
Our courses even include messaging and screenshare support from live engineers if you ever get stuck, and our courses even come with a two week free trial!
We hope you enjoyed How to make your own Minecraft Server, the Ultimate 2021 Guide. If you enjoyed our Minecraft server tutorial, wed love it if you could share it with friends.
Also for fans of modding, check out this free tutorial called How to install Minecraft Forge. Hope you find it helpful!
If you have any questions or comments, please leave them below! If your server configuration is not working, please make sure to follow this tutorial again and double check your work. You can also write us and ask questions however please keep in mind that we are extremely busy serving customers and we may take a few days to respond.
Also Check: Minecraft Import Skins
Find The Best Web Host For Your Minecraft Server
There are many web hosts that offer Minecraft servers, including , Apex, Hostinger, and PebbleHost, so your first step should be to shop around. You’ll find various server requirements depending on your Minecraft world size, the number of players that’ll connect to your server, and whether you want to install mods. Naturally, youll pay more out of pocket if you purchase a larger plan, but many web hosts let you upgrade from a lower service tier to a higher service tier without too much fuss. So if youre just starting out, it may be safer to start with a smaller plan and upgrade later as your needs grow.
The most important thing to consider is RAM and virtual CPU allocation. Your server quality and number of players hinge on the server’s memory. 2GB of RAM could support up to 10 players before lag creeps into the game. Virtual CPU allocation affects gameplay smoothness the more CPUs or higher quality CPUs powering your server, the better. As mentioned earlier, if you just want to play with a handful of friends, a basic plan should suffice. If youre hoping to grow a community, however, you must invest money into a high-end hosting subscription.
The basic server creation steps are more or less the same, regardless of the service you choose. Here’s a quick walkthrough of what you should do:
Select the plan suitable for the RAM total that youll need to properly run Minecraft.
Configure your server, specifying the region, game version, and add-ons.
Download The Minecraft Server Software
Open TextEdit. Set the format to plain text. Enter the following:
exec java -Xms1G -Xmx1G -jar nogui
Save the file as start.command in the same folder where the servers .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.
Don’t Miss: Mojang Redeem Code
How To Build A Minecraft Server
Building a Minecraft server takes five simple steps. I will take you through these steps providing you with all the information needed in order to get up and running.
The five steps are as follows:
How To Join A Minecraft Server
We have a video tutorial on how to connect to your Minecraft server:
If you would like to join a Minecraft PC / Java Edition server, there are a few things to consider:
- The server must be running any Minecraft PC / Java Edition server type.
- Have Minecraft installed on your computer. You may download the installer from Minecraft’s official site:
- Your Minecraft client must be the same version that the server runs on. You can find the version on the bottom-left corner of your Minecraft client.
You May Like: Minecraft Logo Maker Free
How To Make A Minecraft Server
Minecraft has sold millions of copies worldwide. Up to 2018, 154 million copies had been sold which places the game as the second-best selling, only being beaten by Tetris. While the game is popular among players for building fantasy worlds using blocks, there is a lot more to it.
Minecraft teaches how to get into coding, developers expand it with mods and there is a huge community. Those who delve deeper into Minecraft more seriously go on to make a Minecraft server and here I will explain how.
How To Identify Your Server Address
To get started, you need to identify the address of the server you want to join. If you own a Shockbyte server, you can find your server address on your Multicraft server panel . This will be labeled as “Server Address” as shown in the screenshot below.
In the example above, the server address is 192.168.2.1:12345. Breaking this down, the server IP is the set of numbers before the “:” symbol, and after this are the last five numbers which are the server port.
Read Also: Discord Logo Maker Free
How To Add Mods
To add mods to your server you will need to ensure that its version is set to Forge. After downloading the mods you would like log into your server panel, then FTP File Access, and get into the mods/ folder. Once there, simply click “Upload” to upload them. The mods will load after restarting the server.
Starting The Minecraft Server
Now onto the final part to build a Minecraft server, simply follow the steps I have outlined:
You May Like: Free Minecraft Server Hosting 24/7 Forever
Choose Where To Save The Server Files For Minecraft
Now it is time to move forward onto the next step.
Before downloading the Minecraft server files to the computer, choose a location to save them. A word of warning make a dedicated folder to save them in the location on the hard drive. The location can be anywhere you want on the hard drive, it does not matter.
Making a dedicated folder is essential because when running the Minecraft server for the first time it creates configuration files. By making a specific Minecraft file folder, all files will be together.
How To Run A Simple Local Minecraft Server
Jason Fitzpatrick is the Editor in Chief of LifeSavvy, How-To Geek’s sister site focused life hacks, tips, and tricks. He has over a decade of experience in publishing and has authored thousands of articles at Review Geek, How-To Geek, and Lifehacker. Jason served as Lifehacker’s Weekend Editor before he joined How-To Geek. Read more…
While its easy enough to share a Minecraft map with other local players on your network, its nice to be able to run a dedicated server so people can come and go without the original game host loading up Minecraft. Today were looking at how to run a simple local Minecraft server both with and without mods.
Don’t Miss: Piano In Minecraft