This project provides a small, alpine based, docker container for the BeamMP game server and shows its usage in a docker-compose environment.
Because there were no well-documented, alpine based BeamMP docker images out there, I did one by myself. Building the BeamMP server is needed, because the prebuilt linux binary uses glibc as C standard library implementation (instead of musl).
There are two tags of this docker image available, that are built nightly:
- latest - Stable version of BeamMP
- unstable - Unstable version of BeamMP (reflecting the master branch)
The sections below provides use cases for docker and docker-compose.
Quick start:
docker run --name beammp-server \
-p 30814:30814/tcp -p 30814:30814/udp \
-e NAME='My first awesome Server' \
-e AUTH_KEY='<insert auth-key>' \
rouhim/beammp-server
First clone this repository and check docker-compose.yml
if interested. The configuration should be done within
the .env
file.
To get started copy .env.example
to .env
and create the mod folder.
cp .env.example .env && mkdir client-mods server-mods
Adjust the values in the .env
to your needs and run:
docker-compose pull && docker-compose up -d
Variable name | description | default value |
---|---|---|
AUTH_KEY | Mandatory! The authentication key used by the server. It is used to identify your server and is not optional. | |
DEBUG | Set to true to enable debug output in the console. | false |
PRIVATE | Set to true if you don't want to show up in the Server Browser. | true |
CARS | How many vehicles a player is allowed to have at the same time. | 1 |
MAX_PLAYER | How many players your server can hold at a time. | 10 |
MAP | What the server map is. | /levels/gridmap_v2/info.json |
NAME | What your server is called. This shows up in the Server Browser. | BeamMP New Server |
DESC | What shows under the name when you click on the server. | BeamMP Default Description |
PORT | This value must be identical to the containers exposed port. | 30814 |
A new AUTH_KEY can be claimed on this site, you will need a Discord account for this. Note that the IP entered there does not matter, despite what the site claims. For more information refer to this wiki page.
In the first place you should consider
reading the official mods guide.
Mods can be downloaded from the official BeamNG resources website. Just copy the
downloaded zip file into the client-mods
folder.
Copy the downloaded zip file into the client-mods
folder.
Then have to find out the custom map path name (e.g.: /levels/car_jump_arena/info.json
), to set it later as the map to
load. To do so:
- Execute the shell command below, or open the zip file manually.
- Copy the absolute path to the
info.json
location (/levels/{map-name}/info.json
). - Set in .env file:
MAP=/levels/{map-name}/info.json
. Example:MAP=/levels/car_jump_arena/info.json
A simple way to print the full map path including info.json (unzip, grep and awk is required):
unzip -l PATH/TO/MAP.zip \
| grep 'levels/.*/info.json' \
| awk '{split($0,a," "); print "/"a[4]}'
Server mods can be found in the BeamMP forum. Installation and configuration instructions are provided by each mod.
If you want to specify additional values for a mod in the ServerConfig.toml
file, just specify this environment
variable in your .env
file:
ADDITIONAL_SERVER_CONFIG_TOML = '
[SomeMod]
MyKey = "This is \'quoted\'"
[OtherMod]
enabled = true
some_numbers = [1, 2, 3]
'
Note that the single quotation marks are important at the beginning and end. If you want to use single quotes in the toml value they must be escaped with a backslash:
key = "this is a \'quote\'"
- BeamMP server repository: https://github.com/BeamMP/BeamMP-Server
- Official server maintenance guide: https://wiki.beammp.com/en/home/server-maintenance
- Official server installation guide: https://wiki.beammp.com/en/home/server-installation
- Inspired by: https://github.com/mastamic-ian/BeamMP_docker
- Built from: https://github.com/RouHim/beammp-docker
- Built to: https://hub.docker.com/r/rouhim/beammp-server