Moving a FiveM server to a different hosting provider is straightforward if you prepare properly. A mistake in the database export or a forgotten resource can leave your server broken. This guide walks through the entire process: from preparation to the final test on the new host.
Preparation
Before you move anything, take inventory of everything on your server.
- Resources: list all resources in your resources folder. Note subfolders and the order in server.cfg.
- Database: note the database name, username and password. Check how many tables there are and how large the database is.
- server.cfg: this file contains all your server settings, including the license key, ensure lines and convars.
- Other files: think about txAdmin profiles, scheduled restarts, banlists and any custom configuration files outside the default locations.
Step 1: Export the database
The database is the most important component. It holds all player data: inventory, vehicles, housing, bank accounts and character information.
If you have access to phpMyAdmin (available in the game panel of most providers):
- Open phpMyAdmin and select your database.
- Click Export.
- Choose the Quick method and SQL format.
- Click Go. You get a
.sqlfile.
If you have SSH access, you can also use mysqldump:
mysqldump -u username -p databasename > backup.sql
Check the downloaded file. Open it in a text editor and verify the tables and data look complete. A typical RP server export is 50 to 500 MB.
Step 2: Download resources
Download the entire resources folder from your server. Options:
- SFTP: connect with an SFTP client like FileZilla or WinSCP and download the full resources folder.
- Game panel file manager: most panels offer an option to download folders as a ZIP. This is faster than individual files.
Note: the resources folder can be large, especially on servers with many custom vehicles, MLOs and clothing packs. 5 to 20 GB is normal for a mature RP server.
Step 3: server.cfg and other files
Download your server.cfg and any other configuration files:
- txAdmin configuration (if you have custom settings)
- Banlists and whitelists
- Any cron jobs or scheduled tasks
Step 4: Set up the new server
On your new host:
- Create a new database through the game panel. Note the hostname, database name, username and password.
- Import the database: open phpMyAdmin, select the new database, click Import and upload your
.sqlfile. Large files may take several minutes to import. - Upload resources: transfer the resources folder via SFTP or the file manager in the game panel.
- Place server.cfg: copy your server.cfg to the correct location.
Step 5: Update server.cfg
Adjust the following settings in your server.cfg:
- License key: your Cfx.re license key is tied to an IP address. Go to keymaster.fivem.net and update the IP to your new server, or create a new key.
- Database connection: update the
set mysql_connection_stringwith the new hostname, database name, username and password. - Endpoint: check that the
endpoint_add_tcpandendpoint_add_udplines contain the correct IP and port. - Paths: verify that any absolute paths in the configuration still work on the new server.
Step 6: Test
Start the server and test thoroughly before letting players connect:
- Connect yourself and check that your character, inventory and vehicles are intact.
- Test core functionality: jobs, garages, housing, shops.
- Check the server console for error messages.
- Test with a few trusted players or staff members.
Step 7: Redirect players
Once everything works, direct your players to the new server:
- Connect URL: if you use a Cfx.re connect URL (connect.cfx.re), it works automatically once you update the license key.
- Direct IP: communicate the new IP address through your Discord server and server listing.
- DNS: if you use a custom domain as your connect address, update the DNS record.
Minimizing downtime
With good preparation you can keep downtime under an hour:
- Set up the new server completely and test with a copy of the database.
- Pick a quiet time (night or early morning).
- Put the old server in maintenance mode.
- Make a final database export and import it on the new server.
- Update the license key and DNS.
- Start the new server and announce the switch.
Common mistakes
- Forgetting the database export: all player data is then lost. Always verify the export is complete.
- Not updating the license key: the server will not start. Update the IP at keymaster.fivem.net.
- Wrong MySQL credentials: the server starts but scripts throw database errors. Test the connection with a simple query first.
- File permissions: on some hosts, files need the correct permissions. Check that the server can read the resources folder.
Moving to HostValues? All FiveM plans include a database, SFTP access and txAdmin. Our support team can help with the migration if you get stuck. See also our guide on setting up a FiveM server for the initial configuration.