Cloud Computing | Practical Tips | Games

How to configure Minecraft Server on Ubuntu by SSH

Thinking of creating a dedicated Linux server for Minecraft? This guide is for you!

IMPORTANT: For Minecraft Server we recommend our Blenner solution, with 4 GB of RAM and 30 GB of SSD (Know more )

First steps

The first thing you need to do is connect to your server via the SSH connection. If you're on macOS, you can open the Terminal, or if you are on a PC, you can connect to PuTTY. Once the command line is opened, log in by typing:

ssh username @ ipaddress

Enter your security password when prompted. Although you can configure the server under the root user, it is not as secure as configuring it under another user name. You can check out this tutorial to see how to add users. Before proceeding, we must perform a quick update on apt-get, the program through which we will download all the requirements from the server.

sudo apt-get update

After that, we need to make sure that Java is installed on our server. You can verify by typing this command:

java -version

If you do not have Java installed, you will receive a message that says “java: command not found“. You can then download java via apt-get:

sudo apt-get install default-jdk

You also need to provide your server with a Screen, which will keep your server up and running if you drop the connection. To do this, run the command:

sudo apt-get install screen

Installing Minecraft Server

Start by creating a new directory where you will store the Minecraft files:

mkdir minecraft

Once the directory is created, change to it:

minecraft cd

After accessing the new directory, download the Minecraft server software (direct download):

wget -O minecraft_server.jar -> Replace with the recent version! 😉

Once we have installed the screen correctly, you can start it by running (-S defines the session title):

screen -S "Minecraft server"

After downloading all files, you can run it with Java:

java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

The launch text (debug) should look like this example below:

2012-08-06 21:12:52 [INFO] Loading properties
2012-08-06 21:12:52 [WARNING] 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: ./ops.txt (No such file or directory)
2012-08-06 21:12:53 [WARNING] Failed to load white-list: ./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:55 [INFO] Preparing spawn area: 12%
2012-08-06 21:12:56 [INFO] Preparing spawn area: 20%
2012-08-06 21:12:57 [INFO] Preparing spawn area: 24%
2012-08-06 21:12:58 [INFO] Preparing spawn area: 32%
2012-08-06 21:12:59 [INFO] Preparing spawn area: 36%
2012-08-06 21:13:00 [INFO] Preparing spawn area: 44%
2012-08-06 21:13:01 [INFO] Preparing spawn area: 48%
2012-08-06 21:13:02 [INFO] Preparing spawn area: 52%
2012-08-06 21:13:03 [INFO] Preparing spawn area: 61%
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 "?"

Ready! As of now, your Minecraft server is configured correctly. You can exit the screen by pressing:

ctl-a d

To reconnect the screen, type:

screen -R

In addition, you can change your server settings at any time by opening the server properties file:

nano ~ / minecraft /

You might also like: