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
How To Make A Minecraft Server On A Mac Computer
Now I am going to talk about the steps needed to build a Minecraft server using a Mac computer.
If the MacOS is one of the latest versions, it will have Java. If it is an older version of MacOS, legacy Java version needs downloading from Apple.
Follow the steps below:
exec java -Xms1G -Xmx1G -jar nogui
Refer to the information about port forwarding above for the Windows installation if wishing to make a Minecraft server available outside of the local network. If not, continue by following my instructions below.
Starting The Minecraft Server
Now onto the final part to build a Minecraft server, simply follow the steps I have outlined:
Read Also: How To Play Minecraft Servers On Ps4
Set Up Port Forwarding
Warning: This is probably the most challenging part of the tutorial and its also the section that can cause security risks. Ensure you have a parent with you when you complete this step and do not download anything extra.;
Port forwarding is required if you want your friends to connect to your server when they are connected to a different internet connection that you are connected to. Unfortunately, this step will be different depending on which router you are using. I will list the steps that it takes to get my Xfinity router set-up for port forwarding, but you will have to research your own router and follow its steps.;
The first step for me is navigating to the Port Forwarding section on Xfinitys website. I found this by googling How to Port Forward my Xfinity Router so I suggest a similar search for you, but with your specific routers name.;
The next step for me had common configurations to use, including Minecraft, so I went ahead and chose that. If you dont have this option, the important thing to know is to use port number 25565 for Minecraft.;
Any other port number will not work. Note that I blocked off my IP Address, this is the part that you want to keep secure from people you do not know or trust. Depending on your router, they may reserve a custom IP address for you . If thats the case, this is the IP Address you will provide to your friends. If they do not reserve one for you, you will have to use your own IP address.;
Port Forward To Play Globally
Port forwarding is what is required to let your friends connect to your server if they are not on the same local connection. If you want to play on a server locally on the same connection this step is not required. It is important to note that port forwarding might cause security risks so make sure you follow the port forwarding steps carefully.
Every router is different when it comes to setting up port forwarding. A router is what is used to create a wireless internet connection. You need to follow the steps to reach your routers admin page as we will be port forwarding a specific port address that Minecraft will use. Go to the following link below and click on the list of all routers and find your router. Skip all ads and do not download any software on this website. Additional software is not needed for this.
When you are on your specific router page follow the steps on setting up a port forward entry. This will differ from router to router but the general steps in common with most routers will be the following.Create a static IP address
Login to your router and navigate the port forwarding section
Create a port forward entry
This website explains each step for your specific router in depth. When you get to the step of creating a port forward entry make sure you name it something that is recognizable such as Minecraft and the port number should be 25565. The port forward website also has a very helpful explanation about port forwarding for Minecraft here.
You May Like: Minecraft How To Get Beetroot Seeds
How To Use A Premade Multiplayer Server With ‘minecraft Realms’
For a lot of Minecraft players, it’s all about the mods.;
However, if non-modded Minecraft is more than enough, or the idea of creating a server is such a headache that you’re willing to pay a small monthly fee, you can opt for “Minecraft Realms.”
“Realms” is a service where Mojang the company that makes “Minecraft” will build and provide you with a server. You don’t have to make it or run it, which is great if you don’t have the time, computer speed, or bandwidth to keep it constantly active.
Here’s how to use “Realms.”
Get The Latest Version Of Java
The first step in setting up a Minecraft server is making sure you have the latest version of Java installed. Minecraft requires Java to run the game and having the latest version will help us run our server without issues.
You can install the latest version of Java here. Once there, click the red Java Download button as you can see below:
Then, read and accept the terms by clicking the red Agree and Start Free Download button.
The Java setup run file should now be in the download folder of your computer. If you need help with finding the download folder, type in downloads into your computer search bar and open the Downloads folder.
Once in the downloads folder find the JavaSetup executable file and run this application. A popup window may appear asking if the application can make changes to your computer. Click to allow access, you may be asked to provide a password for these permissions.
Once the application loads click to install Java.
You may be asked to uninstall a previous Java version, do so as keeping an older version does not help with our server setup.
Once any previous versions are removed continue through the window prompts until Java is downloaded and up to date.
The first step in setting up a Minecraft server should now be complete. The following step we must take is downloading and setting up the actual Minecraft server folder.
Read Also: Hobbit Hole Minecraft
Connect To The Server And Create A World
Playing Minecraft on the same machine running your server isnt a good idea given the resources needed to run both. Doing so will likely create a laggy experience for everyone. We suggest running Minecraft on another PC if possible.
Step 1: Select Multiplayer.
Step 2: Check the box next to Do Not Show This Screen Again, and then select Proceed if this is the first time youre nagged about multiplayer.
Step 3: Select Add Server.
Step 4: Enter the server name.
Step 5: To allow remote players, enter the public-facing address assigned to your modem, along with the port. For example, the IP address would be something like 220.127.116.11:25565.
For local network play, enter the server PCs network address. You likely dont need to add the port.
Step 6: Select Done to complete.
Edit The Server Configuration Files
Open the server.properties file with your text editor of choice, and scroll down to where server-port and server-ip are. Make sure the server-port is set to the port that you just opened for port forwarding, and server-ip is your internal IP address.
These two fields should look like:
You can also change other Minecraft settings in this file, such as difficultly, game mode, PvP, etc. Once you make all your changes, save and close this file.
Also Check: What Does Heart Of The Sea Do In Minecraft
First Check The Version Of Java Installed
The first step needed to make a Minecraft server is to determine the version of Java installed on the computer. To do this:
Test The Server Locally
Now that the EULA agreement is accepted, you can run the script to start the server again . You should see more new files that were generated in the server folder. Once the configuration is set up and the world is generated, you can test to see if your server works.
Open Minecraft and click on multiplayer. In the server address bar, enter localhost and click connect.
Congratulations, you now own your very own Minecraft server! But now, you want to be able to play with friends, so you will have to open up the server to incoming connections.
Read Also: Random Tick Speed Command
How To Create A Minecraft Server On Windows Mac Or Linux Systems
Lets start with the basics. Setting up the actual server will take a little technical know-how. You need to understand, at least at a fundamental level, how a server and a network function, and you ought to be comfortable with command lines as well as the hardware youre using.;
Some questions people ask include:
;;; Do I need a specific type of computer to run a Minecraft server?;
;;;;;;No. You dont need a special computer, but youll likely do better setting it up on a desktop.;
;;; Can I run the server and play the game on the same computer?
;;;;;;Sure, with an explanation. Its possible to run the server and play the game on the same machine, but you need to have a pretty;powerful system to get the best possible performance.;
;;; Can I run a Minecraft server over a wireless connection?
;;;;;;This is not recommended. A wired connection is far more reliable and preferable.;
;;; Do I need any specialized hardware?
;;;;;;You could purchase server hardware, but a virtual private server or a dedicated server is a much simpler way to go. You;wont;have the hassle of maintaining your hardware, and its a scalable solution, in case you need more server power. Also, having;a hosted server means there is no risk of exposing your network to the world.;
With these points in mind, here are the steps you will take in setting up your Minecraft server, in a broad sense:
Download And Start The Minecraft Server Software
;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. Itll 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 Cant save server properties error?;Run the Minecraft server as an administrator by right clicking the .jar file and selecting Run as administrator.
Things To Consider Before Hosting A Minecraft Server
Benefits of Using Hosting Your Own Minecraft Server
- You are able to have complete control over the entire server at all times. If you want something done, you can make it happen as quickly as you can do it yourself. There is no need to rely on someone else doing things for you.;
- You have the ability to upgrade your computer however you desire to increase performance. Many server hosting companies offer higher premiums for higher specs, but if you happen to have the newest generation processor, the maximum amount of ram, and the biggest and most powerful graphics card, then your server can be one of the most powerful servers out there.
- It can be fun to setup and learn how to configure networking. Youll get to learn about various network features that you probably wouldnt need to know otherwise.
- It wont cost you anything other than what it takes to run your computer. Using a hosting company costs money, but by hosting your own server you will only pay what it costs to keep your computer running.;
Hosting your own Minecraft server can be very rewarding, but it does have a few drawbacks you should understand before attempting it yourself.;
Create Minecraft Server: Step
After you have decided on a suitable server, you can now create and set up your Minecraft server. Whether you choose Windows Server or a Linux distribution like Ubuntu or Debian as your system base is up to you.
Extensive instructions on how to create a Minecraft server for all operating systems are provided by the official Minecraft wiki.
In the following tutorial, we will show you how to get a Minecraft server running on Windows Server 2016 as an IONOS customer .
Don’t Miss: How To Find Buried Treasure In Minecraft Bedrock
Startup And Maintenance Script
Alternatively, you can manage/automate the startup and shutdown of the Minecraft server using a script such as the ones listed below:
- Minecraft Server Control Script is a server-management script for UNIX and Linux powered Minecraft servers. Features include:
- Run multiple Minecraft worlds.
Port forwarding is used when you have a router and you wish to let users connect to your server through it. If you wish to host your server for local reasons, it is not required that you do so. Keep in mind that port forwarding might cause security risks.
When port forwarding, it varies on how your router will ask you for the information. If you don’t understand on how your router wants you to input the information, try visiting PortForward.com for a tutorial.
Once you have managed to locate your router’s admin page, and find the Port Forwarding page; hit add new service or custom service. When you get a page asking to setup the new rule, it should prompt you on what you want to call it. You may name it as you wish, but for simplicity, name it “minecraft“. Then, you want to look for “type”. If “TCP/UDP” or “Both” isn’t an option you will have to create two rules for both protocols. For the ports , enter 25565. If it asks for anything else other than output IP , leave it alone and continue.
To find your computer’s IP address, use the following steps:
Now it is time to configure and connect.
Installing The Necessary Software Packages And Configure The Firewall
With your server initialized, your first step is to install Java; youll need it to run Minecraft.
Update the package index for the APT package manager:
- sudo apt update
Next, install the OpenJDK version 16 of Java, specifically the headless JRE. This is a minimal version of Java that removes the support for GUI applications. This makes it ideal for running Java applications on a server:
- sudo apt install openjdk-16-jre-headless
You also need to use a software called screen to create detachable server sessions. screen allows you to create a terminal session and detach from it, leaving the process started on it running. This is important because if you were to start your server and then close your terminal, this would kill the session and stop your server. Install screen now:
- sudo apt install screen
Now that you have the packages installed we need to enable the firewall to allow traffic to come in to our Minecraft server. In the initial server setup that you performed you only allowed traffic from SSH. Now you need to allow for traffic to come in via port 25565, which is the default port that Minecraft uses to allow connections. Add the necessary firewall rule by running the following command:
- sudo ufw allow 25565
Now that you have Java installed and your firewall properly configured, you will download the Minecraft server from the Minecraft website.