GUIDE: Setting Up And Monitoring A Linux MineCraft Server


Hello, I'm lDucks and this is my guide on how to run a Linux MineCraft server. I ran a server about 8 months. I've been creating plugins since 13 months. A server I managed for over a decade was my experience. This guide may have some errors in it since even after rereading it and having other people reread it countless times, I still have to change little errors I find. I hope this helps people out there who don't know how to run servers.



All the information in this guide has been compiled from my personal experiences and learned through my passion for CS. Enjoy.



This guide will show you how to set-up and manage a physical server. This guide does not contain anything with regards to running a community or running a website. This guide focuses on how to set up your server and keep it running smoothly. If you want to run a server, you can use your computer or a cheap Minecraft host. However, if you want to run one on a larger scale, you will need to do a lot more work that I will explain in this guide.



Prerequisites. Linux Server. This is a guide to a Linux Server. The commands are for CentOS.



What you should download: The latest craftbukkit builds



This guide is organized in the same order as you will be setting up the server. It starts at step one, and ends with extra information that you will need after setup in order to make sure your server is running properly.



First, pick a server. If you plan to open a Minecraft Server, you should expect some investment. It is not a good idea for a server to be run from your own computer or on your network. You need the right internet service provider and the proper server setup to run a server. If you want to start a Minecraft server, I recommend you do so with a Minecraft host.



What is a Minecraft host? Well, Minecraft has become big enough where there are hundreds of hosting companies out there dedicated to Minecraft hosting. I'm not going to get too into how to run a server from them because you don't have much functionality and most of them use MCMyAdmin. If you have a server that doesn’t require constant maintenance (paintballs, hunger games etc.), then it is not necessary to use MCMyAdmin. then you really don't need to read much past this. A host can be yours for as low as $30 per month and will do all you need. If you need to create CRON jobs and edit core files, install software or have a faster processing speed, you will need a dedicated server host. A dedicated server host is what you will eventually need. Once you've used 10GB RAM from an MChost, renting a dedicated host is usually more affordable than renting. Once you have 30 players on your server and are able pull in $100+ per months in donations, you should expand.



For those of you looking for good Minecraft hosts, I have had some good experiences with https://allgamer.net/ - I have supplied a list of Minecraft hosts at the end of this guide.



This is where you should start looking for dedicated servers. A dedicated server is not made specifically for Minecraft. It is a complete physical server that can be rented from a datacenter. You can use it as often as you like. This guide will only cover how to operate a Linux-operated server. Anyone looking to host a Minecraft server would benefit greatly from a dedicated Linux host. This is a personal preference. There is no reason to choose Linux over a Windows server. This guide will only be applicable to those who have a Linux machine. You can stop reading this guide if your Linux box is not available.



Now, when picking a server many people are always concerned about their RAM. According to many sources, you will need approximately 1GB RAM for every 10-20 slots of your server. This is a pretty good estimate to go by, but you have to remember that RAM is not the only thing that you need to worry about. Your HDD must be large enough. You also need to ensure your processor is powerful enough and your internet speed is sufficient.



When I was running a server I had a very nice box: i7 3770 4 Core @ 3.4 Ghz, 32 GB RAM, 64 GB SSD, 32GB HDD.



This is more than enough to manage a server that can hold 200+ people. Take that into consideration when renting a box. Choopa is a good host. Before you decide which host you want to use, it is a good idea to research other hosts. I have supplied a list of hosts at the end of this guide.



I recommend a 16GB RAM, 16 - 32GB HDD and 16GB SSD box. There are so many processors that any you get offered will most likely get the job done. These numbers are highballing it and you don't exactly need that much. If you are on a budget, you may be able to go lower. I recommend these numbers to ensure that you have enough work space.



You may be wondering how you can set up your server now that you have it. You don't have the ability to open up your Windows Explorer and run the run.bat file you got off Bukkit's wiki. Unfortunately, it is more complicated than that. First, upload your craftbukkit to your server. I used the directory "/home/SERVERNAME".



Then, create a file called start.sh.



You should place this code on that webpage: DO NOT COPY THIS COMMUNITIES CODE: java –server -Xms10G. Xmx16G. jar craftbukkit.jar



Every box is unique so you may need to adjust the amount of RAM you give to your server. We are providing the server with 10GB of extended memory, and 16GB to allow for maximum heap size. DO NOT ALLOCATE ALL YOUR RAM. If you have an 8GB box, you should give it -Xms4G and -Xmx6G, if you have a 16GB box you should give it -Xms8G and -Xmx12G. Play around with the numbers. You should have at least 2GB left unallocated. Xmx should not exceed Xms. YOURBESTBET There will be other applications running on your machine, so make sure to leave enough space. There are many options available depending on how your processor handles the server. It is not necessary, but you can do some research in case you need something changed.



Upload this start.sh to the /home/SERVERNAME. This can be done with Filezilla.



How do you run the script? Well, let me explain. I'm going show you how PuTTy works. The reason I am using this method is because it is much easier than teaching you how to connect through a terminal. PuTTY is ideal for any task you want to do on a server box.



Download PuTTy here: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html



Open PuTTy. Enter the hostname. You will need to use the IP address for your Minecraft server. If you don’t know what it means, you can get it by logging in to your account on the serverhost’s website or by contacting the serverhost. You can also use a URL to access the Minecraft server.



Next, you need to enter in the port. If you haven’t changed the port, it should be port 22. Next, you will need to click the "SSH” option. This is not the port for your Minecraft server. It is the SSH Port.



You will need to click "Open" after that. Click "Open"



Once you do that, you'll be prompted for login. If you weren't already told, your login name must be root. If you don’t know your host’s name, you can contact it. After you have typed root, hit enter. Then enter the password which you should also have gotten from your host. Next, click on enter. Your password will not show up as you type it.



You need to ensure you have certain items installed on your box. You will need to have a lot of things such as Java, MySQL, htop and iptraf. I will demonstrate how to do this in this guide.



Installing Programs Below is a command line that will install any program you require. Remember that not all Linux boxes have the same format. These commands are for a CentOS box. While I know that most people use Ubuntu (and I do), at the time this article was written, I was using CentOS. The commands to install are not too different. If you are using CentOS you can use the command line I have below. You can also use the "aptget" command if you are using Ubuntu. For the correct commands, I recommend researching your distribution.



First, enter the following command: Code: #yum install rpm



If you are running 32bit, you will need to locate the RPMs by yourself. The iptraff and htop links that I have provided are for 64bit machines.



iptraf: Code: yum install http://scriptmantra.info/sources/iptraf-3.0.0-5.el5.x86_64.rpm



htop: Code: yum install http://205.196.123.160/j785fw1gc80g/al1aaacqodltr1i/Htopbuild0056.yashua.rf.x86_64.rpm



These guides can be found on Google for Java and MySQL installation. I won't waste time rewriting them.



JAVA: http://www.wikihow.com/Install-Java-on-Linux MYSQL: http://www.thegeekstuff.com/2008/07/howto-install-mysql-on-linux/



Start MySQL



Turning on the Server Now I assume you are ready to turn it on and install plugins. To do this, you must open a "screen", (instance).

Screen is not pre-installed, so you will have to install it. Type: Code: yum screen


If the above command doesn't work, follow the next step. After you've installed it, you can now open a new screen.



Click this link to find the version you need. Then, enter these two lines into the terminal:



Code: yum --y install ncurses devel texinfo pamdevel libtool $url_TO_RPM



Now, the screen is installed.



To open a new screen, type the following into your command line Code: screen-S SERVERNAME



You will need to replace servername with the server name. You will want your screen to have the same name when you run it. This is so that you can easily identify which server is running on each instance. Once you have done that, you should see a page like this. My screen will be called "WARCHICKEN" at this point.



Now you are on the screen. You want to now run your start script. First, open the file it is stored in.



Type: Code: cod /home/SERVERNAME



We chose this path because it is what we used earlier in the guide.



Now type: Code



This will start your server. This will start your server.



It means that your start.sh file was not modified to 770. Please use the following command:



Code: chmod 770 /home/SERVERNAME/start.sh



This screen will allow you to enter commands as the servers after the server is turned on. When you want to detach you hold CTRL+A+D and it will detach you.



To reconnect, type Code: screen-r WARCHICKEN screen-rd WARCHICKEN



-r stands for "to connect" -rd stands for "to kick and connect anyone else who is attached off." Only one person can view a screen at a time



You can also use Code: screen-list



To list all the screens that are open, click here You can kill any screen by typing Code: kill -9



The PID number is the number that is left of the screenname.



This number will be different every time you reopen a screen. If your server crashes, kill it and then reopen it.


Created: 28/08/2022 03:15:00
Page views: 76
CREATE NEW PAGE