# How to Move a FiveM Server to a New Host (txData and Database)

Move a FiveM server to a new host: download server-data and txData, export the MySQL database, import it, fix the connection string and keep your license key.

Updated 2026-10-03. https://gamezservers.com/guides/how-to-move-a-fivem-server-to-a-new-host

To move a FiveM server to a new host, stop it in txAdmin, then download three things: the server data folder (`resources/` and `server.cfg`), the `txData` folder (txAdmin admins, bans, players and settings), and a `.sql` dump of the MySQL database exported with HeidiSQL, phpMyAdmin or `mysqldump`. Upload the files, import the dump into the new database, change `mysql_connection_string` in `server.cfg` to the new database, and point txAdmin at the new `server.cfg`. Keep using a license key from the same Cfx.re account.

## What you can and cannot move

| What | Can it move? |
| --- | --- |
| Resources, scripts, cars, MLOs and `server.cfg` | Yes, copy the server data folder |
| Characters, money, vehicles, houses, inventories | Yes, but only through the database dump |
| txAdmin admins, bans, warnings, whitelist, playtime | Yes, in `txData` |
| Your Cfx.re license key | Yes. Keys are not tied to an IP address |
| Escrowed (paid) resources | Only with a license key from the Cfx.re account that owns them |
| The old host's database itself | No. You export it and import a copy |

## Before you start

- **Find your folders.** In txAdmin, **Settings > FXServer** shows the server data path and the `server.cfg` path.
- **Find the database details** in your `server.cfg` (the `mysql_connection_string` line) or the old host's panel.
- **Note the FXServer build** the old server ran, and use the same or a newer recommended build.
- **Announce downtime.** Stop the server from txAdmin before exporting, so nobody's money changes mid dump.

## What goes where

| File or folder | What it holds | Where it goes |
| --- | --- | --- |
| `server.cfg` | Resource list, convars, license key, connection string | Server data folder on the new host |
| `resources/` | Every script, framework, car and map | Server data folder |
| `txData/admins.json` | txAdmin admin accounts and permissions | `txData/` on the new host |
| `txData/<profile>/config.json` | txAdmin settings, including the old paths | `txData/<profile>/`, then fix the paths |
| `txData/<profile>/data/playersDB.json` | Players, bans, warnings, whitelist, playtime | Same path |
| `database.sql` (your export) | All framework data: users, characters, vehicles, items | Imported into the new database |

Servers deployed from a txAdmin recipe usually keep their server data inside `txData` too, in a folder ending in `.base`, such as `txData/QBCore_A1B2C3.base/`. If so, downloading `txData` gets almost everything.

## Step 1: Export the database

Stop the server in txAdmin. Then connect to the old database with [HeidiSQL](https://www.heidisql.com) or the host's phpMyAdmin and export it:

- HeidiSQL: right click the database, **Export database as SQL**, tick **Create** for tables and **Insert** for data, output to a single `.sql` file.
- phpMyAdmin: select the database, **Export**, format SQL.
- Command line: `mysqldump -u USER -p DATABASE > database.sql`

Open the file and check it contains `CREATE TABLE` and `INSERT INTO` lines for tables like `players` or `users`. An empty dump means empty characters.

## Step 2: Download the files

Download the server data folder and `txData` over SFTP with [FileZilla](https://filezilla-project.org) or [WinSCP](https://winscp.net), or as a zip from the old host's file manager. `resources` on a big roleplay server can be several gigabytes of cars and maps, so SFTP's resume matters.

## Step 3: Import into the new database

On the new host, connect to the new, empty database with HeidiSQL and run your `.sql` file (**File > Run SQL file**). Then update `server.cfg`:

```
set mysql_connection_string "mysql://USER:PASSWORD@HOST:3306/DATABASE?charset=utf8mb4"
```

Use the new host, port, user, password and database name. Leave the line above `ensure oxmysql`.

## Step 4: Upload and reconnect txAdmin

Upload the server data folder and `txData`. Open txAdmin, go to **Settings > FXServer** and set the server data folder and `server.cfg` path to where they now live. Check the `sv_licenseKey` line and the `endpoint_add_tcp` and `endpoint_add_udp` lines in `server.cfg` against the new host's port. Start the server from txAdmin and watch the Live Console.

![GTA V street scene of the kind a FiveM roleplay server runs, with player data kept in MySQL](https://gamezservers.com/games/fivem/shot-2.jpg)

## The trap: escrowed resources follow the account, not the files

Paid resources from Tebex are usually protected by Cfx.re asset escrow. They only run on a server whose license key was generated by the **same Cfx.re account** that bought them. Copying the files is not enough. If you make your new license key on a friend's account, a new staff account or a fresh account, every escrowed script fails on start with "You lack the required entitlement", and the server starts with half its features missing.

Generate the new server's key (or keep the old one) from the account that owns the assets, on [portal.cfx.re](https://portal.cfx.re). If they were bought on another account, assets can be transferred in the portal, but Cfx.re only allows a transfer once, so pick the right account. The [Cfx.re asset escrow FAQ](https://support.cfx.re/hc/en-us/articles/8016100729372-Asset-Escrow-FAQ-for-FiveM-developers) explains the rules.

## Common problems

- **Everyone spawns as a new character:** the database was not imported, or `mysql_connection_string` still points at the old database. See [oxmysql unable to establish a connection](https://gamezservers.com/guides/oxmysql-unable-to-establish-a-connection-to-the-database).
- **"You lack the required entitlement":** the license key belongs to a different Cfx.re account than the escrowed resource.
- **txAdmin says it cannot find server.cfg:** `config.json` still holds the old host's paths. Set them again in **Settings > FXServer**.
- **Import fails on special characters:** export and import with `utf8mb4`.
- **Server not in the list:** wait a little, and use F8 `connect` with the address meanwhile.

## Moving your FiveM server to GamezServers

On a [FiveM server from GamezServers](https://gamezservers.com/games/fivem), pick the txAdmin type and paste your Cfx.re license key at checkout. Every server comes with its own MySQL database, with its details under **Settings** for HeidiSQL and your connection string. Upload your folders from **Files** (a zip plus **Extract** is fastest) or over the SFTP login in **Settings**, import your dump, then point txAdmin at your `server.cfg`. Press **Backup** before you start, and remember a file backup does not include the database. If you are starting a framework fresh instead, see [how to make a FiveM roleplay server](https://gamezservers.com/guides/how-to-make-a-fivem-roleplay-server).

## FAQ

### Can I use the same license key on a new host?

Yes. FiveM keys are not tied to an IP address. Each running server still needs its own key.

### Will players keep their characters and money?

Yes, if you export the MySQL database, import it on the new host and update the connection string.

### Where is txData?

Wherever the old host set it, often next to the server files. txAdmin's settings show the path, and recipe servers keep their server data inside it.

### Why do my paid scripts stop working after moving?

Escrowed resources only run with a license key from the Cfx.re account that bought them. Use a key from that account.
