It was simple in the end but the whole project was a headache because of a few easy things that I didn't know.
First select a runescape server and client. I chose the simplest one I could find:
https://rune-server.org/threads/project-insanity.283605/
https://www.mediafire.com/?zknstl1h4akalk8
Download and extract the files to your computer.
Then open a vps account. I used Digitalocean and it works well but you can choose whatever vps you want.
https://www.digitalocean.com/
I chose a linux server but I'd recommend a windows vps if you're starting off even if it's more expensive because moving files around was a pain and there is no gui. Also linux is case sensitive so if you have any references to folders that are the wrong case you'll need to change the folder names. It's not difficult but a little annoying.
I used paypal for my billing method and it cost 5 dollars to link it but if you want to link a credit card that works too.
I chose the most basic option with a regular cpu which is 4 dollars a month for 512 mb RAM, 1 CPU, 10gb ssd hard drive and 500 gb bandwidth. It should be fine for a small server.
These threads go over what specs you might want. I picked the most basic one because I just wanted to try out hosting.
https://rune-server.org/threads/ultimate-vps-guide.317514/
https://rune-server.org/threads/can-i-run-a-rsps-with-this-kind-of-vps.487820/
I chose the default os and it works so I suggest just going with that.
Download java on your vps. I just typed java in the console and it gave me a bunch of versions. I just downloaded the default but you can do whatever one you want.
When you're done setting up your vps upload your server files to the server. I moved them to the home directory but you don't need to do that.
I used the filezilla client to move my files to the vps from my pc
https://filezilla-project.org/download.php?type=client
To connect to the vps set your ip for host, username of your console for username, the password of your vps for password, and port 22 for SFTP.
To run your vps for the first time might be tricky because linux and windows commands are different.
java -Xmx800m -cp bin;deps/poi.jar;deps/mysql.jar;deps/mina.jar;deps/slf4j.jar;deps/slf4j-nop.jar;deps/jython.jar;log4j-1.2.15.jar; server.Server
in windows is
java -Xmx800m -cp "bin:deps/poi.jar:deps/mysql.jar:deps/mina.jar:deps/slf4j.jar:deps/slf4j-nop.jar:deps/jython.jar:log4j-1.2.15.jar" server.Server
in linux
So it's probably easier to just create a jar file
Also copying and pasting is different in linux and windows. To paste in windows press ctrl shift v and to copy you have to select then right click then copy.
Go to the right directory and write the run command:
java -Xmx800m -cp "bin:deps/poi.jar:deps/mysql.jar:deps/mina.jar:deps/slf4j.jar:deps/slf4j-nop.jar:deps/jython.jar:log4j-1.2.15.jar" server.Server
VERY IMPORTANT
VERY IMPORTANT
VERY IMPORTANT
Understanding directories and how they work is critical to getting your server running. If you don't know how to navigate directories in java and linux I recommend going over how directories work thoroughly before attempting this project. I would also recommend going over how run commands, bat files and sh files work before trying to run a server. Understanding dependencies, java version compatibility with different servers, jdk, jre, packages, imports, and the difference between using an ide and using commands is also critical.
In linux changing directories is different but similar to windows:
cd in windows is pwd in linux - this prints the current directory
cd.. in windows is cd .. in linux - this moves up a folder
dir in windows is ls in linux - this tells you what files are in a folder
cd is the same to change folders
Mine ran with no issue but the tricky part was getting the client to connect.
VERY IMPORTANT
The client must be set to connect to the ip address of your vps. I spent a lot of time confused about this because I thought I had to change this line in the client.java class:
public static void main(String args[]) {
try {
System.out.println("RS2 user client - release #" + 317);
if(args.length != 5) {
System.out.println("Usage: node-id, port-offset, [lowmem/highmem], [free/members], storeid");
return;
}
nodeID = Integer.parseInt(args[0]);
//portOff = Integer.parseInt(args[1]);
portOff = 0;
if(args[2].equals("lowmem"))
setLowMem();
else if(args[2].equals("highmem")) {
setHighMem();
} else {
System.out.println("Usage: node-id, port-offset, [lowmem/highmem], [free/members], storeid");
return;
}
if(args[3].equals("free"))
isMembers = false;
else if(args[3].equals("members")) {
isMembers = true;
} else {
System.out.println("Usage: node-id, port-offset, [lowmem/highmem], [free/members], storeid");
return;
}
signlink.storeid = Integer.parseInt(args[4]);
//This doesn't connect to the server ip when changed
signlink.startpriv(InetAddress.getLocalHost());
new Jframe(args);
//client client1 = new client();
//client1.createClientFrame(503, 765);
} catch(Exception exception) {
}
}
This is where you need to change the ip address to your vps ip address
public client() {
fullscreenInterfaceID = -1;
chatRights = new int[500];
chatTypeView = 0;
clanChatMode = 0;
cButtonHPos = -1;
cButtonHCPos = -1;
cButtonCPos = 0;
//change this from your local ip to the vps ip
server = "159.203.184.4";
Once you change that and run it the client should connect to the server. Remember if using eclipse to run the client add "10 0 highmem members 32" to the run configuration if
or the client won't run. If you're using the run.bat file it should work without you needing to change anything as long as you have java installed.
After I ran it there were some issues with the data files. Npcs didn't show up and a few interfaces didn't work.
This was because linux is case sensitive and reads the cfg and CFG folder differently so it couldn't find the npc drop and other data files that were important. You could just change the references to the correct case but I just copied the cfg file and created a CFG folder with the same contents as the lowercase folder.
I tried doing it using linux but it was a little technical so I just created a copy on my desktop changed case and uploaded it to the right directory with filezilla.
VERY IMPORTANT
The console that you use to run your server will not keep the server running after you close it. This means that you would have to keep the console on indefinitely in order for people to play when your computer is off. To fix this use the nohup command in the console:
nohup command [arguments] &
nohup java -jar myserver.jar &
The & is important because it keeps the server running in the background. For example I did:
nohup java -Xmx800m -cp "bin:deps/poi.jar:deps/mysql.jar:deps/mina.jar:deps/slf4j.jar:deps/slf4j-nop.jar:deps/jython.jar:log4j-1.2.15.jar" server.Server &
You can substitute it with a jar file or whatever other way you choose to run the server. Make sure that you are running the command from the right directory.
That should get your server online and give you a client that connects to your server.
First select a runescape server and client. I chose the simplest one I could find:
https://rune-server.org/threads/project-insanity.283605/
https://www.mediafire.com/?zknstl1h4akalk8
Download and extract the files to your computer.
Then open a vps account. I used Digitalocean and it works well but you can choose whatever vps you want.
https://www.digitalocean.com/
I chose a linux server but I'd recommend a windows vps if you're starting off even if it's more expensive because moving files around was a pain and there is no gui. Also linux is case sensitive so if you have any references to folders that are the wrong case you'll need to change the folder names. It's not difficult but a little annoying.
I used paypal for my billing method and it cost 5 dollars to link it but if you want to link a credit card that works too.
I chose the most basic option with a regular cpu which is 4 dollars a month for 512 mb RAM, 1 CPU, 10gb ssd hard drive and 500 gb bandwidth. It should be fine for a small server.
These threads go over what specs you might want. I picked the most basic one because I just wanted to try out hosting.
https://rune-server.org/threads/ultimate-vps-guide.317514/
https://rune-server.org/threads/can-i-run-a-rsps-with-this-kind-of-vps.487820/
I chose the default os and it works so I suggest just going with that.
Download java on your vps. I just typed java in the console and it gave me a bunch of versions. I just downloaded the default but you can do whatever one you want.
When you're done setting up your vps upload your server files to the server. I moved them to the home directory but you don't need to do that.
I used the filezilla client to move my files to the vps from my pc
https://filezilla-project.org/download.php?type=client
To connect to the vps set your ip for host, username of your console for username, the password of your vps for password, and port 22 for SFTP.
To run your vps for the first time might be tricky because linux and windows commands are different.
java -Xmx800m -cp bin;deps/poi.jar;deps/mysql.jar;deps/mina.jar;deps/slf4j.jar;deps/slf4j-nop.jar;deps/jython.jar;log4j-1.2.15.jar; server.Server
in windows is
java -Xmx800m -cp "bin:deps/poi.jar:deps/mysql.jar:deps/mina.jar:deps/slf4j.jar:deps/slf4j-nop.jar:deps/jython.jar:log4j-1.2.15.jar" server.Server
in linux
So it's probably easier to just create a jar file
Also copying and pasting is different in linux and windows. To paste in windows press ctrl shift v and to copy you have to select then right click then copy.
Go to the right directory and write the run command:
java -Xmx800m -cp "bin:deps/poi.jar:deps/mysql.jar:deps/mina.jar:deps/slf4j.jar:deps/slf4j-nop.jar:deps/jython.jar:log4j-1.2.15.jar" server.Server
VERY IMPORTANT
VERY IMPORTANT
VERY IMPORTANT
Understanding directories and how they work is critical to getting your server running. If you don't know how to navigate directories in java and linux I recommend going over how directories work thoroughly before attempting this project. I would also recommend going over how run commands, bat files and sh files work before trying to run a server. Understanding dependencies, java version compatibility with different servers, jdk, jre, packages, imports, and the difference between using an ide and using commands is also critical.
In linux changing directories is different but similar to windows:
cd in windows is pwd in linux - this prints the current directory
cd.. in windows is cd .. in linux - this moves up a folder
dir in windows is ls in linux - this tells you what files are in a folder
cd is the same to change folders
Mine ran with no issue but the tricky part was getting the client to connect.
VERY IMPORTANT
The client must be set to connect to the ip address of your vps. I spent a lot of time confused about this because I thought I had to change this line in the client.java class:
public static void main(String args[]) {
try {
System.out.println("RS2 user client - release #" + 317);
if(args.length != 5) {
System.out.println("Usage: node-id, port-offset, [lowmem/highmem], [free/members], storeid");
return;
}
nodeID = Integer.parseInt(args[0]);
//portOff = Integer.parseInt(args[1]);
portOff = 0;
if(args[2].equals("lowmem"))
setLowMem();
else if(args[2].equals("highmem")) {
setHighMem();
} else {
System.out.println("Usage: node-id, port-offset, [lowmem/highmem], [free/members], storeid");
return;
}
if(args[3].equals("free"))
isMembers = false;
else if(args[3].equals("members")) {
isMembers = true;
} else {
System.out.println("Usage: node-id, port-offset, [lowmem/highmem], [free/members], storeid");
return;
}
signlink.storeid = Integer.parseInt(args[4]);
//This doesn't connect to the server ip when changed
signlink.startpriv(InetAddress.getLocalHost());
new Jframe(args);
//client client1 = new client();
//client1.createClientFrame(503, 765);
} catch(Exception exception) {
}
}
This is where you need to change the ip address to your vps ip address
public client() {
fullscreenInterfaceID = -1;
chatRights = new int[500];
chatTypeView = 0;
clanChatMode = 0;
cButtonHPos = -1;
cButtonHCPos = -1;
cButtonCPos = 0;
//change this from your local ip to the vps ip
server = "159.203.184.4";
Once you change that and run it the client should connect to the server. Remember if using eclipse to run the client add "10 0 highmem members 32" to the run configuration if
or the client won't run. If you're using the run.bat file it should work without you needing to change anything as long as you have java installed.
After I ran it there were some issues with the data files. Npcs didn't show up and a few interfaces didn't work.
This was because linux is case sensitive and reads the cfg and CFG folder differently so it couldn't find the npc drop and other data files that were important. You could just change the references to the correct case but I just copied the cfg file and created a CFG folder with the same contents as the lowercase folder.
I tried doing it using linux but it was a little technical so I just created a copy on my desktop changed case and uploaded it to the right directory with filezilla.
VERY IMPORTANT
The console that you use to run your server will not keep the server running after you close it. This means that you would have to keep the console on indefinitely in order for people to play when your computer is off. To fix this use the nohup command in the console:
nohup command [arguments] &
nohup java -jar myserver.jar &
The & is important because it keeps the server running in the background. For example I did:
nohup java -Xmx800m -cp "bin:deps/poi.jar:deps/mysql.jar:deps/mina.jar:deps/slf4j.jar:deps/slf4j-nop.jar:deps/jython.jar:log4j-1.2.15.jar" server.Server &
You can substitute it with a jar file or whatever other way you choose to run the server. Make sure that you are running the command from the right directory.
That should get your server online and give you a client that connects to your server.