My 3 Scripts to Keep CMaNGOS World & Auth Running (Auto-Restart on Crash)

Actinic Lux

Trial Member
10
2025
0
Hey everyone,

I've been messing with cmangos tbc for a while now, running it on a ubuntu headless server. in the beginning, i struggled to keep the world server online 24/7 it would crash randomly and if i was not around to restart it manually, it stayed offline.

after about 2-3 weeks of trial, error, and scripting(with a lot of help from ChatGPT), i finally put togethor a set of three scripts that handle both the auth and world servers. if either one crashes, the scripts automatically restart them. my server has now been online for a little over 2 weeks straight without a single issue.

How the scripts work:

after every reboot, i run the main script once "start-wow.sh"

it boots both realmd and mangosd and keeps them alive if either crashes it restarts it automatically.

I havent hooked it directly into the boot process yet, but this setup has been rock solid for me.
since these forums do not allow .sh file extension uploads, i zipped them first:


The locations of the scripts themselves on my current setup:
start-wow.sh is located in "/cmangos/run/start-wow.sh"

run-realmd and run-mangosd are both located in the same folder which is "/cmangos/run/bin/" in this folder the realmd and mangosd bianaries are also located.

how to use the scripts:

upload the scripts,
make them executable by running(if on linux)


chmod +x start-wow.sh
chmod +x run-mangosd.sh
chmod +x run-realmd.sh

after every reboot, i start the server with:
cd /cmangos/run
./start-wow.sh

from then on, auth / world will stay up, and if one crashes, the script restarts it.

Future improvements to these scripts will include

  • rc.local → quick and simple: run start-wow.sh once after boot.
  • systemd units → more “official” services with systemctl.
  • watchdog timer/cron → extra safety net to re-check and restart if needed.

    if anyone needs any help please feel free too ask here and i will help you in the best way that i can.
 

Attachments

  • Scripts too keep server running.zip
    1.7 KB · Views: 7
Last edited:
Top