Want to setup a Minecraft Server and Java for you and your friends to play Minecraft on a CentOS Virtual Private Server (VPS). This tutorial will show you how to install Java and Minecraft Server on your CentOS VPS.
Using PuTTY or your favourite SSH client. You need to login as root on your VPS and do the following:
1. Installing Java:
yum install java-1.6.0-openjdk
2. Next install screen. This will allow your Minecraft Server to keep running even after you close the SSH client.
yum install screen
3. Next, make a directory for Minecraft to be installed in.
mkdir minecraft
4. Now to change to that directory.
cd minecraft
5. Now we can download the Minecraft Server app.
wget http://minecraft.net/download/minecraft_server.jar
6. Next to make the server executable.
chmod +x minecraft_server.jar
7. Next, we’ll run screen and load minecraft up.
screen
8. Now we’ll actually load up Minecraft Server.
java -Xmx512M -Xms512M -jar minecraft_server.jar nogui
NOTE: Replace 512M in -Xmx and -Xms with the amount of RAM you can allocate for Minecraft. The amount you have will depend on your VPS (check your VPS to see how much available RAM it is).
9. Leave screen by pressing Control + A + D on your Keyboard.
10. In the future, if you want to go back to screen and manage your minecraft server; connect back via SSH and press Control + R on your keyboard.
Having issues or have a suggestion? Drop them in the Comments section. I’ll answer back!




Thanks a bunch for adding this. Worked like a charm! No problems what so ever.
Can you add a tutorial on migrating a Minecraft server from one server to another?
How about optimizing for performance? I am running 1024M…what is optimal for say 10 people?
Migrating? I will give it a shot. As for optimizing, I'm not really certain. I suppose you can try and limit what's running (mods, etc). As for 10, I think 1.5GB of RAM should do fine (considering a decent processor).
Thank you for the instructions! All worked as you said – but now when people connect to the server, the gui commands are not working, and the Welcome message is not displayed. Any ideas? Thanks.
I have no idea. It worked fine for me when I tested on my server. If you were previously using mods for bukkit, maybe need to try re-installing?
I have a setup a Centos 6 server for the kids but we cannot get the map working ? This is the inventory map the players use. 4G RAM with 1 reserved for the server. Any suggestions
Maybe it's a bug with Minecraft itself? Have you also tried rebooting the server or trying Bukkit instead of the vanilla MC Server?
i lov this game it is the best game
Hi, Great tut. I have 1 question, I am using Putty and when I use Ctrl+R it says
(revearse-i-search)`':
and i'm not sure what to put there
I tried the java command thinking it would just "search" it but it started to load another server.
I also tried the minecraft directory and nothing…
Hopefully some one can pipe in on exodus's question here, i have the same one
After I execute the command to run the server in screen should it display some output? Mine does not.
[root@texas mc]# java -Xmx512M -Xms512M -jar minecraft.jar nogui
[root@texas mc]#
Afterwards, when I detach from screen I see no minecraft files? just the .jar
This has to be a stupid question, but once I have the server running, how do people access it? My son tries to go to the ip address of my web server but it fails to connect
Try adding the Port number to the end of the IP Address. E,g, 100.100.123.123:25565
What exactly does screen do, and why do we need it? Why can't we just use nohup?
I haven't tried nohup. The purpose of screen is to keep the process running even after the SSH Session has ended.
The screen makes it so that you can keep the server running after you close the SSH session.