Skip to content

Latest commit

 

History

History
76 lines (58 loc) · 2.44 KB

selfhosting.md

File metadata and controls

76 lines (58 loc) · 2.44 KB

2009Scape selfhosting guide

Note: We strongly recommend just setting the server up for development. This guide is really a reference to existing developers, and if the live server ever goes down.

See the README.md file for setting up 2009scape for development

Requirements

You will need:

git
gradle
java 8

Recommended:

Linux
Debugging ability

Getting the code:

Git clone this repository, or download the latest source with the clone or download button

Building the server:

In a terminal, enter both the Management-Server and Server folders and run gradle build

Optional: Setting the client target IP address for non-local servers

In Client/src/main/java/org/runite/Configurations.java set LOCAL_MS and LOCAL_SERVER to false

In Client/src/main/java/org/runite/Client.java set PUBLIC_IP_ADDRESS to your server's ip address

Building the client:

In a terminal, enter the Client folder and run gradle build

Installing the databases:

Windows & Linux GUI:

  • Download and install xampp
  • Start the Apache and MySQL modules
  • Navigate to http://localhost/phpmyadmin/
  • Create a database global
  • Import Server/global.sql into that database
    • Refer here for help importing the .sql files

Linux Command Line

  • Get and install mariadb or some other sql compatible database from your repository
  • Login and create the global database: Create:
CREATE DATABASE global;
  • Import the global database from the Server/ directory:
mysql -u root -p global < global.sql

Running the server/client

In a terminal, navigate to the Management-Server folder and run gradle run

Then navigate to the Server folder and run gradle run

The client can also be run with gradle run. Gradle also generates jars that you can distribute inside Client/build/distributions/Client.zip

(Optional) Customizing the Server rules

Edit default.json in Server/worldprops

(Optional) Adding Plugins

(Optional) Port Forwarding for non-local users

Port forwarding instrcutions depend on your router, but you'll want to forward the following ports:

  • 5050 (??? management server I think?)
  • 5555 (World list, or something?)
  • 43945 (World 1)
  • 43946 (World 2)
  • 43947 (World 3)