[How-To] Setup a minecraft server on a Linux VPS [Noob Friendly]

Setup a minecraft server on a Linux VPS
[Made by: Kink]

What you need:

  1. Linux VPS [OS: CentOS 5.5 64 bit recommended]
  2. Putty or another terminal management program.

I’m making this as easy as I possibly can, if it looks like I’m writing this as if everyone on the forum is literally brain dead, I’m sorry I just don’t want any mixups, confusion or anything like that.

Tutorial:

1.) Login to your VPS via Putty or the other terminal you’re using and enter the command below.

which java

[This is to check if you currently have Java on your system, if you already do…I would suggest re-installing it just to be safe]

2.) Installing Java on the machine

Type in the command:

yum install java-1.6.0-openjdk

Your system will now attempt to install java build 1.6.0, which is the version required to run the minecraft server software. Just let it run, if it asks any questions just type “y” where/when it asks for you to do so.

After running, java should now be installed. What you should do now is check if it has by running the “which java” command again, you should get the return value of the location of which java was installed on your server. Using this location(marked as “JavaLocationGoesHere” below), enter the command below:

JavaLocationGoesHere -version

Now, after running that command you should be prompted with the return of "Java Version “1.6.0” if so, you have successfully installed java and are ready to continue to setting up your server.

3.) Creating/setting up the Minecraft Directory

Let’s create a new directory named “minecraft” by entering the command

mkdir minecraft

Now let’s jump into that directory by using the command

cd minecraft

After entering that command, you should be greeted with the return of “username@server minecraft]#”

4.) Setting up a new screen, to keep the server running after the terminal is exited.

Now, we need to create a new screen. This is important for when you close the terminal, the server stays up and continues to run without the need of the terminal being open on your computer 24/7.

Start by typing the command

screen -dmS minecraft -t minecraft

[Is CAsE SENsiTiVe]

Now after creating that screen session with the window ID of Minecraft, enter this command to attach to that created session.

screen -r minecraft

5.) Download the server file(s)

While we remain in the minecraft directory, were going to download the files in here. Start by running the command

wget http://minecraft.net/download/minecraft_server.jar

Let that finish downloading then continue to the 4th step.

6.) Running the server

This is the last step needed to get your server up and running, this code will start the server.

java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

[Where it says 1024M is where you type the amount of RAM you want the server to use, example: if you purchased a server with 2 Gigs of RAM and you want to use all 2 Gigs you would type 2000M in the replacement of 1024M.]

7.) Success!

You should now see your server starting up, creating your world, etc. I hope you enjoyed my tutorial and don’t forget to say thanks and if you have any problems, please post and I will see what I can do to help you.

1 Like

hahaha noob friendly :stuck_out_tongue:

Thanks kink, where would be a CHEAP place to get a VPS? Or maybe free.

Can i set up a VPS like a home server?

I haven’t truly found a host that I like yet to be honest. I don’t have one at the moment or I would have posted pictures along with the tutorial. If I find one, I’ll post it.

That looks simple enough for even me to follow!

I’ve only run a two player SMP server from my computer and I was wondering if you could explain how to put mods on the server? Namely bukkit and it’s plugins. Please and thank you

123systems.net has some good ones.

Good tutorial Kink. Should be stickied due to the amount of derps posting “HAO DO I MINECRAFT SERVER?!”.

For a 10-20 player server what kind of spec would you recommend?

At least 4GB of RAM.

Cheap VPS | Budget VPS | Dedicated Servers | Webhosting | Budget Hosting

Using the above page a reference, Guaranteed RAM is what I want 4GB of?

(I am a TOTAL Noob!)

Thanks for another great tutorial kink :smiley:

hmmmm

Seems plausible

I have a major issue with step 2. OpenJDK is ****! It caused me soo much hassle while trying to get the client to work.

Sun java 6 is the better option.

Plausible? I wouldn’t spend my time writing a tutorial that didn’t work.

when i’m trying this i got java etc and when i do the screen command it doesn’t work it says
-bash: screen: command not found

Seriously, this needs a bump. Especially since the Minecraft section is out and people are always looking to set up a server.

:L still against the rules… probably easier to just say “Great Tutorial!” or something to bump it without saying…

Actually it’s not, if you recall, bumping a tutorial is acceptable.
Sorry forum cop :wink:

Stuck.

Great tut and congrats on the sticky Kink. This thread will help alot of people out