Run txAdmin with Docker Compose
Plan a Docker or Compose deployment with separate panel/game ports, persistent txData and safe startup settings.
txAdmin ships inside FXServer. There is no official txAdmin-only Docker image that this guide can certify. Start from a reviewed FXServer container image or a Dockerfile you maintain with the correct Cfx artifact and runtime dependencies. Do not paste untrusted container images or example secrets into production.
Keep three things separate
- Artifact and process: the container must launch FXServer in txAdmin mode (not directly with
+exec server.cfg). - Persistent storage:
txData, deployedserver.cfg/ resources and any external SQL database must survive container replacement. - Networking: the txAdmin panel uses TCP, while the game server commonly needs both TCP and UDP on a separate port.
Compose pattern
The following is a configuration pattern, not a runnable certified FXServer image. Replace image name and container paths only after checking the entrypoint and volume layout of your chosen image.
services:
fxserver:
image: your-reviewed-fxserver-image:pin-a-version
restart: unless-stopped
environment:
TXHOST_TXA_PORT: "40120"
TXHOST_INTERFACE: "0.0.0.0"
TXHOST_DATA_PATH: "/server/txData"
TXHOST_FXS_PORT: "30120"
ports:
- "127.0.0.1:40120:40120/tcp"
- "30120:30120/tcp"
- "30120:30120/udp"
volumes:
- ./txData:/server/txData
- ./server-data:/server/server-dataImportant: A host-side 127.0.0.1 mapping restricts direct panel access on that host; it does not imply any restriction on the game ports. A container's TXHOST_INTERFACE=127.0.0.1 would instead prevent a host-to-container connection in many Docker bridge setups. The /server/server-data mount must match the image's actual deployment directory.
Bring it up safely
- Ensure the reviewed image really contains compatible FXServer artifacts and that its entrypoint launches txAdmin.
- Create storage directories owned by the container runtime user; check SELinux bind mounts on applicable hosts.
- Start the container and inspect its logs for the txAdmin setup PIN and actual listening ports.
- Use a private path or authenticated reverse proxy to access the panel. Keep the game ports reachable independently.
- Complete first setup, run a recipe in the mounted server-data location, then connect a real test client.
- Recreate the container once and confirm panel accounts, deployed files and player data persisted.
Failure cases
- Only the container starts: inspect logs; game process may still need starting from txAdmin.
- Can't reach the panel: confirm published host mapping, firewall, and container listener.
- Missing files on restart: the volume mount might not match the image's actual txData or server directory.
- Database localhost failure: inside a container,
localhostgenerally refers to the container itself, not a separate DB service.
See Environment & ports, backups, and Cloudflare Access for panel protection.
Sources: txAdmin environment reference, Docker port publishing.