NOTE: The default settings are configured to run the servers on localhost (127.0.0.1)
- Create
.envfile containing the following variables. Seesample.envfor reference
# Server
MANGOS_PUBLIC_IP=... # (Optional) Mangosd IP address / server IP address.
# Defaults to 127.0.0.1
MANGOS_DOCKER_BIND_IP=... # (Optional) Docker container bind IP address for
# MaNGOS services. Defaults to 127.0.0.1
METRICS_DOCKER_BIND_IP=... # (Optional) Docker container bind IP address for
# metrics services. Defaults to 127.0.0.1
# Database
DATABASE_USER=... # Database user
DATABASE_PASS=... # Database password
DATABASE_AHBOT=... # (Optional) YES/NO, apply AHBOT db migrations
# when running the migration command.
# Defaults to NO
DATABASE_PLAYERBOTS=... # (Optional) YES/NO, apply PLAYERBOTS db migrations
# when running the migration command.
# Defaults to NO
# CMaNGOS
GIT_CMANGOS_REPO=... # This is the URL for the CMaNGOS repo
GIT_DB_REPO=... # This is the URL for the CMaNGOS database repo
GIT_DB_REPO_COMMIT=... # (Optional) The branch/commit to checkout for the
# CMaNGOS database repo. Defaults to master
GIT_CMANGOS_REPO_COMMIT=... # (Optional) The branch/commit to checkout for the
# CMaNGOS repo. Defaults to master
GIT_PLAYERBOTS_REPO_COMMIT=... # (Optional) The branch/commit to checkout for the
# playerbots repo. Defaults to master
# Metrics (Required only if running metrics services)
## InfluxDB
INFLUX_USER=... # InfluxDB username
INFLUX_PASS=... # InfluxDB password
INFLUX_TOKEN=... # InfluxDB token
## Grafana
GRAFANA_USER=... # Grafana username
GRAFANA_PASS=... # Grafana password
-
Build CMaNGOS
- Run
docker compose build cmangos
- Run
-
Install databases
- WARNING: Running this deletes the entire database and all contents. If you only want to update the current database see Database updates
- Run
docker compose run --rm database-migrations /root/run-migration.sh
-
(Optional) Extract files from the client - Reference
- NOTE: Do if you don't already have the necessary extracted files
- Create the
./data/extractor/clientdirectory - Move all contents of the retail client folder into the
./data/extractor/clientdirectory - Run
docker compose run --rm extractor /root/run-extractor.sh - Skip to
Step 6
-
(Optional) Add extracted files
- NOTE: Only if you have the necessary extracted files
- Create the
./data/extractor/resourcesdirectory - Copy the extracted folders to the
./data/extractor/resourcesdirectorydbcmapsvmaps- (Optional)
Cameras - (Optional)
mmaps - (Optional)
Buildings
-
(Optional) Set config
-
Start servers
- Run
docker compose up -d - Note: Starting the
mangosd-serverfor the first time may take some time to initialize as it's building the cache in the database
- Run
- Create
./cmangos.envfile - Add one config setting per line in the format
key=value- For
mangosd.conf,ahbot.conf, andaiplayerbot.confsettings, prepend withMangosd_and replace periods with underscores.- Setting
AhBot.PriceMultiplier = 0.5- Add
Mangosd_AhBot_PriceMultiplier=0.5
- Add
- Setting
- For
realmd.confsettings, prepend withRealmd_and replace periods with underscores.- Setting
WrongPass.MaxCount = 10- Add
Realmd_WrongPass_MaxCount=10
- Add
- Setting
- For
anticheat.confconfig, prepend withAnticheat_and replace periods with underscores.- Setting
IPBanDelay.Max = 120- Add
Anticheat_IPBanDelay_Max=120
- Add
- Setting
- For
- Changes will only apply after restarting containers
docker compose restart
- Run
docker compose run --rm database-migrations /root/db-migration.sh - Go through the menus to apply updates / settings
- Attach stdio to running
mangosd-servercontainerdocker compose attach mangosd-server
- Refer to link to create an account
- Exit prompt by doing Ctrl+p then Ctrl+q
- Note: Closing the terminal or pressing Ctrl+c will cause the running server to stop
- Update client realmlist
- Value should be the same as
MANGOS_PUBLIC_IPset in the.env 127.0.0.1or LAN IP address or public IP of the server- See link
- Value should be the same as
WARNING: If allowing public access to metrics services, you should configure and enable HTTPS
- Enable metrics by adding the following line to
./cmangos.envMangosd_Metric_Enable=1
- Create
grafanadata dirmkdir -p ./data/grafana
- Set owner of grafana dir
sudo chown 472:0 ./data/grafana
- Start metrics services
docker compose --profile metrics up -d