Skip to content

๐Ÿ”Œ๐Ÿณ Battlenet server on Docker using Pvpgn Pro with Ghost++ and OpenStats included.

Notifications You must be signed in to change notification settings

acollazo25/pvpgn-ghost-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

28 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ•ถ PVPGN PRO โž• GHOST++ โž• WEB STATS

Status GitHub Issues GitHub Pull Requests

Deployment (WINDOWS / LINUX / MAC)

โ„น๏ธ NOTE: The Ghost configuration is designed to work with the Warcraft 1.26x client, but you can adjust it to work with 1.28x or higher. The default map is dota-6.83d-en.w3x, but any other is possible.

๐Ÿ›  Requirements

  1. Docker
  2. Docker Compose

โฌ‡๏ธ Clone repo (*)

git clone https://github.com/acollazo25/pvpgn-ghost-docker.git
cd pvpgn-ghost-docker

๐Ÿ“ฆ Export pvpgn data (LINUX / MAC)

mkdir "pvpgn"
docker run --rm -v $PWD/pvpgn/var:/tmp/var ender25/pvpgn-server:bnetd-d2cs-d2dbs-mysql cp -r /usr/local/var/pvpgn /tmp/var
docker run --rm -v $PWD/pvpgn/etc:/tmp/etc ender25/pvpgn-server:bnetd-d2cs-d2dbs-mysql cp -r /usr/local/etc/pvpgn /tmp/etc

๐Ÿ“ฆ Export pvpgn data (WINDOWS)

mkdir "pvpgn"
docker run --rm -v %CD%/pvpgn/var:/tmp/var ender25/pvpgn-server:bnetd-d2cs-d2dbs-mysql cp -r /usr/local/var/pvpgn /tmp/var
docker run --rm -v %CD%/pvpgn/etc:/tmp/etc ender25/pvpgn-server:bnetd-d2cs-d2dbs-mysql cp -r /usr/local/etc/pvpgn /tmp/etc

โš™ Copy default config (*)

  1. Copy pvpgn/.env.example to pvpgn/.env. Configure the pvpgn/.env for the ssl termination of the statistics website, otherwise you can ignore it and continue with the next step.

Even if SSL termination is not configured the pvpgn/.env file must exist in the root of the directory.

cp pvpgn/.env.example pvpgn/.env
  1. Copy ghostpp/.env.example to ghostpp/.env. Configure the ghostpp/.env for the ssl termination of the statistics website, otherwise you can ignore it and continue with the next step.

Even if SSL termination is not configured the ghostpp/.env file must exist in the root of the directory.

cp ghostpp/.env.example ghostpp/.env

โš  If SSL termination is not configured you must create a default proxy network.

docker network create proxy

๐Ÿšš Setup Pvpgn Database (*)

  1. Edit the file pvpgn/etc/pvpgn/bnetd.conf and set the following settings.
storage_path = "sql:mode=mysql;host=pvpgn-db;name=bnetd;user=bnetd;pass=secret;default=0;prefix=pvpgn_"
  1. Up pvpgn database.
docker-compose up -d pvpgn-db

๐Ÿš› Create Ghost Database Schemas and run seeders (*)

  1. Seed database.
docker-compose up -d ghostpp-db
docker exec -i ghostpp_databse mysql -ughost -psecret ghost < ghostpp/db-schema.sql
docker exec -i ghostpp_databse mysql -ughost -psecret ghost < ghostpp/db-populate.sql

๐Ÿšฉ Start pvpgn, d2cs, d2dbs and ghostpp services (*)

docker-compose up -d pvpgn d2cs d2dbs ghostpp

๐Ÿ”€ Configure address translation for docker network (*)

  1. Get the IP assigned to your ghostpp service.
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ghostpp_server
'192.168.224.3'
  • 92.168.128.3: ghostpp-service-ip
  1. In the first line of the pvpgn/etc/pvpgn/address_translation.conf file add the following.
<ghostpp-service-ip>:6320 <your-public-ip>:6320 NONE ANY
########################################################################################################
#------------------------------------------------------------------------------------------------------#
# Address Translation table                                                                            #
#----------------------------------------------------------------------------
#
  1. Restart pvpgn service docker-compose restart pvpgn

๐Ÿค– Bot Account creation (*)

  1. Add the gateway to your battlenet servers <your-public-ip>.
  2. Open your Warcraft client, go to battlenet and create a bot account, example user bot password secret.
  3. Login and put any email.

โš™๏ธ Ghost Configuration (*)

  1. Copy the ghostpp/config/default.cfg to ghostpp/config/ghost.cfg.
cp ghostpp/config/default.cfg ghostpp/config/ghost.cfg
  1. Edit the file ghostpp/config/ghost.cfg and set the following settings. This is enough to start.
bnet_username = bot
bnet_password = secret
  1. Restart ghost service docker-compose restart ghostpp

๐ŸŽฎ Invite friends and play (*)

  1. You and your friends can now add this battlenet server, create an account, and join the self-created game.

๐Ÿ‘ฎโ€โ™‚๏ธ Adding root admins

  1. Edit the file ghostpp/config/ghost.cfg and set the following settings.
bnet_rootadmin = yourAccount friendAccount otherFriend
  1. Restart ghost service docker-compose restart ghostpp

๐Ÿ•น Commands (*)

  1. To see the list of available commands visit Ghost++ Commands

๐Ÿ“Š [Optional] Setup Pvpgn Stats (*)

  1. Copy pvpgn-stats/config.inc.example.php to pvpgn-stats/config.inc.php.
cp pvpgn-stats/config.inc.example.php pvpgn-stats/config.inc.php
server_URL = http://<your-public-ip>:8081/
  1. Edit pvpgn-stats/config.inc.php and set the following settings.

SSL Configured

$homepage = "https://stats-domain.com/"; $ladderroot = "https://stats-domain.com/"; # include last / ...

3. Up pvpgn stats.
```shell
docker-compose up -d pvpgn-stats
  1. Run Seeders.
docker exec -i pvpgn_databse mysql -ubnetd -psecret bnetd < pvpgn-stats/migrations/d2ladder.sql
docker exec -i pvpgn_databse mysql -ubnetd -psecret bnetd < pvpgn-stats/migrations/stats.sql
  1. Open in browser [Pvpgn Stats](๐ŸŒ http://127.0.0.1:9082/)

๐Ÿ“Š [Optional] Setup Dota OpenStats (*)

  1. Up service.
docker-compose up -d dota-stats
  1. Set stats page. Edit the file pvpgn/etc/pvpgn/anongame_infos.conf and set the following settings.
server_URL = http://<your-public-ip>:9081/

or

# SSL Configured
server_URL = https://dota-stats-domain.com
  1. Restart pvpgn server
docker-compose restart pvpgn
  1. Open in browser [Pvpgn Stats](๐ŸŒ http://127.0.0.1:9081/)

๐Ÿ“„ View Logs (*)

Pvpgn Logs

docker-compose logs -f --tail 200 pvpgn

Ghost++ Logs

docker-compose logs -f --tail 200 ghostpp

โœ‰๏ธ Contact

Creating an issue

๐ŸŽ‰ Acknowledgements