This article is outdated and may not work correctly for current operating systems or software.
In this article, we will be covering the process of installing Sponge, a type of Minecraft server. Sponge is a project that aims to provide the ability to add mods and plug-ins to Minecraft.
For this article, we will need the following:
The first thing we'll do is install Java and screen:
yum install java screen
When it prompts you to accept the installation, type "y" and hit enter.
Then, if you don't already have a text editor, install one:
yum install nano
This step involves you creating another user for the game server to run as and creating any required directories. First, create your unprivileged user:
Now, log into the user account:
Create a directory for your server and enter the directory:
mkdir minecraftserver && cd minecraftserver
Assuming you're already logged into your server, download the "jar" file that Sponge uses. A
.jar file is essentially an executable file that Java will run.
Download the file for the 1.8 version of Minecraft:
At the time of which this article was written, the above will download a Minecraft 1.8 Forge server.
Great, now that we have Forge, let's install it.
If you're using the 1.8 version, execute the following command to install the server and start it for the first time:
java -jar forge-1.8.9-22.214.171.1242-1.8.9-installer.jar --installServer
You will need to accept the EULA for Minecraft (this can be found here: https://account.mojang.com/documents/minecraft_eula) by opening
eula=true, hit "ctrl + x" and "y" to save your changes.
Let's add Sponge now by entering its directory:
cd mods/ && wget http://files.minecraftforge.net/maven/org/spongepowered/spongeforge/1.8-1577-3.1.0-BETA-1045/spongeforge-1.8-1577-3.1.0-BETA-1045.jar
Now that we have a functioning server, all we need to do is create a startup script for the server.
Go back to your home directory:
Open up your text editor by executing
nano start.sh and paste the following:
#!/bin/bash memory="512" java -Xmx"$memory"M -jar forge-1.8.9-126.96.36.1992-1.8.9-universal.jar
Remember to change the value
512 into the amount of memory you want to allocate to the server (in megabytes). For any Vultr instance, it is recommended that you leave some memory (~128MB) for the system to run properly as you run the server.
Hit "ctrl + x" and then hit "y" to save. Now, set the permissions on the file to allow execution:
chmod 755 start.sh
Good job, you've installed a Forge + Sponge server. All that's left is to run the server.
As we want the server to persist when we close our terminal, we need to open up a virtual screen:
You'll be able to view the console, and it'll stay up even if you close your terminal/console.
In this article, you learned how to install Sponge and Forge to allow for server plug-ins and mods. Have fun with your new Minecraft server!