Created by an independent developer, Minecraft is a new and increasingly popular computer game. Recently multiplayer support was introduced and allows players to create their own Minecraft server. This guide will explain how to quickly and easily set up a Minecraft server on Ubuntu Linux. In order to follow this guide, you should have a basic understanding of Ubuntu Linux and how to work with the terminal. The necessary commands are listed in bold, allowing you to easily copy and paste them into the terminal if needed.
Minecraft server requirements
Running a Minecraft server requires that you meet certain system requirements. The Minecraft site doe not currently list system requirements besides RAM, however the following configuration is recommended for a Minecraft server hosting 5-10 simultaneous players:
- 2.8 GHZ Intel Pentium 4 processor (or equivalent)
- 2GB of RAM
- 10mbit/sec upload speed
- An open port (the default port is 25565)
- A recent copy of OpenJDK or Sun Java 1.6
These are the minimum requirements in order to run a Minecraft server. The server software requires that 1GB of ram be allocated to it at all times, so having 2GB will be enough to run both the server and Ubuntu itself (along with any other programs that may be running). Bandwidth is also very important in order to avoid getting lag on your server, so be sure that you have a strong enough connection to support numerous players at once. For larger servers, 100mbit speeds are ideal. It is not recommended to run a Minecraft server on a machine that plays on the server, as this will cause large amounts of lag.
Installing the Minecraft server
Once you have a machine that meets the minimum Minecraft server requirements, it is now time to install the Minecraft server on Ubuntu. Start by opening up the terminal. The terminal can be located in the applications menu under accessories.
Once the terminal is open, you will be greeted with a command prompt. Create a new directory for the server software by typing in the following command:
[email protected]:~$ mkdir minecraft-server
Now, change directories to the newly created directory by typing
[email protected]:~$ cd minecraft-server/
Once you’re in the newly created directory, its time to download the Minecraft server software. This can be done using the wget command, shown below.
Once this command finishes executing, you will have successfully downloaded the Minecraft server software. In order to run it, you need to execute the following command:
[email protected]:~$ java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
If everything went well, you will be greeted with the following message after the server finishes setting up:
[INFO] Done! For help, type “help” or “?”
Make sure to keep this terminal window open in order to continue running the server, as closing it will cause the server software to close.
Create an op user
In Minecraft, an op is a user that has special commands that give them certain administrative powers on a server. In order to give your character op status, you will need to make a special file called op.txt inside your minecraft directory. First, make sure that your Minecraft server is not currently running. Then, open up the text editor gedit and create a file called op.txt inside of your minecraft server folder, (which should be minecraft-server if you followed this guide). In this file, enter your minecraft username on the first line and then start your server again. You will now have access to op commands on your server.
Connect to the server
Once you have your Ubuntu Minecraft server installed and configured, it is now time to connect to the server. Open your Minecraft client and select the multiplayer option. Then, type in the ip address of your Minecraft server and press connect. After a few moments, you will be greeted with a new Minecraft map. Make sure to write down the IP address of the server in order to let others know the IP address of your server.