How to make a Minecraft server on a Linux host

Nowadays the world is getting closer day by day so many people host their Minecraft server at the data center and not at home.

Considering the number of players going to play you need to choose the server. If your players are limited let’s say 5-6 then you can go for a Linux VPS hosting plan from My VPS Host. If, however, you’re expecting a lot of players, you should look at using a dedicated Linux server instead.

You should have basic knowledge about SSH which you are going to use to set up your game server.

Now assuming that you know how to use SSH command line we will start our installation.

1. Install Java
Let’s start, so it is assumed that you are logged into the server using SSH.

apt-cache search openjdk

This’ll list the available OpenJDK packages that can install Java. You can select any jdk, here we will select openjdk-7-jdk (OpenJDK 7 Development Kit).

Update the list of available packages from the remote repositories:

apt-get update

After that install the selected software package:

apt-get install openjdk-7-jdk

Hit “Y” when you are prompted to authorize the required storage space for installation. Once you authorize it then it will be installed on the server. To verify that Java has been successfully installed:

java -version

You should see the Java version you have selected has been installed.

2. Make a location for your Minecraft server files.

Create a directory on your host where the Minecraft server files will be saved, then navigate to that directory.

mkdir minecraft

cd minecraft

3. Download the Minecraft server files.

Within the Minecraft directory, run the wget command to download the Minecraft server files:

wget -O minecraft_server.jar

Next, we’ll need to install and run “screen”, so that your server continues to run even when you’re not connected:

yum install screen


4. Start your Minecraft server.

java -Xmx512M -Xms512M -jar minecraft_server.jar nogui

To make sure everything is running correctly, stop your server with:


Then edit the “” file and set:


Save the “” file and restart your server. You need to use the IP address of the server to access the server publically.

Now you will have to point a domain at your Minecraft server.

It’s very simple: Update your domain’s DNS records by adding an “A” record for your domain (using @ as hostname), or subdomain (using something like “mc” as the hostname), that points to your Minecraft server’s IP address.

Note that it can take up to ~24 hours for DNS changes to take effect globally.