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 for about 8 months, I've been creating plugins for about 13 months, and I administrated a server for over a year. 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 that this will help others who don’t know how to manage 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 teach you how set up and maintain a physical server. This guide does NOT cover how to run a community or a website. This guide will only show you how to setup and maintain your server. If you want to run a server, you can use your computer or a cheap Minecraft host. You will need to do more work if you want to host one on a larger scale. I will explain this in this guide.



Prerequisites: Linux Server (This guide is for a Linux server. All commands are for CentOS, but they don’t differ from other Linux distributions.) Knowledge of Filezilla and another FTP client. Basic command line navigation (Windows and Linux, as long you know what a "terminal", and how to use its basic commands.



Download: Latest craftbukkit build



This guide is organized in the same order as you will be setting up the server. It begins at step 1, and ends with additional information you will need after setting up your server to ensure it is running smoothly.



First, pick a server. If you plan to open a Minecraft Server, you should expect some investment. It is not a good idea, even if you have a network computer, to run a server. A proper server setup and an internet service provider are essential for running a server. I highly recommend that you set up a Minecraft host if you are interested in running a Minecraft server.



What is a Minecraft host? Minecraft has grown so large that there are hundreds 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 are running a server that does not require constant maintenance (paintball, hunger games, etc.) This is all you need to know. A host is available for as little as $30 per month. It will provide everything you need. However, you can't make a server that requires editing core files, creating CRON jobs or installing software. you will eventually need to get a dedicated server host. Usually once you get past ~10GB of RAM from an MC host, the prices are more expensive than just renting a dedicated server. Once you get past ~30 players on your server and you're able to pull in $100+ per month in donations, you need to 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 the place to start looking at dedicated servers. A dedicated server is not made specifically for Minecraft. It is a physical server that you can rent from the datacenter and use as you please. This guide will focus on how to manage a Linux-operated server. Anyone looking to host a Minecraft server would benefit greatly from a dedicated Linux host. This is a personal preference. A Windows server is fine, but there are no particular reasons to choose Linux. This guide is intended for Linux users only. 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. I have read that you need 1GB RAM for every 10-20 servers slots. 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. You must ensure that your HDD is large enough, that your processor is fast enough, and that your internet speeds are sufficient.



I had a nice box when I was running a server: i73770 4 Core @ 3.4 Ghz 32 GB RAM 64 GB SSD, 32GB HHDD.



This is enough to run a server for 200+ people. This is something to consider when renting a box. Choopa is a good host. Before you choose a host to use, I recommend you do some research. I have provided a list with hosts at the bottom of this guide.



I recommend getting a box with 16GB of RAM, 16 - 32GB HDD, and 16GB SSD. There are so many processors out there that any one of them will do the job. These numbers are inflated and you don't need as much. If you're on a budget, you can go less. I would only recommend these numbers so you have some working space.



How to Set Up Your Server. Now that your box is set up, you might be wondering how to get it started. You don't have the option to open your Windows Explorer and run run.bat from Bukkit's Wiki. Unfortunately, it is more complicated than that. First, upload your craftbukkit to your server. I normally used the directory /home/SERVERNAME.



Next, 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



Each box is unique, so you will need to adjust the RAM you provide 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 OF YOUR RAM. If you have an 8GB box, give it Xms4G/Xmx6G. For a 16GB box, give it Xms8G/Xmx12G. Play around with numbers. Make sure you have at minimum 2GB available. Keep Xmx larger than Xms. There will be other applications running on your machine, so make sure to leave enough space. There are many other options you can choose from depending on how you want the server to be handled by your processor. It is not necessary, but you can do some research in case you need something changed.



Upload the start.sh file into the /home/SERVERNAME. This can be done with Filezilla.



Now, how do I run that script? Well, let me explain. I'm going to teach you how to use PuTTy. 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 enter the IP address of your Minecraft server. If you don’t know it, you can find it by logging into the server host’s website or contacting your serverhost. If you use a URL to access your Minecraft server you can enter that URL instead.



Next, you will need to enter 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.



After that, you want to open the connection. Click "Open"



You will be prompted to log in after you do this. If you were not informed otherwise, your root login name should be root. If you don’t know your host’s name, you can contact it. After typing root, press enter. Then enter the password which you should also have gotten from your host. Then click enter. After you have entered your password, it will not be displayed.



Now you want to make sure you have certain things installed on your box. You will need to have a lot of things such as Java, MySQL, htop and iptraf. This guide will show you how to do it.



Installing Programs: This is the command line to install all programs you need. Remember that not all Linux boxes have the same format. These commands are for CentOS boxes. Although most people use Ubuntu, and I do, at the time that I wrote this, CentOS was my current operating system. The commands for installing are the same. The following command line is available for CentOS users. If you're using Ubuntu, you can use "apt-get". I suggest you look into your distribution for the right commands.



First enter the following command to make sure you can use the rpm extension: Code: yum install rpm



If you are running 32bit, you will need to locate the RPMs by yourself. These links are for 64bit systems.



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 the Server on Well now I assume you're ready to turn this baby on and start installing plugins. To do this, you will need to open a screen (instance).

However, screen does not come preinstalled and you will need to install it. Type: Code yum install screen


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



Go to this link and find the version for your distribution. Then, enter the following two lines into your terminal:



Code: yum -y install ncurses-devel texinfo pam-devel libtool yum install URL_TO_RPM



Now the screen has been installed.



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



Replace servername with your server's name. It is important that your screen name matches the name of your server. This is just so you can easily remember which server is running on each instance. Once you do this a page should open up like this. My screen will be called "WARCHICKEN" at this point.



Now, you're on the screen. Now, you want to run your start script. You must first open the file.



Type: Code: cod /home/SERVERNAME



Because that is the way we chose to follow in this guide.
Mundoimg



Now type: Code



This will launch your server. You will receive the following message.



It means that your start.sh file was not modified to 770. Please do so using 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.



You can also type Code: screen screen -r WARCHICKEN -rdWARCHICKEN if you wish to reconnect



-r means to connect. -rd means to connect and kick anyone who is attached. Only one person can view the screen at a given time



You can also do Code screen -list



To list all open screens, type: Code: kill -9 If you need to kill a screen you type: Code: kill -9



The PID number is located to the left side of the screen name.



This number will vary from one screen to the next. If your server crashes you will need to close the screen and then open it again.


Created: 13/08/2022 19:56:20
Page views: 43
CREATE NEW PAGE