Skip to content

jackblk/battlebit-server-docker

Repository files navigation

BattleBit Server Docker

Caution

Hosting Battlebit on Linux is HIGHLY EXPERIMENTAL ⚠️

How to run

  • Copy .env.example to config folder and rename it to .env
  • Copy server.conf.example to config folder and rename it to server.conf
  • Edit .env and server.conf to your liking
  • (Optional) Login with 2FA, see below
  • (Optional) If you use custom API from BattleBitAPIRunner, see below
  • IMPORTANT Create data folders with the right permission: mkdir -p data/Steam data/battlebit && chown 1000:1000 -R data
  • Run docker compose up -d or make to start the server
  • Run docker compose down -v or make stop-server to stop the server

Notes

  • This docker image uses steam user (non-root), has ID: 1000:1000. If you encounter permission issues for data folder, remove the data folder and re-create it with the right permisison.
  • Server should have 2 ports open:
    • Game port (default: 30000/udp)
    • Query port = Game port + 1 (default: 30001/udp)
  • If your server is behind NAT, you need to forward these ports to your server
  • If you want to use a custom API endpoint, edit in server.conf accordingly

(Optional) Login with 2FA

You only need to do this at the first time, and only when the login session is expired.

docker run --rm -it \
  --name battlebit-docker \
  -v $(pwd)/data/battlebit:/home/steam/battlebit \
  -v $(pwd)/data/Steam:/home/steam/Steam \
  --env-file ./config/.env \
  ghcr.io/jackblk/battlebit-server-docker bash login.sh

Accept EULA

Run this while the container is running: make accept-eula

Or:

docker exec -it battlebit-server-docker sed -i 's/false/true/g' /home/steam/battlebit/eula.txt

BattleBitAPIRunner

  • Create data folder for BattleBitAPIRunner:
mkdir -p config/runner/data/modules config/runner/data/dependencies config/runner/data/configurations
cp appsettings.json.example config/runner/appsettings.json
chown 1000:1000 -R config/runner
  • Refer Hosting Guide to create folders & files accordingly:
    • appsettings.json
    • data/modules/...
    • data/dependencies/...
    • data/configurations/...
  • Edit ApiEndpoint=battlebit-runner:29999 in server.conf to use custom API endpoint
  • Edit in battlebit-runner service in docker-compose.yml if you need to:
    • Expose/change port
    • Change volume path
    • Override appsettings.json file

Credits

About

Battlebit Dedicated Server in Docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages