Hosting Battlebit on Linux is HIGHLY EXPERIMENTAL
- Copy
.env.example
toconfig
folder and rename it to.env
- Copy
server.conf.example
toconfig
folder and rename it toserver.conf
- Edit
.env
andserver.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
ormake
to start the server - Run
docker compose down -v
ormake stop-server
to stop the server
- This docker image uses
steam
user (non-root), has ID:1000:1000
. If you encounter permission issues fordata
folder, remove thedata
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
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
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
- 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
inserver.conf
to use custom API endpoint - Edit in
battlebit-runner
service indocker-compose.yml
if you need to:- Expose/change port
- Change volume path
- Override
appsettings.json
file