How To Make A Minecraft Server



We will show you how to create a Minecraft server using easy-to-follow steps. It will be a persistent, multiplayer server that you and your friends can play on together. You dont have to be connected to a LAN.



How to Make a Minecraft Server - Quick Guide



This is our "Table to Contents" if you need to quickly get to the point. We recommend reading through everything.



Learn stuff (optional) Learn more stuff (optional) Requirements (required) Install and start the Minecraft server (required) Run the server even after you log out of your VPS (optional) Make the server automatically start at boot (optional) Configure your Minecraft server (required) FAQs (optional) Need specialized managed Minecraft server hosting? Host Havoc will give you a coupon to get a server.



Before you get to the instructions, here are some things you should know.



Reasons why you would NOT use a specialized Minecraft server hosting provider



Since you're here, you're obviously interested in hosting your own Minecraft server. There are many reasons why you wouldn't use a specialized Minecraft server hosting provider. Here are some examples.



They're slow most of the time. This is because the resources are shared with multiple users. It becomes overloaded at some point. Most of them oversell their servers too. You don't have full control over the Minecraft server or the actual server. You can't customize anything. You're limited. These hosting plans are limited in some way.



Of course, there are positives to using a Minecraft hosting provider. The best part is that you dont have actually to do the stuff well discuss below. But where is the fun in that?



Why you should NOT use your personal computer to make a Minecraft server



There are many tutorials that show you how to host your own server. However, there are some downsides to this:



DDoS attacks are not possible if your home internet infrastructure is not secure enough. DDoS attacks are common on game servers, so your home network setup may not be secure enough to handle them. It is likely to not be strong enough to handle even a small attack. Port forwarding is something you will need to manage. If you've tried making a Minecraft server on your home network, you've surely stumbled upon port forwarding and had issues with it. Your computer must be on at all times. Your electricity bill could soar and you'll put unnecessary load on 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. To even consider setting up small servers, you'll need to have a bigger internet plan. Data centers have several high-speed, enterprise grade internet connections. This ensures they have (or attempt to have) 100% availability. Your hardware is probably not good enough. Servers use enterprise-grade hardware with the latest and fastest CPUs, SSDs, as well as other features. Most likely, your personal computer 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 to not use your personal computer even though technically you can. A cloud server is affordable. We'll show you how to make a Minecraft server on cloud hosting below.Minecraft servers It's easy if you carefully follow the steps.



How to make a Minecraft server - Requirements



There are some prerequisites. You should have and know all of this before continuing to the tutorial:



A Linux cloud server will be required. We recommend Linode. They are affordable, their services are great, customer support is great and all server hardware is top-quality. Check the Minecraft server requirements to find out what kind of server you should get (resources like RAM and Disk space). We recommend getting the $20 per month server. They offer hourly pricing, so if you need the server temporarily for playing with friends, it will cost you less. Choose the Ubuntu 22.04 distro during signup. Choose the closest server location to where your players live during the signup process. You will be responsible for the server. So you'll have to secure it and manage it. If you don't want to do that, you can get a managed server, in which case the hosting provider will likely make a Minecraft server for you. To connect to the Linux cloud servers, you'll need an SSH Client. For beginners, PuTTy can be a good choice. We also recommend MobaXTerm. There are many SSH clients available, so choose your favorite. You will need to set your server up (basic security setup at minimum). You can Google it to find many tutorials. Linode's security guide can be used to help you follow the exact steps on your Linode Server. - We'll handle Java and other required software below.



Let's move on to the real deal.



How to Make a Minecraft Server on Ubuntu (Linux)



These instructions are written for and tested on an Ubuntu 22.04 server from Linode. Though they'll also work on Ubuntu 20.04, Ubuntu 18.04, and any other Ubuntu-based distro, and any other server provider.



We're using Minecraft's default Vanilla server. You can also use Spigot and CraftBukkit, which allow you to customize the server with more plugins. Though if you use too many plugins you'll essentially ruin the server. There are pros and cons to each one. The instructions below are for Vanilla Server to keep things simple, and easy-to-follow. If there is interest, we might publish a tutorial for CraftBukkit very soon.



Here are the step-by-step instructions on how to make a Minecraft server:



1. Login to your server



We'll use root as our user. You'll need to execute all commands with'sudo' if you use a restricted-user. You'll get a warning if you're doing something you don't have enough permissions for.



You can log in to your server through your SSH client. Use your server IP and your port (most likely 22).



After you log in, ensure that you secure your server.



2. Update Ubuntu



You should always first update your Ubuntu before you do anything else. You can update Ubuntu using the following commands:



When prompted to, hit "enter", and/or "y".



3. Install the required tools



This tutorial will require you to install a few packages and tools, such as text editing and making your server persistent. The following command will install them:



Some of them might already be installed.



4. Download Minecraft Server



First, create a directory where you'll store your Minecraft server and all other files:



And navigate to the new directory:



Now you can download Minecraft Server. Go to the download page to find the link. Use wget to save the file.



5. Install the Minecraft server



Once you have downloaded the server.jar, you will need it to be run once. This will generate some files including an eula.txt licens file. It will return an error when it runs the first time. That's supposed to happen. Follow the following command to enter:



"-Xms2048M" is the minimum RAM that your Minecraft server can use and "-Xmx3472M" is the maximum. Adjust this based on your server's resources. You can use the Linode 4GB RAM server as-is if you dont intend to use it for any other purpose than Minecraft.



After the command returns an error and ends, a new file eula.txt will be created. You must accept the license in this file. This is done by adding the "eula=true command to the file.



You can now start the server again and access the Minecraft server console with that same java command from before:



Make sure you are in the /opt/minecraft or the directory that you installed your MC servers.



You can leave this section if you only need it to test the system. If you're having trouble loggin into the server, you'll need to configure your firewall.



The server will take slightly longer to start the first time you do it successfully.



We will show you how to create a command line script that you can use to start the server.



6. Start the Minecraft server with a script, make it persistent, and enable it at boot



To make things easier, we'll create an bash script that will automatically launch the server.



First, create a bash shell with nano



A new (blank) file will open. Paste the following:



If you are new to nano, you can save the file and close it by pressing CTRL + X, then "Y", before hitting enter. This script navigates to your Minecraft server directory you created previously and runs the java command for starting the server. You need to make it executable with the following command:



The following command will allow you to start the server whenever you like:



This command will start a screen session:



Once you're in the screen mode (seems like you would open a new ssh server), you can run the bash script from an earlier session to start the server.



To get out of the screen session, you should press CTRL + A-D. Even after you get out of the screen session (detach), the server will keep running. You can safely log off your Ubuntu server now, and the Minecraft server you created will keep running.



Open the /etc/rc.

Local file:


Add the following line above "exit 0".



To access the Minecraft server console, just run the following command to attach to the screen session:



That's it. Congratulations! Have fun! You can now connect to your Minecraft server or configure/modify it.



Configure your Ubuntu Server



You'll, of course, need to set up your Ubuntu server and secure it if you haven't already done so. For more information, follow the guide and google it. The configurations you need to do for your Minecraft server on your Ubuntu server are:



Configure and enable firewall



First, if it's not already enabled, you should enable UFW that you previously installed:



You should allow the default Minecraft server port:



Other rules should be allowed or denied depending on how you use the server. If you don't use your server for hosting websites, you need to deny ports 80/43. Google "UFW/Firewall guide Ubuntu" to get recommendations. Be careful when setting your firewall. You may be locked out of your server by blocking the SSH port.



It is often automatically scanned, and then attacked, since it is the default port. You can prevent attacks by blocking anyone from accessing your whitelist.



First, you must enable the whitelist option in your server.properties. To do so, open the file.



Change the "white list" line to "true".



Save and close the file.



Then restart your server (either by restarting your Ubuntu server or by running the start bash script again):



Access the Minecraft server console:



And if you want someone to be able to join your server, you need to add them to the whitelist with the following command:



To remove them from the whitelist, use:



CTRL + a-D will exit the screen session (server Console). This will prevent access to all but whitelisted usernames.



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?



You can simply reboot your Ubuntu server if you have followed all the steps in our tutorial, including enabling it to start on boot. 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:



How do I configure my Minecraft server?



The server.properties file can be used to configure your server. You can refer to the Minecraft Wiki for more information.



The server console allows you to modify the game mode, difficulty, and other parameters. Run:



You can also execute commands there. Commands such:



You may need to restart the server depending on what command you used. You can use many other commands, see the wiki to learn more.



How do I upgrade my Minecraft server?



You need to activate a new release.



Navigate to the minecraft directory



Download the most recent version with wget (like in the first step of the tutorial).



Next, run and build the new server:



Last, update your start code:



Also, update the version number in accordance with:



You can now restart the server, and everything should work as it should.



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.



I don't know Linux or anything you wrote about here, how do I make a Minecraft server?



You can simply read our article and then copy the commands. If you really don't know how to do it all, we can do it for you, or just get a managed server provider and let them do it for you.



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



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.