Initial Set Up
Minecraft server set up on a Linus distribution (Ubuntu 12.04 in this case) is quite easier than you think.
Make sure you have at least 2GB RAM for your server. In this tutorial, we will be covering the setup of minecraft server on Ubuntu using command line tool. Connect to the server through SSH using Terminal on Mac or PuTTY on a PC.
Open the terminal window and log in:
ssh name@youripaddress
Enter the password and make the connection.
Installing Dependencies for Minecraft Server
Before we get down into setup of Minecraft server, we need to update the apt-get using the command:
sudo apt-get update
Java is a system prerequisite for this set up and you need to make sure that Java is installed on your server. Run the following command to check:
java -version
If Java is installed, it will return the details. Else, it will throw the message “java: command not found”.
Download Java using apt-get package:
sudo apt-get install default-jdk
Screen is also required to keep the server running if the connection is dropped. Install screen using the command:
sudo apt-get install screen
Installation of Minecraft Server
First of all, create a directory where you can store the Minecraft files:
mkdir minecraft
Switch into the newly created directory:
cd minecraft
Now, download the Minecraft Server software using the command:
wget -O minecraft_server.jar https://s3.amazonaws.com/Minecraft.Download/versions/1.7.4/minecraft_server.1.7.4.jar
Run the Screen with the command:
screen -S "Minecraft server"
The –S option will set the sessions title.
Once the file is downloaded completely, you will be able to run it with java.
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
You will be given a launching text which will look similar to this:
2012-08-06 21:12:52 [INFO] Loading properties 2012-08-06 21:12:52 [WARNING] server.properties does not exist 2012-08-06 21:12:52 [INFO] Generating new properties file 2012-08-06 21:12:52 [INFO] Default game type: SURVIVAL 2012-08-06 21:12:52 [INFO] Generating keypair 2012-08-06 21:12:53 [INFO] Starting Minecraft server on *:25565 2012-08-06 21:12:53 [WARNING] Failed to load operators list: java.io.FileNotFoundException: ./ops.txt (No such file or directory) 2012-08-06 21:12:53 [WARNING] Failed to load white-list: java.io.FileNotFoundException: ./white-list.txt (No such file or directory) 2012-08-06 21:12:53 [INFO] Preparing level "world" 2012-08-06 21:12:53 [INFO] Preparing start region for level 0 2012-08-06 21:12:54 [INFO] Preparing spawn area: 4% 2012-08-06 21:12:56 [INFO] Preparing spawn area: 20% 2012-08-06 21:13:04 [INFO] Preparing spawn area: 69% 2012-08-06 21:13:05 [INFO] Preparing spawn area: 77% 2012-08-06 21:13:06 [INFO] Preparing spawn area: 85% 2012-08-06 21:13:07 [INFO] Preparing spawn area: 93% 2012-08-06 21:13:08 [INFO] Done (15.509s)! For help, type "help" or "?"
Now, minecraft server is set up. You may exit the screen by pressing ctl-a d.
You can reattach the screen using the command:
screen -R
If you want to change the server settings, you can do that by opening the server properties file and update it:
vi ~/minecraft/server.properties