This is an automation script for educational purposes. Please respect all copyright laws.
This bash script automates what can be a complicated install in 12 minutes or so.
- None of the ragnarok online files are hosted by this github and I cannot provide them.
- The ragnarok web client was not created by me. It can be found at https://github.com/MrAntares/roBrowserLegacy
- Their discord is https://discord.gg/8JdHwM4Kqm
(recommended) Fresh Ubuntu 22.04 VM, open root, and type in command:
git clone https://github.com/danomation/ragnarok_script.git && bash ragnarok_script/ragnarok.sh
- Wait for server to install 15-20mins.
- Allow incoming ports TCP 80, 5999 if you have a firewall
- then navigate to http:// youriphere/
Or - Using cloud-init script:
- Use puttygen to create a private and public key.
- Then copy the public OpenSSH key to the below ssh_authorized_keys list.
- Save your private key, and load it in putty so you can connect.
#cloud-config
users:
- name: ragnarok
groups: users, admin
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
ssh_authorized_keys:
- <your OpenSSL key(s) here>
runcmd:
- git clone 'https://github.com/danomation/Automation-Ragnarok-Script.git' && bash Automation-Ragnarok-Script/ragnarok.sh
- reboot
Or - WSL2 (cursed):
Note: it requires WSL2 (for systemd). see https://askubuntu.com/questions/1379425/system-has-not-been-booted-with-systemd-as-init-system-pid-1-cant-operate
- run the following with elevated command prompt
wsl --install
wsl --update
wsl --shutdown
wsl --terminate Ubuntu
wsl --unregister Ubuntu
wsl --install -d Ubuntu
(Ubuntu starts)
(set username and pass)
sudo passwd
(set password)
su root
(enter password)
git clone 'https://github.com/danomation/Automation-Ragnarok-Script.git' && bash Automation-Ragnarok-Script/ragnarok.sh
(wait until finished)
- Open ports 80, 5999 on your router and hyper-v or whatever network switch for WSL
Note1: If you have a CGNAT (as with fiber companies) buy an ipv4, install it on your router, then forward the ports 80, 5999
Note2: if you just want to run local and dont want to run with anyone else - then edit /var/www/html/index.html to use localhost for the websocket line ws://. - http://yourwanip or http://localhost
- First sign-on you can't make characters or login.
Solution: shift+F5 to refresh the client and try again - After changing remote client config the client doesn't load as intended.
Solution: close all tabs for the server in your browser, delete all cookies and site data, close browser, start browser back up and try. - Enabling 443 on webserver causes client not to load
Solution: see diagrams below and follow instructions to enable 443
out of the box diagram:
Known issue attempting 443 encryption:
Potential solution:
steps for solution:
- install certbot, grab the cert, configure your /etc/nginx/sites-enabled/default and add a reverse proxy for location /roBrowserLegacy/client to proxy_pass http://grf.robrowser.com.
- you must use your https cert for wss://. The wsproxy is set in the crontab you will need to use switches -s -c and -k. -c is your fullchain and -k is your privkey
- edit your index.html, add a remoteClient field within your key values pointing to your webserver path for https://yourserver/roBrowserLegacy/client/.
- also in your index.html change ws:// to wss://
- close all tabs for the server in your browser, delete all cookies and site data, close browser, start browser back up and try.
- if done correctly it should load the port 80 traffic for http://grf.robrowser.com as https://yourserver/roBrowserLegacy/client instead.
donate for automation/scripting updates! https://www.patreon.com/Wintermute310