Hosting Battlebit on Linux is HIGHLY EXPERIMENTAL
- Copy
.env.exampletoconfigfolder and rename it to.env - Copy
server.conf.exampletoconfigfolder and rename it toserver.conf - Edit
.envandserver.confto 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 -dormaketo start the server - Run
docker compose down -vormake stop-serverto stop the server
- This docker image uses
steamuser (non-root), has ID:1000:1000. If you encounter permission issues fordatafolder, remove thedatafolder 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.confaccordingly
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.shRun 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- 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.jsondata/modules/...data/dependencies/...data/configurations/...
- Edit
ApiEndpoint=battlebit-runner:29999inserver.confto use custom API endpoint - Edit in
battlebit-runnerservice indocker-compose.ymlif you need to:- Expose/change port
- Change volume path
- Override
appsettings.jsonfile