LGSM Minecraft + Forge for 1.18.2+ #3817
Replies: 3 comments 1 reply
-
Thank you for sharing! Today, I also thought about how to use LGSM to start MinecraftForge. I read the LGSM startup script and I just started playing the original minecraft 1.19.2. When I want to play the forge version later, I will try your method. thank! |
Beta Was this translation helpful? Give feedback.
-
Great instructions still works in 2024 for 1.21.1 I was also able to convert these steps to use fabric if anyone wants to do the same just do this obviously download fabric instead of forge and move it over like in the above instructions at step 6 change the command to look something like this java -jar (fabric installer file name here).jar -installServer than simply edit your run.sh file to be the same command the fabric website gives you its the launch command java -Xmx2G -jar fabric-server-mc.1.21.1-loader.0.15.11-launcher.1.0.1.jar nogui if for whatever reason you dont get a run.sh file just make one I had the same issue |
Beta Was this translation helpful? Give feedback.
-
Anyone know how do you make it so modpacks work, are you supposed to copy the files from a mods server files into the folders from linuxgsm? |
Beta Was this translation helpful? Give feedback.
-
Forge changed the way they start Minecraft in 1.18. Here is how you can still enjoy the power of LGSM and run a modded Minecraft Forge server.
Install LinuxGSM scripts and go through the process of creating a Minecraft server
Start the server, then stop it
Download the Forge Installer from: https://files.minecraftforge.net/
Copy the forge-1.18.x-x.x.x-installer.jar to /home/mcserver/serverfiles
cd /home/mcserver/serverfiles
java -jar forge-1.18.x-x.x.x-installer.jar -installServer
Once forge finishes the install, manually run ./run.sh a few times to ensure the Minecraft + Forge server is properly setup and running. Be patient, the first time you will have to accept the eula by editing the eula.txt file and setting eula=true. The second time it will generate your world, which will take some time to finish. Once everything starts successfully, stop the server
Go back to /home/mcserver
Edit /home/mcserver/lgsm/config-lgsm/mcserver/mcserver.cfg
If the file is empty, copy everything from _default.cfg to mcserver.cfg
There are two lines you need to change
Comment out the two original lines with a # like this:
#preexecutable="java -Xmx${javaram}M -jar"
#executable="./minecraft_server.jar"
Type in the following replacement two lines:
preexecutable=""
executable="./run.sh"
The preexecutable section should now be empty, just two double quotes
In /home/mcserver/serverfiles find and edit the user_jvm_args.txt file
Set your desired server RAM by removing the # from this line:
-Xmx4G
If you desire more RAM than 4GB, then change the number. For example to use 6G:
-Xmx6G
You can now start your server with ./mcserver start
If something goes wrong, such as mods are giving errors, troubleshoot it by going to /home/mcserver/serverfiles and manually running ./run.sh
This will show you any error messages
Tips:
You will need to edit your server.properties file, found in /home/mcserver/serverfiles. If you want to bring over a premade save from another computer like I did, simply zip up the appropriate save folder from %Appdata%\Roaming\.minecraft\saves\ on your PC. Transfer the zipped file to your Linux server however you see fit. I use Putty's PSFTP because I also use Putty's SSH client to do all of my Linux server work.
Stop your mcserver! Don't forget to do this!
Unzip your saved file in /home/mcserver/serverfiles. You should now have a folder with the name of your world from your PC in /home/mcserver/serverfiles. I prefer to get rid of any spaces in this folder name and replace them with _ as I find this is easier to deal with in Linux config files. Now edit your server.properties file and find the line that says:
level_name=world
Change it to the name of your folder save. For instance, my save folder was named Frog_Men_vs_the_World, so my new level_name line looked like this:
level_name=Frog_Men_vs_the_World
Now start your mcserver again and enjoy your custom modded save file transferred to a dedicated server. No more leaving your client open so your kids can play on the world you made together.
I hope this helps someone else out. Cheers!
Beta Was this translation helpful? Give feedback.
All reactions