How to Update FXServer Artifacts
Update FXServer and txAdmin on your FiveM Linux server: version check, backup, installing a recommended or specific build, verification and rollback.
On this page
Artifacts are the FiveM server files published by Cfx.re: FXServer and the version of txAdmin it bundles. This guide explains how to update them cleanly, keeping the previous version so that you can roll back in a few commands.
Prerequisites
- A server installed with the guide Create a FiveM Server, including the
/home/fivem/update-fxserver.shscript and the/usr/local/sbin/backup-fivem.shbackup script - SSH access with
sudo - A moment without players: the server is stopped during the operation
This guide covers FiveM for GTA V Legacy, like the installation guide. FiveM for GTA V Enhanced uses a different server archive.
When to Update
Cfx.re publishes two main channels:
| Channel | Usage |
|---|---|
recommended |
Version advised for a production server |
latest |
Most recent version, useful to test a new feature or a fix |
According to Cfx.re's support policy, a recommended version is supported until six weeks after the next one, and a latest version until two weeks after the next one. An old version keeps working, but it is no longer supported. Unsupported versions older than three months can no longer be joined from the server list.
Step 1: Note the Versions
With the server running, display the installed version:
curl -fsS http://127.0.0.1:30120/info.json | grep -oE '"server":"[^"]*"'
sudo grep -E "^version" /home/fivem/server/alpine/opt/cfx-server/citizen/system_resources/monitor/fxmanifest.luaThe first line displays for example FXServer-master v1.0.0.12345 linux: the build number is the last number, here 12345. The second gives the txAdmin version. Note these two values.
Compare with the published versions:
curl -fsSL https://changelogs-live.fivem.net/api/changelog/versions/linux/server | grep -oE '"(recommended|latest)":"[0-9]+"'If your build is equal to recommended, no update is needed.
Step 2: Back Up
Check the disk space, then run the backup:
df -h /home
sudo du -sh /home/fivem/server
sudo /usr/local/sbin/backup-fivem.sh
sudo ls -lh /home/fivem/backupsYou need room for a second copy of /home/fivem/server. Note the date of the latest fivem_DATE.tar.gz archive.
Step 3: Install the Recommended Version
Stop the server, keep a copy of the current version, then run the installation script:
sudo systemctl stop fivem.service
sudo -u fivem rm -rf /home/fivem/server.previous
sudo -u fivem cp -a /home/fivem/server /home/fivem/server.previous
sudo -iu fivem /home/fivem/update-fxserver.sh
sudo systemctl start fivem.serviceThe script only replaces /home/fivem/server. Your resources, server.cfg and the txAdmin accounts stay in /home/fivem/txData.
Installing a Specific Build
This method is for testing latest or choosing a given build. Create a second script:
sudo -iu fivem
nano ~/install-fxserver-build.sh#!/bin/bash
set -euo pipefail
URL="${1:?Pass the fx.tar.xz link as an argument}"
case "$URL" in
https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/*/fx.tar.xz) ;;
*) echo "URL rejected: official Linux archive expected" >&2; exit 1 ;;
esac
TMP=$(mktemp -d "$HOME/fxserver.XXXXXX")
trap 'rm -rf "$TMP"' EXIT
curl -fL -o "$TMP/fx.tar.xz" "$URL"
tar -xJf "$TMP/fx.tar.xz" -C "$TMP"
rm -f "$TMP/fx.tar.xz"
[ -x "$TMP/run.sh" ] && [ -d "$TMP/alpine" ] || { echo "Incomplete archive" >&2; exit 1; }
rm -rf "$HOME/server"
mkdir -p "$HOME/server"
mv "$TMP"/* "$HOME/server/"
echo "Installed version: $URL"chmod +x ~/install-fxserver-build.sh
exitThen get the address you want. For latest:
curl -fsSL https://changelogs-live.fivem.net/api/changelog/versions/linux/server | grep -oE '"latest_download":"[^"]*"' | cut -d'"' -f4For another build, copy the address of its fx.tar.xz file from the official list of Linux builds. After the step 2 backup, install it, replacing FX_TAR_XZ_URL:
sudo systemctl stop fivem.service
sudo -u fivem rm -rf /home/fivem/server.previous
sudo -u fivem cp -a /home/fivem/server /home/fivem/server.previous
sudo -iu fivem /home/fivem/install-fxserver-build.sh 'FX_TAR_XZ_URL'
sudo systemctl start fivem.serviceStep 4: Verify the Server
Wait about a minute, then check the service, the ports and the new version:
sudo systemctl is-active fivem.service
sudo ss -tulpn | grep -E ':(30120|40120)\b'
curl -fsS http://127.0.0.1:30120/info.json | grep -oE '"server":"[^"]*"'The service must answer active, both ports must be listening and the build number must have changed. Then look for startup errors:
sudo grep -a -E "Could not (find|start) dependency|Couldn't (find|start) resource|can't run|Failed to load script|SCRIPT ERROR" /home/fivem/fxserver.logThis command must not return anything new compared to usual. If you use a database, also check the connection:
sudo grep -a 'Database server connection established' /home/fivem/fxserver.logFinally, connect to the game and test the main functions: character login, inventory, vehicle, administration commands.
Keep /home/fivem/server.previous for a few days. Once everything is stable, free up the space:
sudo -u fivem rm -rf /home/fivem/server.previousRolling Back to the Previous Version
Put the kept folder back in place:
sudo systemctl stop fivem.service
sudo -u fivem rm -rf /home/fivem/server.failed
sudo -u fivem mv /home/fivem/server /home/fivem/server.failed
sudo -u fivem mv /home/fivem/server.previous /home/fivem/server
sudo systemctl start fivem.serviceCheck the version with the step 1 command, then look at the console:
sudo tail -n 50 /home/fivem/fxserver.logIf txAdmin refuses to start after the rollback
A recent version of txAdmin may have converted its players database. The old version then stops with this message:
Your players database is on v5, and this txAdmin supports up to v4.Restore txData from the step 2 archive, replacing DATE:
sudo systemctl stop fivem.service
sudo mv /home/fivem/txData /home/fivem/txData.failed
sudo -u fivem tar -xzf /home/fivem/backups/fivem_DATE.tar.gz -C /home/fivem
sudo systemctl start fivem.serviceActions performed in txAdmin since this backup, such as bans, are lost. There is no need to restore MariaDB: the FXServer update does not modify your database. Delete /home/fivem/txData.failed once the server is verified.
Troubleshooting
Download URL not found
The script did not get a usable response from Cfx.re. Test the access:
curl -fsSI https://changelogs-live.fivem.net/api/changelog/versions/linux/serverIf the command fails, check the server's outgoing connection and DNS, then try again later.
curl: (22) The requested URL returned error: 404
The archive address is incomplete or wrong. Copy it again in full, with the build number, its identifier and fx.tar.xz.
tar (child): xz: Cannot exec: No such file or directory
The package that decompresses the archive is missing:
sudo apt install -y xz-utilsNo space left on device
The disk is full. Find what takes up the space with sudo bash -c 'du -sh /home/fivem/*', then delete the old server.failed and txData.failed folders or move archives off the server. Also delete any temporary /home/fivem/fxserver.* folder left by an interruption.
The service is active but the ports are not listening
Check the console and verify the permissions:
sudo tail -n 100 /home/fivem/fxserver.log
sudo ls -l /home/fivem/server/run.sh
sudo chown -R fivem:fivem /home/fivem/serverResource can't run after the update
The message Resource 'name' can't run: followed by server needs to be 12345 or higher indicates that the resource requires a more recent build. Install that build or an older version of the resource. If a resource worked before and fails in another way, follow Diagnose Crashes and Lag on a FiveM Server, or roll back to the previous version while you fix it.
End-of-support or end-of-life warning
The message appears to players and to the administrator when the artifacts are too old. A gray warning (end-of-support) leaves the server accessible. A red warning (end-of-life) may prevent connection: update the server.