How to setup MineCraft Server Linux – Ubuntu – Fedora – VPS server

This tutorial will help you setup your own minecraft server in linux.

1.    You need to install Java 1.6 , this will give you all the packages you need:

yum install java-1.6*

2.   Download latest minecraft server and unzip it into its own directory.  I used \home\mindcraft



2.    To Launch the server use this command.

java -cp minecraft-server.jar com.mojang.minecraft.server.MinecraftServer

3.   The first time you launch it, the server will create a few files after a few seconds ctrl-c to stop.

4.  Now that you have the config files created, put your username in both the admins.txt and the players.txt files.  Edit the and set the port number and change public =true

5. Run this command again

 java -cp minecraft-server.jar com.mojang.minecraft.server.MinecraftServer

You can access my server by this link, try it out if you like.

Errors you may get if you didn’t follow the above:

Failed to load Main-Class manifest attribute from

Exception in thread “main” java.lang.NoClassDefFoundError: minecraft-server/jar
Caused by: java.lang.ClassNotFoundException: minecraft-server.jar
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
Could not find the main class: minecraft-server.jar. Program will exit.

5 thoughts on “How to setup MineCraft Server Linux – Ubuntu – Fedora – VPS server”

  1. Never use CTRL+C to stop the server. It kills it rather than exiting cleanly. Use the “stop” command instead.

    Also, on Fedora, it seems to set up a firewall so you’ll have to edit/allow the connection settings. Otherwise it will just time out.

  2. Heya i?m for the first time here. I came across this board and I find It really useful & it helped me out much. I’m hoping to offer one thing back and help others like you helped me.

  3. This may sound really noobish, but how exactly do I access the do I have to enter the command in a special way or do I have to be in a certain file location? I’m trying to change the seed of my world (it’s just water.)

Leave a Reply