fivem-docker — a flexible Docker image for FiveM servers
A lightweight, reusable Docker image for running any FiveM server. Nothing is baked in — you pick the version and point it at your content at runtime.
What it does
-
Pick your artifact version at runtime — set
FXSERVER_VERSIONto a build number, a pinnedNUM-HASH, or a channel (recommended/latest/critical/optional). Downloaded + cached on boot; switch versions with a restart. -
Your resources & configs, anywhere — bind-mount them from the host, or have the container pull them from a git repo on boot (monorepo or split resources/cfg repos).
-
Two launch modes — txAdmin (web panel, default) or direct (
TXADMIN=0, no panel, fxserver runs yourserver.cfgstraight). -
Git auto-update toggle —
GIT_AUTOPULL=1keeps prod synced to a branch each boot;0for devs so their local work is never touched. -
External database friendly — connect to MySQL running on the host (
host.docker.internal). -
Simple config — everything via env vars / a
.envfile. Secrets too. -
Sane defaults — runs as a non-root user, healthcheck built in, persistent
/datavolume for cache + txAdmin state.
Quick start
docker run -d \
-p 30120:30120/tcp -p 30120:30120/udp -p 47291:47291/tcp \
-e FXSERVER_VERSION=recommended \
-e LICENSE_KEY=■■■■■■■■■■
-v /path/to/resources:/data/txData/server/resources \
-v /path/to/server.cfg:/data/txData/server/server.cfg \
-v fivem-data:/data \
fivem-docker
Or use the included docker-compose files (dev + prod).
Github Repo: Click here!
License: MIT
If you don’t have experience with docker this probably isn’t for you. I do NOT plan on providing any support with getting this setup since the readme provided covers everything. If there are any bugs then please let me know either on here or via a github issue and I will do my best to push a fix ASAP. It does currently work and I’m using it during the development of my framework. ![]()