Minecraft Spigot Server on CentOS 7

I’m just recording some notes here on the steps I took to run a Minecraft (Spigot) server on a CentOS 7 server.

Install Pre-requisites

Get Java

You could try using OpenJDK with

[/crayon]

Or

visit the Oracle website agree to the license agreement and download the jdk-8u131-linux-x64.rpm file. Copy that file to your server using SCP and install it with:

[/crayon]

Test that Java is installed and working by runing:

[/crayon]

You should get positive results before moving on.

Get Spigot

Visit the downloads page for Spigot and download the BuildTools.jar file for the latest release.

On the server make sure you are the root user:

[/crayon]

then create the directory for all your spigot files:

[/crayon]

Then copy the BuildTools.jar file to the server/opt/spigot using SCP.

Run the build tool with:

The result should be similar to the screenshot below:

And this should create a file structure like the following:

Create a user to be used to run the spigot process:

[/crayon]

And give that user permissions for the directory:

Screen

Screen is an alternative method to run the spigot process than using mark2. To use screen create a file

and add the following to that file – you will need to amend the 1.12 text to point to the version of spigot that you have downloaded & built:

Make it executable:

Edit the eula.txt file and change the text to:

Then run it as the minecraft user:

You can check that the process is running with:

[/crayon]

And check that it is listening on the port:

[/crayon]

To re-attach to the screen:

But if you run the spigot process as the minecraft user you will need to use:

When you are looking at the output from the spigot server you can detach from the screen session again with

BungeeCord

BungeeCord allows running multiple minecraft servers from one machine.

Firewall

I use iptables on CentOS rather than the default firewalld. For iptables edit the config file:

[/crayon]

add a line for port number

[/crayon]

then restart the service:

[/crayon]

Operations

While the server process is running you can connect using minecraft an ‘op’ a user with:

To elevate a user to an ‘op’ using the screen session :

You can also ban players and IP addresses and much more.

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">