Table of Contents

Information

Prerequisites

Resources

Web

Dependencies

su -
pkg install git openjdk22 npm-node23

Download Source

cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/2004Scape-Server/src' && git clone --branch 'main' --depth '1' --recurse-submodules 'https://github.com/2004Scape/Server.git' ~/'Projects/2004Scape-Server/src' && sync

World Map

rm -f '/tmp/2004Scape-worldmap2.jpg' && mkdir -p ~/'Projects/2004Scape-Server/ext' && wget -O '/tmp/2004Scape-worldmap2.jpg' 'https://www.2004scape.org/img/rs2/worldmap/worldmap2.jpg' && mv -f -v '/tmp/2004Scape-worldmap2.jpg' ~/'Projects/2004Scape-Server/ext/worldmap2.jpg'

Initial Build

cd ~/'Projects/2004Scape-Server/src' && JAVA_HOME='/usr/local/openjdk22' npm install --verbose

Settings

ee ~/'Projects/2004Scape-Server/src/.env'
WEB_PORT=8888
NODE_PORT=44594
NODE_PRODUCTION=false
NODE_ALLOW_CHEATS=false
NODE_DEBUG=false
NODE_STAFF=Test

Scripts

Server Start

ee ~/'Projects/2004Scape-Server/localhost-server-start.sh' && chmod +x ~/'Projects/2004Scape-Server/localhost-server-start.sh'
#!/bin/sh

cd ~/'Projects/2004Scape-Server/src'
JAVA_HOME='/usr/local/openjdk22' npm start

# End

Server Update

ee ~/'Projects/2004Scape-Server/localhost-server-update.sh' && chmod +x ~/'Projects/2004Scape-Server/localhost-server-update.sh'
#!/bin/sh

git -C ~/'Projects/2004Scape-Server/src' reset --hard
git -C ~/'Projects/2004Scape-Server/src' pull origin 'main' --rebase

cd ~/'Projects/2004Scape-Server/src'
JAVA_HOME='/usr/local/openjdk22' npm run 'clean'

# End

Save Data Back-up

ee ~/'Projects/2004Scape-Server/localhost-save-backup.sh' && chmod +x ~/'Projects/2004Scape-Server/localhost-save-backup.sh'
#!/bin/sh

tar -cvzf ~/'Downloads/'$(date +%Y-%m-%d-%s)'-2004Scape-Server-localhost-Saves.tar.gz' -C ~/'Projects/2004Scape-Server/src/data' 'players'
sync
notify-send -i ~/'Projects/2004Scape-Server/src/public/favicon.ico' '2004Scape Save Data Backed-up Successfully to Downloads'

# End

Desktop Launcher

2004Scape

mkdir -p ~/'.local/share/applications/' && ee ~/'.local/share/applications/2004Scape-localhost.desktop' && sed -i -e 's/'CHANGEME'/'$USER'/g' ~/'.local/share/applications/2004Scape-localhost.desktop' && update-desktop-database --quiet ~/'.local/share/applications'
[Desktop Entry]
Name=2004Scape
Categories=Game;
Exec='/bin/sh' -c "gio open 'http://localhost:8888'"
Type=Application
StartupNotify=false
Icon=/home/CHANGEME/Projects/2004Scape-Server/src/public/favicon.ico
Actions=Map;Server;Update;Saves;Notes;

[Desktop Action Map]
StartupNotify=false
Exec='/bin/sh' -c "gio open ~/'Projects/2004Scape-Server/ext/worldmap2.jpg'"
Name=World map

[Desktop Action Server]
Exec='/bin/sh' -c "xfce4-terminal -T '2004Scape — Server' -I ~/'Projects/2004Scape-Server/src/public/favicon.ico' -e ~/'Projects/2004Scape-Server/localhost-server-start.sh'"
Name=Server - Start

[Desktop Action Update]
Exec='/bin/sh' -c "xfce4-terminal -T '2004Scape — Updater' -I ~/'Projects/2004Scape-Server/src/public/favicon.ico' -e ~/'Projects/2004Scape-Server/localhost-server-update.sh'"
Name=Server - Update

[Desktop Action Saves]
StartupNotify=false
Exec='/bin/sh' -c "~/'Projects/2004Scape-Server/localhost-save-backup.sh'"
Name=Save Data Back-up

[Desktop Action Notes]
StartupNotify=false
Exec='/bin/sh' -c "gio open 'https://wiki.realmofespionage.xyz/games:bsd:2004scape_localhost'"
Name=Installation Notes

# End

Quick Commands

Execute

Server

cd ~/'Projects/2004Scape-Server/src' && JAVA_HOME='/usr/local/openjdk22' npm start
cd ~/'Projects/2004Scape-Server/src' && JAVA_HOME='/usr/local/openjdk22' npm start --verbose
~/'Projects/2004Scape-Server/localhost-server-start.sh'
xfce4-terminal -T '2004Scape — Server' -I ~/'Projects/2004Scape-Server/src/public/favicon.ico' -e ~/'Projects/2004Scape-Server/localhost-server-start.sh'

Client

Update

git -C ~/'Projects/2004Scape-Server/src' reset --hard && git -C ~/'Projects/2004Scape-Server/src' pull origin 'main' --rebase && cd ~/'Projects/2004Scape-Server/src' && JAVA_HOME='/usr/local/openjdk22' npm run 'clean'
~/'Projects/2004Scape-Server/localhost-server-update.sh'
xfce4-terminal -T '2004Scape — Updater' -I ~/'Projects/2004Scape-Server/src/public/favicon.ico' -e ~/'Projects/2004Scape-Server/localhost-server-update.sh'

npm

cd ~/'Projects/2004Scape-Server/src' && JAVA_HOME='/usr/local/openjdk22' npm update --verbose

Save Data Back-up

mkdir -p ~/'Projects/2004Scape-Server/src/data/players' && gio open ~/'Projects/2004Scape-Server/src/data/players'
~/'Projects/2004Scape-Server/localhost-save-backup.sh'

World Map

gio open ~/'Projects/2004Scape-Server/ext/worldmap2.jpg'
~/'Projects/2004Scape-Server/ext/worldmap2.jpg'

npm

cd ~/'Projects/2004Scape-Server/src' && JAVA_HOME='/usr/local/openjdk22' npm run

File Manager

Root

gio open ~/'Projects/2004Scape-Server/src'

Saves

mkdir -p ~/'Projects/2004Scape-Server/src/data/players' && gio open ~/'Projects/2004Scape-Server/src/data/players'
3)
RSPS/RuneScape Private Server based on cache 225 from May 18th, 2004