| |
servers:linux:games:2009scape_localhost [2025/01/17 16:02] – [Media] Sean Rhone | servers:linux:games:2009scape_localhost [2025/09/11 06:43] (current) – external edit 127.0.0.1 |
---|
===== Prerequisites ===== | ===== Prerequisites ===== |
| |
* [[linux;distros;fedora_workstation_gnome|Fedora Workstation]] | * [[linux;distros;opensuse_tumbleweed_gnome|openSUSE Tumbleweed (GNOME)]] |
| |
===== Notes ===== | ===== Notes ===== |
| |
* For a game client, see [[games:linux:rt4_client_runescape_530|RT4 Client]] | * For a game client, see [[games:linux:rt4_client_runescape_530|RT4 Client]] |
| |
===== Resources ===== | |
| |
* [[https://forum.2009scape.org/viewtopic.php?t=1038-singleplayer-server-rt4-client-master-branches-scripts-and-desktop-start-launchers-on-windows-linux|2009Scape Forums]] | |
| |
====== Dependencies ====== | ====== Dependencies ====== |
* https://gitlab.com/2009scape/2009scape#prerequisites | * https://gitlab.com/2009scape/2009scape#prerequisites |
| |
sudo dnf install git git-lfs temurin-11-jdk | sudo zypper install git-core git-lfs java-24-openjdk-headless |
| |
| ===== Java Priority ===== |
| |
| * ''jre-24-openjdk'' |
| |
| sudo update-alternatives --config 'java' |
| |
====== Download Source ====== | ====== Download Source ====== |
====== Initial Build ====== | ====== Initial Build ====== |
| |
cd ~/'Projects/2009Scape-Server/src/Server' && JAVA_HOME='/usr/lib/jvm/temurin-11-jdk' ~/'Projects/2009Scape-Server/src/Server/mvnw' 'clean' | **** |
| |
cd ~/'Projects/2009Scape-Server/src/Server' && JAVA_HOME='/usr/lib/jvm/temurin-11-jdk' ~/'Projects/2009Scape-Server/src/Server/mvnw' 'package' | cd ~/'Projects/2009Scape-Server/src/Server' && JAVA_HOME='/usr/lib64/jvm/java-24-openjdk-24' ~/'Projects/2009Scape-Server/src/Server/mvnw' 'clean' 'package' -DskipTests |
| |
====== Settings ====== | ====== Settings ====== |
| |
* Last commit: [[https://gitlab.com/2009scape/2009scape/-/commit/317b4e9b5c330c6492663631d3edca9794dfc2f9|August 10, 2024]] ''317b4e9b'' | * Last commit: [[https://gitlab.com/2009scape/2009scape/-/commit/bef103e25934ab2ba465e157fe776d947aa4a49b|July 15, 2025]] ''bef103e2'' |
* [[https://gitlab.com/2009scape/2009scape/-/commits/master/Server/worldprops/default.conf?ref_type=heads|New commits check]] | * [[https://gitlab.com/2009scape/2009scape/-/commits/master/Server/worldprops/default.conf?ref_type=heads|New commits check]] |
* [[https://gitlab.com/2009scape/2009scape/-/blob/master/Server/worldprops/default.conf?ref_type=heads|Upstream worldprops/default.conf]] ([[https://gitlab.com/2009scape/2009scape/-/raw/master/Server/worldprops/default.conf?ref_type=heads|raw]]) | * [[https://gitlab.com/2009scape/2009scape/-/blob/master/Server/worldprops/default.conf?ref_type=heads|Upstream worldprops/default.conf]] ([[https://gitlab.com/2009scape/2009scape/-/raw/master/Server/worldprops/default.conf?ref_type=heads|raw]]) |
| |
rm -v -f ~/'Projects/2009Scape-Server/src/Server/worldprops/default.conf' | mkdir -p ~/'Projects/2009Scape-Server/conf' && nano ~/'Projects/2009Scape-Server/conf/localhost.conf' |
| |
nano ~/'Projects/2009Scape-Server/src/Server/worldprops/default.conf' | |
| |
<code> | <code> |
# Server | # Server |
log_level = "verbose" | log_level = "verbose" |
write_logs = true | write_logs = false |
msip = "localhost" | msip = "localhost" |
secret_key = "2009scape_development" | secret_key = "2009scape_development" |
skillcape_perks = false | skillcape_perks = false |
jad_practice_enabled = false | jad_practice_enabled = false |
| inauthentic_candlelight_random = false |
| |
# Holiday (only enable one or none) | # Holiday (only enable one "force" or none) |
force_halloween_randoms = false | force_halloween_randoms = false |
force_christmas_randoms = true | force_christmas_randoms = false |
| holiday_event_randoms = false |
| |
# PVP | # PVP |
pvp = false | pvp = false |
wild_pvp_enabled = false | wild_pvp_enabled = false |
revenant_population = 30 | revenant_population = 0 |
| |
# Server config | # Server config |
enable_castle_wars = false | enable_castle_wars = false |
verbose_cutscene = false | verbose_cutscene = false |
holiday_event_randoms = true | |
enable_bots = false | enable_bots = false |
max_adv_bots = 100 | max_adv_bots = 100 |
| |
===== Server Start ===== | ===== Server Start ===== |
| |
* [[games:linux:rt4_client_runescape_530#scape_localhost|RT4 Client Desktop Action Server]] | |
| |
mkdir -p ~/'Projects/2009Scape-Server/scripts' && nano ~/'Projects/2009Scape-Server/scripts/localhost-server-start.sh' && chmod +x ~/'Projects/2009Scape-Server/scripts/localhost-server-start.sh' | mkdir -p ~/'Projects/2009Scape-Server/scripts' && nano ~/'Projects/2009Scape-Server/scripts/localhost-server-start.sh' && chmod +x ~/'Projects/2009Scape-Server/scripts/localhost-server-start.sh' |
| |
cd ~/'Projects/2009Scape-Server/src/Server' | cd ~/'Projects/2009Scape-Server/src/Server' |
'/usr/lib/jvm/temurin-11-jdk/bin/java' -jar ~/'Projects/2009Scape-Server/src/Server/target/server-'*'-jar-with-dependencies.jar' | |
| export _JAVA_OPTIONS='--sun-misc-unsafe-memory-access=allow --enable-native-access=ALL-UNNAMED -Djava.net.preferIPv6Addresses=false' |
| |
| '/usr/lib64/jvm/java-24-openjdk-24/bin/java' -jar ~/'Projects/2009Scape-Server/src/Server/target/server-'*'-jar-with-dependencies.jar' '../../conf/localhost.conf' |
| |
# End</code> | # End</code> |
| |
===== Server Update ===== | ===== Server Update ===== |
| |
* [[https://gitlab.com/2009scape/2009scape/-/commits/master|Commits History]] | |
* [[games:linux:rt4_client_runescape_530#scape_localhost|RT4 Client Desktop Action Server-Update]] | |
| |
mkdir -p ~/'Projects/2009Scape-Server/scripts' && nano ~/'Projects/2009Scape-Server/scripts/localhost-server-update.sh' && chmod +x ~/'Projects/2009Scape-Server/scripts/localhost-server-update.sh' | mkdir -p ~/'Projects/2009Scape-Server/scripts' && nano ~/'Projects/2009Scape-Server/scripts/localhost-server-update.sh' && chmod +x ~/'Projects/2009Scape-Server/scripts/localhost-server-update.sh' |
| |
cd ~/'Projects/2009Scape-Server/src/Server' | cd ~/'Projects/2009Scape-Server/src/Server' |
JAVA_HOME='/usr/lib/jvm/temurin-11-jdk' ~/'Projects/2009Scape-Server/src/Server/mvnw' 'clean' 'package' -DskipTests | |
| |
notify-send -i ~/'Projects/RT4-Client/src/client/src/main/resources/saradomin.png' '2009Scape worldprops copy/paste in 3 seconds...' | export JAVA_HOME='/usr/lib64/jvm/java-24-openjdk-24' |
sleep '3' | export _JAVA_OPTIONS='--sun-misc-unsafe-memory-access=allow --enable-native-access=ALL-UNNAMED' |
gio open 'https://wiki.realmofespionage.xyz/servers:linux:games:2009scape_localhost#settings' | |
rm -f ~/'Projects/2009Scape-Server/src/Server/worldprops/default.conf' | ~/'Projects/2009Scape-Server/src/Server/mvnw' 'clean' 'package' -DskipTests |
nano ~/'Projects/2009Scape-Server/src/Server/worldprops/default.conf' | |
| |
notify-send -i ~/'Projects/RT4-Client/src/client/src/main/resources/saradomin.png' '2009Scape localhost server update complete' | unset 'JAVA_HOME' '_JAVA_OPTIONS' |
| |
| zenity --title '2009Scape Updater' --text 'localhost server update complete' --icon ~/'Projects/RT4-Client/src/client/src/main/resources/saradomin.png' --timeout '1' --info |
| |
# End</code> | # End</code> |
| |
===== Save Data Back-up ===== | ===== Save Data Back-up ===== |
| |
* [[games:linux:rt4_client_runescape_530#scape_localhost|RT4 Client Desktop Action Saves]] | |
| |
mkdir -p ~/'Projects/2009Scape-Server/scripts' && nano ~/'Projects/2009Scape-Server/scripts/localhost-save-backup.sh' && chmod +x ~/'Projects/2009Scape-Server/scripts/localhost-save-backup.sh' | mkdir -p ~/'Projects/2009Scape-Server/scripts' && nano ~/'Projects/2009Scape-Server/scripts/localhost-save-backup.sh' && chmod +x ~/'Projects/2009Scape-Server/scripts/localhost-save-backup.sh' |
#!/bin/bash | #!/bin/bash |
| |
tar -cvzf ~/'Downloads/'$(date +%Y-%m-%d-%s)'-2009Scape-Server-localhost-Saves.tar.gz' -C ~/'Projects/2009Scape-Server/src/Server/data' 'players' | tar -czf ~/'Downloads/'$(date +%Y-%m-%d-%s)'-2009Scape-localhost-Saves.tar.gz' -C ~/'Projects/2009Scape-Server/src/Server/data' 'players' |
sync | |
notify-send -i ~/'Projects/RT4-Client/src/client/src/main/resources/saradomin.png' '2009Scape Save Data Backed-up Successfully to Downloads' | zenity --title '2009Scape Save Backup' --text 'Save Data Backed-up to Downloads' --icon ~/'Projects/RT4-Client/src/client/src/main/resources/saradomin.png' --timeout '1' --info |
| |
# End</code> | # End</code> |
====== Quick Commands ====== | ====== Quick Commands ====== |
| |
===== Execute ===== | ===== Save Restore ===== |
| |
===== Server ===== | **** |
| |
cd ~/'Projects/2009Scape-Server/src/Server' && '/usr/lib/jvm/temurin-11-jdk/bin/java' -jar ~/'Projects/2009Scape-Server/src/builddir/server.jar' | |
| |
~/'Projects/2009Scape-Server/scripts/localhost-server-start.sh' | |
| |
ptyxis --standalone --title='2009Scape Server — ' -- ~/'Projects/2009Scape-Server/scripts/localhost-server-start.sh' | |
| |
===== Update ===== | |
| |
* [[https://gitlab.com/2009scape/2009scape/-/commits/master|Commits History]] | |
| |
git -C ~/'Projects/2009Scape-Server/src' reset --hard && git -C ~/'Projects/2009Scape-Server/src' pull origin 'master' --rebase && cd ~/'Projects/2009Scape-Server/src/Server' && mvn 'clean' && cd ~/'Projects/2009Scape-Server/src' && ~/'Projects/2009Scape-Server/src/build' -g -c 'g' -q && cd ~ && sync | |
| |
~/'Projects/2009Scape-Server/scripts/localhost-server-update.sh' | |
| |
ptyxis --standalone --title='2009Scape Server Updater — ' -- ~/'Projects/2009Scape-Server/scripts/localhost-server-update.sh' | |
| |
===== Save Data Back-up ===== | |
| |
tar -cvzf ~/'Downloads/'$(date +%Y-%m-%d-%s)'-2009Scape-Server-localhost-Saves-manual.tar.gz' -C ~/'Projects/2009Scape-Server/src/Server/data' 'players' | |
| |
~/'Projects/2009Scape-Server/scripts/localhost-save-backup.sh' | |
| |
mkdir -p ~/'Projects/2009Scape-Server/src/Server/data/players' && gio open ~/'Projects/2009Scape-Server/src/Server/data/players' | mkdir -p ~/'Projects/2009Scape-Server/src/Server/data/players' && gio open ~/'Projects/2009Scape-Server/src/Server/data/players' |
| |
===== File Manager ===== | |
| |
==== Root ==== | |
| |
**** | |
| |
gio open ~/'Projects/2009Scape-Server/src' | |
| |
==== Saves ==== | |
| |
**** | |
| |
gio open ~/'Projects/2009Scape-Server/src/Server/data/players' | |
| |
====== Resources/TODOs ====== | |
| |
* https://github.com/2009scape/2009Scape-mobile/issues/13 | |
* https://gitlab.com/2009scape/2009scape/-/raw/master/Server/worldprops/default.conf?ref_type=heads | |
* https://gitlab.com/2009scape/singleplayer/windows/-/raw/master/game/worldprops/default.conf | |
* https://gitlab.com/2009scape/2009scape/-/blob/master/Server/src/main/core/game/system/config/ServerConfigParser.kt#L66 | |
* https://gitlab.com/2009scape/2009scape/-/blob/master/Server/src/main/core/game/world/GameSettings.kt#L120 | |
* ''noauth_default_admin'' to ''true'' if ''::to'' needed/stuck | |
* Pest Control and Mining Star bots auto-still appear with bots disabled in conf (bots disabled stops auto-spawn bots at Lumbridge/seemingly general areas) | |
| |