Build a Vanilla Minecraft Server on Linux The Aquatic Update 1.13.2 Spigot version 1.14.2 Pillager Update is available and is a development release. See section 4c.NEW. How to Play Minecraft Java Mods on Windows Building a full Linux modded server? See the Modded Linux server install documentation. Building on Raspberry Pi?
We hope you find this tutorial helpful. In addition to guides like this one, we provide simple cloud infrastructure for developers. Learn more →
Status: Deprecated
This article is deprecated and no longer maintained.
Reason
Ubuntu 12.04 reached end of life (EOL) on April 28, 2017 and no longer receives security patches or updates.
See Instead
This article may still be useful as a reference, but may not follow best practices or work on this or other Ubuntu releases. We strongly recommend using a recent article written for the version of Ubuntu you are using.
If you are currently operating a server running Ubuntu 12.04, we highly recommend upgrading or migrating to a supported version of Ubuntu:
How to upgrade from Ubuntu 12.04 to Ubuntu 14.04.
Setting up a Minecraft server on Linux (Ubuntu 12.04) is a fairly easy task on the command line.
When choosing your server, be sure that it has (at a minimum)1GB of RAM, preferably at least 2GB.
The first thing you need to do is to connect to your server through SSH. If you are on a mac, you can open up Terminal, or if you are on a PC, you can connect with PuTTY. Once the command line is opened, login by typing:
Enter the password when prompted. Although you can set up the server on the root user, it is not as secure as setting it up under another username. You can check out this tutorial to see how to add users.
Step One—Install the Requirements
Before going further, we should run a quick update on apt-get, the program through which we will download all of the server requirements.
After that, we need to be sure that Java is installed on our server. You can check by typing this command:
If you don’t have Java installed, you will get a message that says 'java: command not found'. You can, then, download java through apt-get:
You also need to supply your server with Screen which will keep your server running if you drop the connection:
There is a complete guide on how to install and use screen here.
Install the Minecraft Server
Start off by creating a new directory where you will store the Minecraft files:
Once the directory is created, switch into it:
Within that directory, download the Minecraft server software:
Since we have installed screen, you can start it running (-S sets the sessions title):
After the file downloads, you can run it with Java:
The launching text should look something like this:
Your Minecraft server is now all set up. You can exit out of screen by pressing
To reattach screen, type
You can change the settings of your server by opening up the server properties file: