MinecraftServerControl / mscs

Powerful command-line control for UNIX and Linux powered Minecraft servers
https://minecraftservercontrol.github.io
BSD 2-Clause "Simplified" License
485 stars 62 forks source link

Trouble starting a Forge server #268

Closed paraphasia closed 3 years ago

paraphasia commented 3 years ago

Hello, I'm having some issues creating and starting a Forge server on 1.16.3 and unsure what I'm doing wrong. I currently have a Vanilla server running on port 25565, and so would like to create a Forge server on 25566. I've followed through with the "Adjusting Server Properties / Forge" page, by downloading the Forge installer, running it and adjusting a mscs.properties file for the new world.

However the world that is created is treated as a vanilla server by the Forge client, and no /mods folder is available.

My mscs.properties file is as follows:

mscs-enabled=true
mscs-client-version=1.16.3
mscs-server-version=1.16.3
mscs-server-jar=forge-1.16.3-34.1.0-universal.jar
mscs-server-url=

I've tried this multiple times and have also tried creating a server using Forge version 1.8.9 as in the guide. Nothing seems to work. Am I missing something obvious?

zanix commented 3 years ago

The guide for running a Forge server was written a long time ago, there could have been some changes with Forge since then that makes the guide obsolete. I might be able to attempt to create a Forge server and see if there are any issues.

paraphasia commented 3 years ago

That would be amazing, thank you. I have almost no experience with Minecraft servers in general, I'm creating this for my little brother. I've had great success with mscs and the vanilla server and hoped to replicate that with mods.

zanix commented 3 years ago

I managed to install forge-1.16.4-35.1.7 and got the server working. There wasn't much difference except the server jar file changed.

Here is the updated documentation for installing Forge, I'll submit a PR to update the docs now.


Forge has an easy to use installer that can be used to install all of the needed files to run a Forge server. To install a version compatible with Minecraft 1.16.4, download the Forge installer forge-forge-x.x.x-x.x.x-installer and run the following as the minecraft user (sudo su minecraft):

mkdir -p /opt/mscs/server/forge-1.16.4-35.1.7
cd /opt/mscs/server/forge-1.16.4-35.1.7
wget https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.16.4-35.1.7/forge-1.16.4-35.1.7-installer.jar
java -jar forge-1.16.4-35.1.7-installer.jar --installServer

The installer should install the forge server jar to /opt/mscs/server/forge-1.16.4-35.1.7/forge-1.16.4-35.1.7.jar and a bunch of library files in /opt/mscs/server/forge-1.16.4-35.1.7/libraries/.

Create a new server (if necessary):

mscs create forge 25565

forge can be replaced with any name. Ensure that port 25565 is an unused port, or change it if nessessary.

This will create the directory forge in /opt/mscs/worlds as well as the server.properties and mscs.properties files:

Change the directory to the world that was created:

cd /opt/mscs/worlds/forge

Modify the mscs.properties file and add/alter these lines, replacing versions and file paths as needed:

editor /opt/mscs/worlds/forge/mscs.properties

Add this

mscs-client-version=1.16.4
mscs-server-version=1.16.4
mscs-server-jar=forge-1.16.4-35.1.7/forge-1.16.4-35.1.7.jar
mscs-server-url=

You may also want to increase the initial RAM and possibly even the maximum RAM.

Minimum default is 128M
Maximum default is 2048M

mscs-initial-memory=1024M
mscs-maximum-memory=3048M

If the server fails to start, the eula.txt file may need to be edited and accepted:

editor /opt/mscs/worlds/forge/eula.txt

Change false to true

eula=true

Stop then Start the server:

mscs stop forge
mscs start forge

The server should start up and run

The server startup can be monitored by running:

mscs watch forge

Once you are done watching the server boot up, you can press <Ctrl-C> to detach.

Simply add mods as you would normally by dragging them into the /opt/mscs/worlds/forge/mods folder, assuming forge is the name of your world.

zanix commented 3 years ago

One benefit of these updated docs is that now multiple versions of Forge can be ran simultaneously for different worlds whereas before all your worlds had to be the same Forge server version

sandain commented 3 years ago

Thanks for updating those docs @zanix. I noted a minor typo in your PR. Feel free to merge the PR once you fix it, otherwise I'll merge it later

paraphasia commented 3 years ago

Ah fantastic, everything is now working, thanks for your help. It looks like the error I had was in the mscs-server-jar line of mscs.properties. Installing to a separate folder and then using forge-1.16.4-35.1.7.jar instead of forge-1.16.4-35.1.7-universal.jar works.

zanix commented 3 years ago

Glad it's working! Docs were updated as well https://minecraftservercontrol.github.io/docs/mscs/adjusting-world-server-properties/forge Closing...