User Tools

Site Tools


morelore:server-pack

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
morelore:server-pack [2023/03/28 05:39] – created AnarchyOf5morelore:server-pack [2025/11/09 15:52] (current) AnarchyOf5
Line 1: Line 1:
 ====== How to install MoreLore on your own Server ====== ====== How to install MoreLore on your own Server ======
  
-Eventually I plan to release a proper server pack, but until then use these steps to get up and running.+** THIS TUTORIAL IS FOR LINUX ONLY **
  
-===== Fabric Server Installer =====+===== Downloading and Installing NeoForge =====
  
-  - Create an empty folder to hold your pack (you can name it whatever you like) +Download the correct version of Neoforge for the version of the pack you want to run. Neoforge version is listed in the [[morelore:changelog|changelog]]. The Neoforge installer can be downloaded from [[https://neoforged.net/|here]]. Make sure you select the correct version of Minecraft and Neoforge in the drop down menu at the top of the pageYou will download JAR file that is named something like: 
-  - Download the latest Fabric server installer following the instructions [[https://fabricmc.net/use/server/|here]]. You will receive a .jar file after you are finished. This file is the one you need to start your modded MoreLore server instance. Place this file in your newly created folder. +
-  - Fortunately, MoreLore mods all work (or disable themselves as they should) in server pack. So all you need to do is create a local client instance using your favorite launcher i.e. Curseforge, ATLauncher etc. +
-  - Copy over the following folders from the client instance, into your newly created server +
-    * mods +
-    * config +
-    * kubejs+
  
-===== Start and Stop Script =====+<code>neoforge-21.1.209-installer.jar</code>
  
-To automate the process of starting and stopping your server, you can use the following bash code as a referenceIf you are hosting this on a dedicated Linux server, I recommend using either screen or tmux to run the game in the background. This will allow you to ssh in and attach/detch from the current game session without the server shutting down.+You will need to SCP/SFTP/FTP this up to your server (outside the scope of this article)One you have it on your server run
  
-  #!/bin/sh +<code>java -jar neoforge-21.1.209-installer.jar</code>
-  # More Lore Enhanced Vanilla Server Startup Script +
-   +
-  # Edit the below values to change JVM Arguments or Allocated RAM for the server: +
-  ALLOCATED_RAM="8G" +
-  JVM_ARGUMENTS="-XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:G1MixedGCLiveThresholdPercent=50 -XX:+AlwaysPreTouch" +
-  FABRIC_VERSION="fabric-0.11.1+
-  FABRIC_LOADER_VERSION="0.14.11" +
-  MC_VERSION="1.19.2" +
-  FILE="./fabric-server-mc.1.19.2-loader.0.14.17-launcher.0.11.2.jar+
-   +
-  # Start server. +
-  echo "Starting MoreLore Server." +
-  java -jar -Xms${ALLOCATED_RAM} -Xmx${ALLOCATED_RAM} ${JVM_ARGUMENTS} ${FILE} nogui +
-  echo "Server shutting down on $(date)."+
  
 +This will create the server.jar and the run.sh files you will need to start your server.
  
 +===== Uploading Pack =====
 +
 +The client pack can be safely uploaded, using the same method you used to get the installer jar on your server. Make sure to remove the following mods:
 +
 +  * Entity Texture Features
 +  * Freecam
 +
 +These mods are client side only and will cause an error if you try to run the server. Once removed, you can run the server by entering the following command: ./run.sh
 +
 +This will create your world and start your server.
 +
 +===== Persisting Server in Background =====
 +
 +This will require you to be logged in to stay running. Obviously, we don't want that. So, we can use either TMUX or Screen to create a special terminal session that will persists, even after you logout of your ssh session. For example, you can create a TMUX session using the following:
 +
 +<code>tmux new-session -t morelore</code>
 +
 +This will pop you into a TMUX session named morelore. From here, start your server using the command above and the hit CTRL + ALT then B to detach from the session. You can now safely log out and your server will stay running. We recommend restarting your server at least once a day. You can automate this using a cronjob, which you can set as you need. here's a basic restart script to get you started. It runs a 5 minute countdown timer and messages players in-game giving them a head's up a restart is about to happen.
 +
 +<code>
 +#!/usr/bin/bash
 +# 5 Minute count down and restart
 +tmux send-keys -t morelore:0.0 'tellraw @a {"text": "Restarting in 5 minutes", "color":"red"}' ENTER
 +sleep 1m
 +tmux send-keys -t morelore:0.0 'tellraw @a {"text": "Restarting in 4 minutes", "color":"red"}' ENTER
 +sleep 1m
 +tmux send-keys -t morelore:0.0 'tellraw @a {"text": "Restarting in 3 minutes", "color":"red"}' ENTER
 +sleep 1m
 +tmux send-keys -t morelore:0.0 'tellraw @a {"text": "Restarting in 2 minutes", "color":"red"}' ENTER
 +sleep 1m
 +tmux send-keys -t morelore:0.0 'title @a subtitle {"text":"Get ready!","color":"red","italic":true}' ENTER
 +tmux send-keys -t morelore:0.0 'title @a title {"text":"Server Restart","bold":true}' ENTER
 +tmux send-keys -t morelore:0.0 'tellraw @a {"text": "Restarting in 1 minute!", "color":"red"}' ENTER
 +sleep 1m
 +tmux send-keys -t morelore:0.0 'stop' ENTER
 +</code>
 +
 +Keep in mind, the cronjob should be set for the non-admin user that is running your server! TMUX sessions are unique to the user that starts them.
 +
 +If everything goes smooth, you should now have a working MoreLore server to play on with your friends! Congratulations.
morelore/server-pack.1679981954.txt.gz · Last modified: by AnarchyOf5