How to update FiveM artifacts without losing data: safe step-by-step guide
Learn how to update FiveM artifacts without losing server data, MySQL database, or configuration. Complete procedure with backup, swap, and rollback.
Keeping FiveM artifacts up to date is part of the basic operation of any serious server — old builds pile up vulnerabilities, lose compatibility with modern scripts, and degrade performance during long sessions. The problem is that many owners treat the update like “I downloaded the new zip, overwrote everything, things broke” — and wake up with a corrupted MySQL database, missing resources, or txAdmin asking for setup from scratch.
This tutorial is for FiveM server owners (Windows or Linux) who need to upgrade the artifacts version while keeping the database, configuration, MySQL connections, txAdmin token, and resources folder intact. The procedure works both for migrating between recommended versions and for moving from a legacy build to a current one.
Estimated time: 15-20 minutes for a careful first run, 5-7 minutes once you’ve done it a few times.
Prerequisites
Before starting, confirm you have enough access and information to roll back if something goes wrong.
SSH access (Linux) or RDP (Windows) to the server with admin permission. Free disk space equivalent to twice the current artifacts folder size (for the backup). Knowledge of the currently installed version and the target version. Maintenance window of at least 10 minutes with players warned.
Identify where your current install lives. On Linux, the default is /home/fivem/server/ or /opt/fivem/. On Windows, it’s usually at C:\FXServer\ or inside the user folder. The typical structure is:
server/ or FXServer/ resources/ (OUTSIDE the artifacts) server.cfg txData/ external (port 3306) The golden rule: the resources/ folder and server.cfg stay SEPARATE from the artifact binaries. If your install has everything mixed inside the same folder, this tutorial still works, but the backup needs more care — you’ll overwrite only the binaries, not the whole folder.
Identify the current version and the target version
Before downloading anything, confirm what you have today. This makes rollback easier if something breaks.
On Linux, enter the artifacts folder and check the build number:
cd /home/fivem/server
ls -la
cat citizen/release.txt 2>/dev/null || head -1 components/citizen-server-impl/CMakeLists.txtThe version appears as a 4-digit number (e.g., 12559). If release.txt doesn’t exist, look for the number in the name of the folder where you originally extracted.
On Windows, open PowerShell in the artifacts folder and run:
Get-ChildItem -Name | Select-Object -First 5
Get-Content citizen\release.txt -ErrorAction SilentlyContinueWrite down the current build somewhere — you’ll need it for rollback if necessary.
Open https://runtime.fivem.net/artifacts/fivem/ and identify the current recommended build. The page lists builds in reverse chronological order; the recommended one is marked explicitly. Note the target build number.
Back up before any change
Backup is non-negotiable. Even on an update that looks trivial, it’s your insurance against human error and build regression. Full backup = artifacts + resources + server.cfg + txData + MySQL dump.
Stop the server. In txAdmin, click “Stop Server” and wait for the process to finish. From the terminal, locate and kill the process:
ps aux | grep FXServer
sudo systemctl stop fivem 2>/dev/null || pkill -f FXServerOn Windows, close the FXServer.exe window or stop the txAdmin service through the Services panel.
Back up the artifacts folder. On Linux:
cd /home/fivem
tar -czf backup-artifacts-$(date +%Y%m%d-%H%M).tar.gz server/
ls -lh backup-artifacts-*.tar.gzOn Windows, copy the entire folder to a safe destination (preferably a different disk or external storage). Name it with a clear date: FXServer-backup-2026-05-29.zip.
Dump the MySQL database. This step is separate because the database is independent of the artifacts — but if you’re doing maintenance, it’s the right moment to grab a fresh snapshot:
mysqldump -u fivem_user -p fivem_db > backup-db-$(date +%Y%m%d-%H%M).sql
gzip backup-db-*.sqlReplace fivem_user and fivem_db with the real names from your setup. Confirm the .sql.gz file isn’t empty before proceeding.
A backup you haven’t tested is just “hope of a backup”. List the tar contents with tar -tzf backup-artifacts-*.tar.gz | head and confirm the expected binaries show up. For the MySQL dump, open the .sql.gz and confirm CREATE TABLE statements appear at the top.
Download and install the new version
With the backup validated, now you swap the binaries. The technique is “swap by folder” — extract the new version into a parallel folder, validate it’s complete, then perform the atomic swap.
Download the target artifact. From runtime.fivem.net, copy the .tar.xz (Linux) or .zip (Windows) link for the recommended build. On Linux:
cd /home/fivem
mkdir -p server-new
cd server-new
wget https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/12559-COMMIT_HASH/fx.tar.xz
tar -xJf fx.tar.xz
rm fx.tar.xzReplace the build number and COMMIT_HASH with the values from the build you’re installing.
Verify the extraction brought the expected binaries. You should see FXServer, the alpine/ folder (Linux), or FXServer.exe + DLLs (Windows):
ls server-new/
file server-new/FXServerIf FXServer is an ELF executable (Linux) or PE32+ (Windows), you’re good. If the folder came up empty or without the binary, redo the download — the link was probably wrong or interrupted.
Perform the atomic swap. The idea is to rename the old folder so it stays as a fallback and move the new one to the canonical name:
cd /home/fivem
mv server server-old-$(date +%Y%m%d)
mv server-new serverOn Windows, do the equivalent in Explorer: rename FXServer to FXServer-old and the new folder to FXServer. It takes a blink — but it guarantees that if something goes wrong in the next steps, you revert with another instant rename.
Keep server-old-YYYYMMDD/ on disk for at least 48 hours after the update. It’s your fast rollback if the server crashes or a critical resource stops working with the new build. Only delete after validating everything is stable.
Reconnect resources, configuration, and txAdmin
The new server/ folder contains only the binaries — you need to point it at the server.cfg, the resources/ folder, and the txData/ directory that were preserved.
Confirm the external folders are in the correct place. The expected structure after the swap:
/home/fivem/
├── server/ (new binaries)
├── resources/ (preserved)
├── server.cfg (preserved)
├── txData/ (preserved — tokens, profiles, ban list)
└── server-old-20260529/ (fast backup)If you previously had everything inside the binaries folder, now is the time to copy resources/, server.cfg, and txData/ out of server-old-*/ to the outside. Use cp -r (Linux) or copy/paste (Windows).
Edit the startup path if needed. If you use a start script in run.sh or start.bat, confirm it points to server/FXServer (not server-old) and references the correct server.cfg:
#!/bin/bash
cd /home/fivem
./server/run.sh +exec server.cfgOn Windows, the typical .bat looks like:
@echo off
cd /d C:\FXServer
server\FXServer.exe +exec server.cfg
pauseBring the server up:
sudo systemctl start fivem
journalctl -u fivem -fOr run run.sh/start.bat directly in an interactive terminal to watch the logs in real time during boot.
Verification
Verification has three levels: the server boots without a critical error, txAdmin responds, and a client can connect.
Check the boot logs. Look for messages like [citizen-server-impl] Server started. or equivalent. Typical post-update errors show up as Couldn't load resource X or Error parsing server.cfg. Resolve any red error before proceeding.
Access txAdmin on the default port:
http://YOUR_IP:40120 30120 (UDP+TCP) Cidadel / existing token If txAdmin asks for a full setup from scratch, the txData/ folder wasn’t preserved — stop, restore the backup, and redo the procedure keeping txData/ out of the binary swap.
Connect a FiveM client to the server and test 2-3 critical resources from your gamemode (economy, garage, banking). If everything responds normally, the update is complete.
Troubleshooting
The server boots but resources won’t load
The most common cause is incompatibility between the artifacts build and some resource version. Modern builds remove deprecated natives. Check the CitizenFX changelog between the old and new version, and update the affected resources (ESX, QBCore, ox_inventory usually have synchronized releases).
Error “could not load database connection”
The MySQL database wasn’t touched by the update — so the issue is configuration. Confirm server.cfg still has the correct mysql_connection_string convar and that the MySQL service is running. Test the connection manually: mysql -u fivem_user -p -h localhost fivem_db.
txAdmin asks for fresh setup after the update
This means it couldn’t find txData/. Stop the server, move txData/ to the correct location (usually one level above the server/ folder), and bring it up again. If the backup didn’t include txData/, you’ll have to redo setup — new token, master admin, server profile.
If the new build breaks in an unrecoverable way, the rollback is direct: stop the server, rename server/ to server-broken/, rename server-old-YYYYMMDD/ back to server/, bring the server up. Total time: less than 1 minute. That’s why the atomic backup via rename is so important.
Next steps
- Set up automated MySQL backups via daily cron with 7-day retention
- Document the internal procedure with the exact version you’re running
- Follow the #server-development channel on the CitizenFX Discord to anticipate schema changes
- Consider a staging environment on another port to test latest builds before promoting to production
- Monitor CPU and memory usage during the first 24 hours after each update — performance regressions between builds happen and show up early
If you’re running FiveM on a shared VPS that struggles with low tickrate during big events, a Hostini dedicated game server ships with high-frequency CPU, DDoS-protected uplink, and NVMe SSD — the exact profile for FiveM in production. Details at /jogos.
Frequently asked questions
Do I need to stop the server to swap the artifacts?
Yes. The binaries stay locked while the FXServer process is running, and trying to overwrite them will either fail (Linux) or produce corrupted files (Windows). Stop the server through txAdmin or the terminal before moving any file. Typical downtime window is 2 to 5 minutes.
Can I skip several versions at once?
You can, but read the CitizenFX changelog between your current version and the new one. Schema changes in native resources (sessionmanager, basic-gamemode) sometimes require adjustments in server.cfg or community resources. Jumping from an old recommended straight to latest without reviewing usually breaks legacy scripts.
Will my resources (resources/) disappear if I swap the artifacts?
No, as long as you swap ONLY the contents of the binaries folder and keep resources/, server.cfg, cache/, and the MySQL database intact. Artifacts are the FXServer runtime — your resources/ folder is independent and should never live inside the binaries folder.
What's the difference between recommended and latest in FiveM?
Recommended is the stable build validated by CitizenFX for production. Latest is the newest, with recent features and bugfixes but may contain regressions. For a server with players, always use recommended. Latest is for dev/staging.
Does txAdmin disappear when I swap the artifacts?
No, txAdmin ships embedded in every artifacts build and is restored when you bring up the new version. Your settings live in txData/ (outside the binaries folder) and are preserved. You just need to log in again.
Do I need to reconfigure server.cfg after updating?
In most updates, no. But builds that introduce new convars or mark old ones as deprecated will produce console warnings. Review the changelog and adjust server.cfg if needed — keeping deprecated convars doesn't break anything immediately, but they'll stop working in future builds.