<!-- fivemad.com, Markdown source of https://fivemad.com/docs/server-setup -->
> Source: https://fivemad.com/docs/server-setup
> Section: Server setup
> Tags: server setup, fxserver, txadmin, artifacts, enhanced, legacy
> Last updated: 2026-09-22
> Site map for assistants: https://fivemad.com/llms.txt

# 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](/docs/server-setup/windows) |
| **txAdmin on Linux** | VPS and dedicated servers, cheaper hosting | [Linux setup](/docs/server-setup/linux) |
| **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](/docs/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

1. **Create a license key.** Log in at [portal.cfx.re](https://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 or `server.cfg`.
2. **Pick an artifact.** Download the **recommended** build from the official [server download page](https://docs.fivem.net/docs/server-download/) or `runtime.fivem.net/artifacts`. Our [Artifacts page](/artifacts) shows the recommended build and flags builds known to be broken.
3. **Decide where the server lives.** Your PC is fine for testing. For a public server read [Requirements](/docs/getting-started/requirements) first.
4. **Install MariaDB** if you will run a framework. See [Database setup](/docs/server-setup/database).

## 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.

```text title="Recommended layout"
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.cfg` and it starts **txAdmin** on port `40120`. txAdmin then starts FXServer for you with your config. This is the normal way.
- Run FXServer **with** `+exec server.cfg` from 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](https://docs.fivem.net/docs/server-download/) (files are named `cfx-server.exe` on 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](https://docs.fivem.net/docs/developers/legacy-vs-enhanced/) 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.

[FiveM Enhanced: Everything That Changed For Server Owners (TraseDev)](https://www.youtube.com/watch?v=WOgYKmAqptg) (YouTube video)

## The pages in this section

1. [Windows setup](/docs/server-setup/windows): step by step with txAdmin, plus vanilla.
2. [Linux setup](/docs/server-setup/linux): Ubuntu or Debian, systemd service, firewall.
3. [server.cfg explained](/docs/server-setup/server-cfg): every common line and what it does.
4. [Updating artifacts safely](/docs/server-setup/updating-artifacts): how to update without breaking things.
5. [Ports and networking](/docs/server-setup/ports-and-networking): port forwarding, server list, proxies.
6. [Database setup](/docs/server-setup/database): MariaDB, HeidiSQL and oxmysql.
7. [Common errors and fixes](/docs/server-setup/common-errors): the errors everyone hits, and the fix.
8. [Security basics](/docs/server-setup/security): ACE, txAdmin accounts, the database, secrets.

> [!TIP]
> Want a ready config instead of writing one? The [server.cfg Generator](/tools/server-cfg-generator) builds a full `server.cfg` with hostname, slots, OneSync, endpoints, tags, resources and ACE permissions.
