spritsail / fivem

FiveM GTA modded multiplayer server
https://github.com/citizenfx/fivem
113 stars 142 forks source link

spritsail/fivem

Latest Version Image Size Docker Pulls Docker Stars Build Status

This docker image allows you to run a server for FiveM, a modded GTA multiplayer program. Upon first run, the configuration is generated in the host mount for the /config directory. The container should be stopped so fivem can be configured to the user requirements in the server.cfg.

License Key

A freely obtained license key is required to use this server, which should be declared as $LICENSE_KEY. A tutorial on how to obtain a license key can be found here.

Usage

Use the docker-compose script provided if you wish to run a couchdb server with FiveM, else use the line below:

docker run -d \
  --name FiveM \
  --restart=on-failure \
  -e LICENSE_KEY=<your-license-here> \
  -p 30120:30120 \
  -p 30120:30120/udp \
  -v /volumes/fivem:/config \
  -ti \
  spritsail/fivem

It is important that you use interactive and pseudo-tty options otherwise the container will crash on startup See issue #3

Image tags

This image has two tags - a latest tag (the default), based on the most recent FiveM build, and a stable tag, based on the "optional" FiveM release. We do not provide an image based on the recommended FiveM release as it is typically too stale.

Web UI (txAdmin)

The web UI can be enabled by not passing any +exec config to the FXServer binary. This can be achieved by setting the NO_DEFAULT_CONFIG environment variable (see below).

txAdmin stores it's configuration and database data in /txData, so a volume can be set up to persist this data:

docker run -d \
  --name FiveM \
  --restart=on-failure \
  -e LICENSE_KEY=<your-license-here> \
  -p 30120:30120 \
  -p 30120:30120/udp \
  -p 40120:40120 \ # Allow txAdmin's webserver port to be accessible
  -v /volumes/fivem:/config \
  -v /volumes/txData:/txData \ # Can use a named volume as well -v txData:/txData \
  -ti \
  spritsail/fivem

Environment Variables