How to Setup a Minecraft Server

Almost everyone loves playing games, especially Minecraft! It’s been enjoyed by over 14 million people worldwide for its addictive gameplay and customizable maps. Although the official package from Mojang Software is closed-source, several open-source Java versions of Minecraft Server are also available for the ODROID platform. Programming a virtual world using a free Minecraft Server package such as Spigot, Bukkit or BungeeCord is also a great way to learn Java while having fun too! This article details how to install a basic Minecraft server on your ODROID, so that you can play online games with a few of your friends in a world of your own creation. Using the ODROID as an inexpensive sandbox is also a great way to test out maps, upgrades and modifications before uploading them to a public server.

Requirements

  • 1. An ODROID from the X, U or XU series
  • 2. An 8+ GB eMMC or Class 10+ MicroSD
  • 3. A custom Ubuntu, Debian or similar image (13.04 or higher), available from the ODROID Forums (http://forum.odroid.com/)
  • 4. Java version 1.8 (OpenJDK8 or Oracle JDK8)
  • 5. Local Area Network (LAN) connection, including a router with port-forwarding feature

Install Java

If Java version 1.8 isn’t already installed on your system, please refer to the article in this issue of ODROID Magazine called Installing Oracle JDK8. Mojang publishes a Java version of the Minecraft software for compatibility with other operating systems such ARM Linux.

Install Minecraft

First, download the latest Minecraft Server software from the official site at https://minecraft.net/download, making sure to get the Java-based .tar version.

Create a minecraft directory in your home directory for storing the downloaded minecraft_server.jar. Once the tarball is downloaded, type the following commands to start the server:

$ cd ~/minecraft
$ java -Xms1536M -Xmx1536M -jar minecraft_server.jar nogui
The Minecraft server should be up and running now! The final step is to get the server’s IP address so that our players can connect to it via their Minecraft clients. Obtain the internal IP address

Find out the internal (local) IP address of your server by typing ifconfig in the Terminal window and locating the tag inet addr. On my ODROID, the IP address was listed as 192.168.1.10. Make sure this address has a long lease issued by the local DHCP server or router in order to avoid frequent configuration updates. Setup port forwarding

Minecraft uses the TCP port 25565, which should be forwarded to the server’s IP address by your local router using port forwarding. Refer to the user manual for assistance with setting up the router to forward port 25565 to the IP address obtained in the previous step. Obtain the external IP address

The public IP address that identifies your LAN to the outside world can be discovered by visiting http://www.whatismyip.com. The address will be in the form aaa.bbb.ccc.ddd, which means that the fully-qualified URL for connecting to the Minecraft Server on your LAN would be http://aaa.bbb.ccc.ddd:25565. Note the additionof the relevant TCP port at the and of the URL.

Iif your external IP is dynamic (typically changed periodically by your ISP), you can use services like No-IP. You can create an account on their website, then download and install the Dynamic DNS Update Client (DUC) at http://www.noip.com/download. Detailed instructions on setting up Dynamic DNS can be found at http://bit.ly/1ggmo2n. In this case, the fully-qualified Minecraft Server address would be http://youracctusername.no-ip.com:25565.

To make sure everything’s working, you can test that your server is visible online by going to http://www.canyouseeme.org. You can also quickly check its status at http://dinnerbone.com/minecraft/tools/status/.

System performance will be acceptable under normal wireless ethernet conditions, but a wired connection will decrease latency and increase game responsiveness.

Joining the Game

Start your Minecraft client on a Windows or OSX machine by entering the public IP address from the previous step (http://aaa.bbb.ccc.ddd:25565) when adding a new server to the client’s server list. At the time of this writing, the Minecraft Client software unfortunately does not yet run on the ODROID platform. There is a Minecraft Pocket Edition available for Android, but it is not compatible with the full version of Minecraft Server.

A successful connection to the ODROID Minecraft Server will bring the user into our virtual world as seen in Figure 1.

Additional Server Configuration

The server options in Minecraft are configured by editing the server.properties file located at /home/yourusername/minecraft/server.properties:

#Minecraft server properties
#Mon Dec 24 09:23:18 EST 2012
#
generator-settings=
level-name=world
enable-query=false
allow-flight=false
server-port=25565
level-type=DEFAULT
enable-rcon=false
level-seed=
server-ip=
max-build-height=256
spawn-npcs=true
white-list=false
spawn-animals=true
hardcore=false
texture-pack=
online-mode=true
pvp=true
difficulty=1
gamemode=0
max-players=20
spawn-monsters=true
generate-structures=true
view-distance=10
motd=A Minecraft Server
The three settings useful in changing maps and improving performance include:

  • level-name: If you want to add another map or world to your server, just unpack the world file inside your minecraft folder and then change the level-name setting to the name of that folder. For example, if your extracted world folder is odroid then change the level-name value to odroid instead of the default world value.
  • view-distance: Can be reduced to 7 to improve server responsiveness
  • max-players: Performs best when set between 2 and 5

Please note that Minecraft relies heavily on floating point operations. Unlike x86 architecture based CPUs, ARM based SOCs are not optimized for floating point operations, so the server options need to be tuned down to compensate for the heavier load.

If you’d like to further improve performance, several open-source versions of Minecraft Server are available that significantly decrease the server’s computations, providing a smoother experience and allowing more players to join the game. Craftbukkit

Create a folder for Craftbukkit by typing mkdir ~/craftbukkit in a Terminal window, then visit https://dl.bukkit.org/downloads/craftbukkit/ to download the latest version of Craftbukkit to the newly created directory. Once the download has completed, run the server to build your world.

java -Xms1536M -Xmx1536M -jar craftbukkit.jar
cd ~/craftbukkit/plugins
wget http://dev.bukkit.org/media/files/674/323/NoLagg.jar
wget http://dev.bukkit.org/media/files/665/783/PTweaks.jar
wget http://dev.bukkit.org/media/files/586/974/NoSpawnChunks.jar
Spigot

An alternative to Craftbukkit is Spigot, which provides more configuration options and is optimized for performance and speed. Following the same procedure as listed above, downloading the Spigot package instead, found at http://www.spigotmc.org/.

mkdir ~/spigot
cd spigot
wget http://ci.md-5.net/job/Spigot/lastSuccessfulBuild/artifact/Spigot/target/spigot.jar
java -Xms1536M -Xmx1536M -jar spigot.jar
Spigot is very stable, and since it is based on Craftbukkit, the Bukkit plugins NoLagg, PTweaks and NoSpawnChunks above will also work with Spigot. MineOS

MineOS is a Web-based administrative panel that offers easy management of Minecraft servers. It can handle Vanilla, Bukkit, Tekkit and Canary by default, but you can install any other server system and configure it to automatically download a new version whenever available.

Copying your server to an external hosting service

Using an open-source version of Minecraft allows you to change any aspect of the server, including fixing bugs and installing addons. Since Minecraft for ODROID is written in Java, it’s easy for beginners and experts alike to improve the software and customize it to their own needs.

Once you have your world ready, you can migrate your Minecraft creation to a high-traffic server so that it can accommodate more players. Simply upload all of the server files from the minecraft, spigot or craftbukkit directory on the ODROID via the web hosting service’s administration panel.

Enjoy your new ODROID Minecraft Server, and remember to stay out of the lava! For additional information or questions, please visit the original forum thread at http://forum.odroid.com/viewtopic.php?f=52&t=84.

Be the first to comment

Leave a Reply