Server setup overview
The ways to set up a FiveM server (txAdmin, vanilla, hosting provider), what you download, the folder layout, and the difference between Legacy and Enhanced.
Setting up a FiveM server comes down to four steps: get a license key, download a server build (an artifact), run it, and give it a server.cfg with resources to start. txAdmin, which ships inside every build, does most of this for you.
Pick a setup method
The official docs list four ways. They all end up with the same FXServer running the same resources.
| Method | Best for | Guide |
|---|---|---|
| txAdmin on Windows | First server, local development, Windows VPS | Windows setup |
| txAdmin on Linux | VPS and dedicated servers, cheaper hosting | Linux setup |
| Vanilla (no txAdmin) | Minimal dev servers, containers, people who want full control | Covered at the end of both guides |
| Game server provider | People who don’t want to manage a machine | Your provider’s panel, then the txAdmin pages |
We recommend txAdmin for almost everyone. It is maintained by Cfx.re, restarts the server when it crashes, schedules restarts, and its deployer can install QBCore, Qbox or ESX from a recipe in a few minutes.
Before you start
- Create a license key. Log in at portal.cfx.re, open the server registration keys page (the dashboard has a “Create a Key” quick link), click Generate Key, give it a display name and copy the key. It starts with
cfxk_. Store it somewhere safe, you will paste it into txAdmin orserver.cfg. - Pick an artifact. Download the recommended build from the official server download page or
runtime.fivem.net/artifacts. Our Artifacts page shows the recommended build and flags builds known to be broken. - Decide where the server lives. Your PC is fine for testing. For a public server read Requirements first.
- Install MariaDB if you will run a framework. See Database setup.
What you download
| Platform | File | What is inside |
|---|---|---|
| Windows | server.7z |
FXServer.exe, citizen/ (scripting runtimes, txAdmin, system resources) and DLLs |
| Linux | fx.tar.xz |
run.sh and an alpine/ folder with the server and its own libraries |
The artifact is the program. Your server data (the server.cfg and the resources folder) lives somewhere else. Keeping them apart is what makes updating easy: you swap the artifact folder and your data stays untouched.
C:\FXServer\
├─ server\ artifact, replace this folder when you update
└─ txData\ created by txAdmin on first start
├─ admins.json
├─ default\ txAdmin's own data (config, player database, logs)
└─ QBCore_A1B2C3.base\ your server data folder: server.cfg + resources\
(the deployer suggests a name like this, you can pick any)On Linux the same idea applies, usually under /home/fivem/ or /opt/fivem/.
How txAdmin and FXServer start
- Run FXServer without
+exec server.cfgand it starts txAdmin on port40120. txAdmin then starts FXServer for you with your config. This is the normal way. - Run FXServer with
+exec server.cfgfrom inside your server data folder and it starts directly, with no txAdmin. This is the “vanilla” way.
Both guides cover both ways.
FiveM Legacy and FiveM for GTA V Enhanced
In March 2026 Cfx.re announced FiveM for the Enhanced edition of GTA V, and early access for server owners opened on 21 July 2026. What you need to know as a server owner:
- It is a separate platform. The client is separate, and the server is a separate program called Cfx Server with its own download on the server download page (files are named
cfx-server.exeon Windows). Legacy and Enhanced players cannot join each other’s servers, so moving is a decision for your whole community. - Legacy is not going away. Upgrading is optional and Legacy support continues.
- Cfx.re’s What’s changed page lists the breaking changes. The big ones: Mono is replaced by .NET 10 for C# resources, pure mode is always on, OneSync is always the full mode (no “legacy” or P2P mode), only the latest game build is supported, KVP files must be migrated, asset escrow was not yet available at launch, and dev tools need
sv_devMode true. - Existing streamed assets may need converting with Cfx.re’s Alchemist tool.
- txAdmin has a separate “FiveM Basic Server (Enhanced)” recipe.
The rest of these docs describe Legacy FXServer, which is what almost all resources, frameworks and tutorials target today. Where Enhanced differs in a way that bites, the page says so.
The pages in this section
- Windows setup: step by step with txAdmin, plus vanilla.
- Linux setup: Ubuntu or Debian, systemd service, firewall.
- server.cfg explained: every common line and what it does.
- Updating artifacts safely: how to update without breaking things.
- Ports and networking: port forwarding, server list, proxies.
- Database setup: MariaDB, HeidiSQL and oxmysql.
- Common errors and fixes: the errors everyone hits, and the fix.
- Security basics: ACE, txAdmin accounts, the database, secrets.
Tip
Want a ready config instead of writing one? The server.cfg Generator builds a full server.cfg with hostname, slots, OneSync, endpoints, tags, resources and ACE permissions.
