Thursday, November 26, 2015

Minecraft Server Mods

My son today wanted to use a couple of his favorite mods on a server that I setup for him and his friend. I've setup plenty of vanilla minecraft servers, but never successfully one with Forge and mods installed.

The first thing to realize is the basic steps are the same as installing Forge mods on the client:

  1. Download the appropriate version of forge installer (Forge Site)
  2. Run the installer
  3. Start the server and make sure Forge is loaded
  4. Copy the mod to the mods directory
  5. Restart the server and make sure the mod loads
Some additional information will help. I'm doing this on a headless Ubuntu server so the instructions are tailored for that, but should be similar for other servers.


You want the plain installer download, not the installer-win or any of the others.
I don't have a GUI to my server, so I download files onto another PC and SFTP them to the server.
This process will create a new server setup, so go ahead and create your server directory now and put the installer in there to run it.

Run the Installer

In the new server directory, execute the installer with a command like this:
java -jar forge-1.7.10- --installServer
You will need to update the forge filename to match the version you are installing.
This should run for a while, downloading files and such, and then tell you it succeeded. There should be a forge "universal" file and a minecraft-xxx.jar file in the directory now.

Start the Server

To run the server, first copy the other server setup files. I have these available in a template directory. You need the edited eula.txt file and, and I include an ops.txt file to setup my initial operators.

When you start the server, you use the forge-XXX_universal.jar file in place of the minecraft.jar file.
So the command should look something like this:

java -Xmx1024M -Xms1024M -jar forge-YYY_universal.jar nogui

If it works, you should see some log messages with [FML] in them saying what Forge is doing.

FYI, on my headless server I don't want to keep a terminal session open the whole time the server is up, so I use the "screen" command to keep it running. I think screen is included by default in Ubuntu now. Anyway, the command I use is:

screen -S $sname -d -m /usr/bin/java -Xmx1024M -Xms1024M -jar $jar nogui

Once you are happy the server is up, just detach with Ctrl-A d. But in this case you can just enter the 'stop' command to shutdown the server.

Install the Mod

If the mod is just a jar file, celebrate!  Just put it in the new mods directory under the server directory. If it is a ZIP file, you at least have to unzip it. Then it may be a jar file, or a directory with class files. Both those options should work if you transfer them as-is into the mods folder.


This one is a ZIP file wth two folders, mcheli and META-INF. Take the mcheli folder out and put it directly in your mods directory. It should have an assets folder and another mcheli folder plus a couple files.

Restart Server

Restart your server using the same command as above. If it crashes, check that you copied the files correctly. Usually reading the first few lines of the crash report gives a hint as to what the problem is. If nothing else, google the first exception you see.