Has anybody been able to successfully selfhost a 2009scape server?
from humanoidchaos@lemmy.cif.su to selfhosted@lemmy.world on 27 Aug 23:53
https://lemmy.cif.su/post/3304697

#selfhosted

threaded - newest

AgaveInMyAss@lemmy.world on 28 Aug 00:39 next collapse

No but I definitely want to now that I know this exists

ryannathans@aussie.zone on 28 Aug 04:56 collapse

Would recommend playing on the live multiplayer server rather than self hosting

Zeoic@lemmy.world on 28 Aug 04:24 next collapse

The timing! I just finished 5 hours of playing on my self hosted server with a friend of mine lol On ubuntu, I just needed java installed, download the git repo, then ran the run sh file. That was it. In the client you edit the config file to swap the public server address with your server’s ip and when you launch next, it will connect to yours.

ryannathans@aussie.zone on 28 Aug 04:54 collapse

Pretty much this, make sure it’s Java 11 though

ryannathans@aussie.zone on 28 Aug 04:55 next collapse

What issues are you running into?

humanoidchaos@lemmy.cif.su on 28 Aug 19:36 collapse

I’m having a lot of issues, but I don’t really know what I’m doing either.

Right now, when I try to run it on my machine, I get this error saying that I can’t connect to google then asking if I’m offline. I haven’t had this error before when I tried getting it to work, but it’s where I am now.

Ultimately, I’d like to reach a point where I can host it on my own machine with a VPN and port forwarding so other people can connect from the outside.

ryannathans@aussie.zone on 28 Aug 22:34 collapse

That is a regular connection check we implemented to pause the server if the server goes offline. That’s likely a warning and not an error, and you can disable it in the worldprops for the server

humanoidchaos@lemmy.cif.su on 28 Aug 23:10 collapse

Thanks. It could be nothing, but I’m also thinking it might be an issue on my end from improperly changing configurations while trying to get self hosting to work.

I just don’t know enough so I’m going to keep fiddling with it. I’ll keep your advice in mind and not focus too much on the warning while figuring this out.

ryannathans@aussie.zone on 28 Aug 23:56 collapse

If you’re getting that message it’s running, try logging in with the client

humanoidchaos@lemmy.cif.su on 29 Aug 20:22 collapse

Thanks. I’m probably doing something wrong here.

When I try to connect while self-hosting, I get stuck at “Connecting to update server” when Runescape is loading in the client window.

In ~/.local/share/2009scape/config.json, I have:

{
  "ip_management": "[VPN INTERNAL IP]",
  "ip_address": "[VPN INTERNAL IP]",
  "world": 1,
  "server_port": [VPN FORWARDED PORT],
  "wl_port": 43595,
  "js5_port": 43595,
  "ui_scale": 1,
  "fps": 0
}

I’ve made sure the changes persist by either setting the file to read-only, or just avoiding changing the server setting at the game client launcher.

The only change I’ve made for the server was changing 2009scape-master/docker-compose.yml. I put the VPN port to the left side and left everything else the same.

version: '3.3'
services:
  app:
    build: .
    container_name: "2009scape_app"
    depends_on:
      - database
    restart: unless-stopped
    volumes:
      - "2009scape_app:/app"
    ports:
      - "[VPN FORWARDED PORT]:43595"

Sorry if I come across as a novice. I’m still learning and any help is always appreciated.

ryannathans@aussie.zone on 31 Aug 12:59 collapse

Update your repo and try the new docker files

Sickday@kbin.earth on 28 Aug 11:36 collapse

Sure. I wrote the docker-compose file in the repository. Unless something major has changed, it should be pretty straightforward to just clone the repo and then run

$ docker compose up
ryannathans@aussie.zone on 28 Aug 22:37 next collapse

IIRC there is a MR to improve it, I just haven’t had the time to finish testing and reviewing it

Cyanogenmon@lemmy.world on 29 Aug 02:30 collapse

If anybody uses this in prod from a git repo, might want to place your database creds in an .env file adjacent to your compose file then gitignore the .env.

Referenced like so:

.env contents

MYSQL_ROOT_PASSWORD=MyExamplePassword

MYSQL_ROOT_USER=MyExampleUser

docker-compose.yml contents:

MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}

MYSQL_ROOT_USER: ${MYSQL_ROOT_USER}

Don’t commit secrets to git!

Damn mobile formatting.