Run a FiveM server with Docker
masterTo run a basic FiveM server, use the spritsail/fivem image. You must provide a valid FiveM license key via the LICENSE_KEY environment variable.
Important: You must use the -ti (interactive and pseudo-tty) flags, otherwise the container will crash on startup.
Upon the first run, the container generates configuration files in the host directory mounted to /config. You should stop the container after the first run to modify the server.cfg to your requirements before starting it again.
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