Minimal Docker image for Cfx.re FXServer — runs both FiveM and RedM from a single image, switchable via the GAME environment variable.
Built on Alpine Linux with tini as PID 1 init. Multi-stage build keeps the final image lean.
docker run -d \
--name fxserver \
-e LICENSE_KEY=cfxk_your_key_here \
-e GAME=fivem \
-p 30120:30120/tcp \
-p 30120:30120/udp \
-v fivem-config:/config \
ghcr.io/azdolinski/fivem:latestOr with Docker Compose:
cp .env.example .env
# edit .env — set your LICENSE_KEY
docker compose up -dImages are published to ghcr.io/azdolinski/fivem with three types of tags:
| Tag | Example | Description |
|---|---|---|
| Full build | 28108-2f3d20c4168282a17737970708ccc1524951483a |
Exact FXServer artifact version |
| Build number | 28108 |
Short tag pointing to the same image |
latest |
latest |
Most recent FiveM build available |
Check all available tags on the GitHub Packages page.
| Variable | Default | Description |
|---|---|---|
GAME |
fivem |
Game to run: fivem or redm |
LICENSE_KEY |
(required) | Server license key from portal.cfx.re |
SV_HOSTNAME |
My FXServer |
Server display name |
SV_MAXCLIENTS |
32 |
Max connected players |
SV_ENFORCE_GAME_BUILD |
FiveM: 3407 / RedM: 1491 |
Force a specific client game build |
SV_ENDPOINT_PORT |
30120 |
Game port (TCP + UDP) |
TXADMIN_PORT |
40120 |
txAdmin web interface port |
RCON_PASSWORD |
(auto-generated) | RCON password (random on first run if not set) |
NO_LICENSE_KEY |
Set to skip license key injection from env (use it in server.cfg instead) | |
NO_DEFAULT_CONFIG |
Set to 1 to skip auto-generated server.cfg (for txAdmin setups) |
|
EXTRA_ARGS |
Additional FXServer command-line arguments |
| Path | Description |
|---|---|
/config |
Server configuration, resources, and server.cfg |
/txData |
txAdmin persistent data (only needed with NO_DEFAULT_CONFIG=1) |
| Port | Protocol | Description |
|---|---|---|
30120 |
TCP + UDP | Game traffic |
40120 |
TCP | txAdmin web interface (only active with txAdmin enabled) |
To use txAdmin instead of the default server.cfg:
docker run -d \
--name fxserver \
-e LICENSE_KEY=cfxk_your_key_here \
-e NO_DEFAULT_CONFIG=1 \
-p 30120:30120/tcp \
-p 30120:30120/udp \
-p 40120:40120/tcp \
-v fivem-config:/config \
-v fivem-txdata:/txData \
ghcr.io/azdolinski/fivem:latestThen open http://localhost:40120 to complete txAdmin setup.
Two GitHub Actions workflows handle automated image building:
- Check (
check.yml) — Runs daily at 06:17 UTC. Fetches available FiveM builds from Cfx.re, then triggers image builds for both recommended and latest versions. - Build (
build.yml) — Reusable workflow that builds and pushes the Docker image to GHCR. Skips if the image already exists (unlessforce: true). Also available asworkflow_dispatchfor manual builds.
You can trigger a manual build from the Actions tab in GitHub:
- Select Build Docker Image workflow
- Click Run workflow
- Enter the build string (e.g.
28108-2f3d20c4168282a17737970708ccc1524951483a) - Toggle Also tag as latest and Force rebuild as needed
docker build \
--build-arg FXSERVER_VER=28108-2f3d20c4168282a17737970708ccc1524951483a \
-t fivem:local .This repository only contains Docker/build configuration. FXServer itself is governed by Cfx.re's terms of service.