More actions
mNo edit summary |
mNo edit summary |
||
Line 67: | Line 67: | ||
<ul> | <ul> | ||
<li>Create a file named <code>start.sh</code> in your server directory:</li> | <li>Create a file named <code>start.sh</code> in your server directory:</li> | ||
<syntaxhighlight lang="bash" line>local unwanted_mods=("legendarytooltips" "torohealth" "rubidium") | <syntaxhighlight lang="bash" line>local unwanted_mods=("legendarytooltips" "torohealth" "rubidium") | ||
for mod_pattern in "${unwanted_mods[@]}"; do | for mod_pattern in "${unwanted_mods[@]}"; do | ||
Line 121: | Line 120: | ||
break | break | ||
done</syntaxhighlight> | done</syntaxhighlight> | ||
</ul> | </ul> | ||
</li> | </li> | ||
Line 134: | Line 132: | ||
</li> | </li> | ||
<li>The server will create necessary files and then stop</li> | <li>The server will create necessary files and then stop</li> | ||
<li>Edit <code>eula.txt</code> and change <code>eula=false</code> to <code>eula=true</code>: | <li>Edit <code>eula.txt</code> and change <code>eula=false</code> to <code>eula=true</code>:</li> | ||
<pre>nano eula.txt</pre> | |||
<li>Optionally, edit <code>server.properties</code> to configure server settings:</li> | |||
<pre>nano server.properties</pre> | |||
</ul> | |||
<li>Optionally, edit <code>server.properties</code> to configure server settings: | |||
</li> | </li> | ||
<li>Start Your Server | <li>Start Your Server |
Revision as of 01:33, 22 July 2025
- Install Java 17
-
Ubuntu/Debian sudo apt update sudo apt install openjdk-17-jdk java --version
-
CentOS/RHEL/Fedora/Rocky sudo dnf install java-17-openjdk-devel java --version
-
MacOS (using Homebrew) brew install openjdk@17 java --version
-
CentOS/RHEL/Fedora/Rocky sudo dnf install java-17-openjdk-devel java --version
-
FreeBSD/OpenBSD (via pkg) pkg install openjdk17 java --version
- If you followed the commands above, you should see an output similar the following, after running
java --version
openjdk version "17.0.12" 2024-07-16 LTS OpenJDK Runtime Environment Microsoft-9889599 (build 17.0.12+7-LTS) OpenJDK 64-Bit Server VM Microsoft-9889599 (build 17.0.12+7-LTS, mixed mode, sharing)
-
- Create Server Directory
mkdir ~/VaultHunters-Server cd ~/VaultHunters-Server
- Download the Recommended Version of Forge 1.18.2
- Download Server Files
- Navigate to the Vault Hunters CurseForge page
- Go to the "Files" tab
- Find the latest version
- Click on the version to view details
- In the "Additional Files" section, download the Server Files Pack
- Extract the server files to your server directory
- Create Start Script
- Create a file named
start.sh
in your server directory:
local unwanted_mods=("legendarytooltips" "torohealth" "rubidium") for mod_pattern in "${unwanted_mods[@]}"; do if ls mods/*$mod_pattern* >/dev/null 2>&1; then rm -f mods/*$mod_pattern* fi done local restart_count=0 while true; do # Build JVM arguments local args=() # Add custom JVM args if specified if [ -n "$JVM_ARGS" ]; then read -ra jvm_args_array <<< "$JVM_ARGS" args+=("${jvm_args_array[@]}") fi # Add user JVM args if file exists if [ -f "user_jvm_args.txt" ]; then while IFS= read -r line; do if [[ "$line" =~ ^-.*$ ]]; then args+=("$line") fi done < "user_jvm_args.txt" fi # Use unix_args.txt instead of win_args.txt on Unix systems local args_file="libraries/net/minecraftforge/forge/1.18.2-$FORGE_VERSION/unix_args.txt" if [ ! -f "$args_file" ]; then # Fallback to win_args.txt if unix_args.txt doesn't exist args_file="libraries/net/minecraftforge/forge/1.18.2-$FORGE_VERSION/win_args.txt" fi args+=("@$args_file") args+=("nogui") # Start server "$JAVA_FILE" "${args[@]}" # Check for restart conditions if [ "$VH3_RESTART" = "true" ] && [ -f "logs/latest.log" ]; then if ! grep -q "Stopping the server" "logs/latest.log"; then restart_count=$((restart_count + 1)) if [ $restart_count -le 10 ]; then print_color $YELLOW "Restarting automatically in 10 seconds (press Ctrl + C to cancel)" sleep 10 continue fi fi fi break done
- Create a file named
- Initial Server Setup
- Run the server for the first time:
./start.sh
- The server will create necessary files and then stop
- Edit
eula.txt
and changeeula=false
toeula=true
:
nano eula.txt
- Run the server for the first time:
- Optionally, edit
server.properties
to configure server settings: - Start Your Server
- Execute
./start.sh
to start your server. First startup may take several minutes as Forge loads all mods.
- Execute
nano server.properties