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

# Set up a FiveM server on Windows

Step by step: download the FXServer artifact, extract it, run txAdmin, link your Cfx.re account, deploy a recipe with your license key, and connect. Plus the vanilla way.

This guide sets up a FiveM server on Windows 10, 11 or Windows Server with txAdmin. It works the same on your own PC (for development) and on a Windows VPS. Plan about 15 minutes.

[How to Make a FiveM Server in 2026! (HighwayTrooper)](https://www.youtube.com/watch?v=NjVwsBinE10) (YouTube video)

## What you need

- A Cfx.re account and a **license key** from [portal.cfx.re](https://portal.cfx.re) (see [Server setup overview](/docs/server-setup#before-you-start)).
- [7-Zip](https://www.7-zip.org/) or WinRAR to open `.7z` files.
- **Git for Windows** is optional but useful later.
- **MariaDB** only if you want a framework (QBCore, Qbox, ESX). Install it first, see [Database setup](/docs/server-setup/database).

## 1. Create the folders

Make a folder with a short path and no spaces, for example:

```text
C:\FXServer\server
```

Short paths avoid problems with long resource paths and some tools. Don't put the server in `Program Files`, `Downloads` or a OneDrive synced folder.

## 2. Download the artifact

1. Open the official [server download page](https://docs.fivem.net/docs/server-download/) (or `https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/`).
2. Pick **FiveM / RedM**, **Windows**, **Recommended** and download `server.7z`.
3. Check the build number against our [Artifacts page](/artifacts), which flags builds with known problems.

> [!NOTE]
> The Enhanced platform (Cfx Server) is a different download on the same page. Pick the FiveM / RedM (Legacy) build unless you know you want Enhanced. See [Legacy and Enhanced](/docs/server-setup#fivem-legacy-and-fivem-for-gta-v-enhanced).

## 3. Extract it

Open `server.7z` with 7-Zip and extract everything into `C:\FXServer\server`. You should now have `C:\FXServer\server\FXServer.exe` and a `citizen` folder next to it.

> [!TIP]
> Windows Defender scanning every file makes FXServer start slowly. The official FAQ suggests excluding the folder: open PowerShell as administrator and run `Add-MpPreference -ExclusionPath 'C:\FXServer\'`.

## 4. Start txAdmin

Double click `FXServer.exe`. A console window opens and, because you did not pass `+exec server.cfg`, FXServer starts **txAdmin**. It creates `C:\FXServer\txData` and opens `http://localhost:40120` in your browser. The console also prints a 4 digit **PIN**.

If the browser does not open, go to `http://localhost:40120` yourself. On a VPS, use `http://YOUR_VPS_IP:40120` from your own PC (and open TCP 40120 in the Windows firewall, ideally only for your IP).

## 5. Link your account

1. Check that the PIN is filled in and click **Link Account**.
2. Log in with your Cfx.re (forum) account and click **Yes, Allow**.
3. Create a **backup password**. You will use it if Cfx.re login is ever down, so save it in a password manager.

This makes you the **master admin** of this txAdmin.

## 6. Run the setup and deployer

1. Enter a **server name** and click **Next**.
2. Choose **Popular Recipes**.
3. Pick a recipe:
   - **FiveM Basic Server (Legacy)**, sometimes shown as CFX Default: a clean, framework free server. Best for learning and for vMenu servers.
   - **QBCore**, **Qbox** or **ESX Legacy**: full roleplay frameworks. These need MariaDB running. See [Popular recipes](/docs/txadmin/popular-recipes).
4. Confirm the **data location** (the default `txData\<name>.base` is fine) and click **Save**.
5. The **Recipe Deployer** shows the recipe YAML. Click **Next**.
6. Paste your **license key**. For framework recipes, fill in the **database** host (`localhost`), port (`3306`), user (`root`) and password. Leave the database name empty and txAdmin generates one.
7. Click **Run Recipe**. txAdmin downloads the resources and, for frameworks, imports the SQL. This takes a minute or two.
8. Review the generated `server.cfg` and click **Save & Run Server**.

The live console in txAdmin now shows the server starting. When you see resources starting and no red errors, it is up.

> [!IMPORTANT]
> QBCore and some other recipes install NPM packages with yarn on first start. Let that finish before you restart. The QBCore docs say this explicitly.

## 7. Connect

1. Start FiveM.
2. Press <kbd>F8</kbd> to open the client console.
3. Type `connect localhost:30120` (same PC) or `connect YOUR_PUBLIC_IP:30120` and press <kbd>Enter</kbd>.

You can also use the direct connect box in the FiveM main menu with the same address. To let friends connect, see [Ports and networking](/docs/server-setup/ports-and-networking).

## 8. Make it start on its own

txAdmin restarts FXServer on crashes, but not the whole machine. On a VPS, start FXServer when Windows boots:

1. Create `C:\FXServer\start.bat`:

```bat title="C:\FXServer\start.bat"
@echo off
cd /d C:\FXServer\server
FXServer.exe
```

2. Open **Task Scheduler**, create a task that runs `start.bat` **At startup**, "Run whether user is logged on or not", with the account that owns the folder.
3. In txAdmin, **Settings > FXServer**, turn on starting the server automatically when txAdmin starts.

## Folder layout after setup

```text
C:\FXServer\
├─ server\                 FXServer.exe + citizen\  (replace to update)
├─ start.bat
└─ txData\
   ├─ admins.json          txAdmin accounts
   ├─ default\             txAdmin config, logs, player database
   └─ MyServer.base\
      ├─ server.cfg
      └─ resources\
```

Your own resources go in `resources\[local]\` and get an `ensure` line in `server.cfg`. See [Installing resources](/docs/resources).

## The vanilla way (no txAdmin)

Useful for a throwaway dev server or when you want to see exactly what runs. From the official vanilla guide:

```bat
cd /d C:\FXServer
git clone https://github.com/citizenfx/cfx-server-data.git server-data
```

Create `C:\FXServer\server-data\server.cfg`:

```cfg title="server-data/server.cfg"
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"

ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode
ensure hardcap

sv_hostname "My dev server"
sv_maxclients 8
sv_licenseKey "cfxk_your_key_here"
sv_enforceGameBuild 3751
set onesync on
```

Then start it from inside the data folder:

```bat
cd /d C:\FXServer\server-data
C:\FXServer\server\FXServer.exe +exec server.cfg
```

> [!WARNING]
> Always start FXServer from inside the server data folder (or tell txAdmin where it is). If you start it from somewhere else, it cannot find `resources` and you get "no resources found" or "couldn't find resource" errors.

## Next steps

- Read [server.cfg explained](/docs/server-setup/server-cfg) so you know what every line does.
- Set up [txAdmin admins, bans and scheduled restarts](/docs/txadmin/everyday-admin).
- Add [vMenu or other resources](/docs/resources/recommended).
- Write [your first resource](/docs/development/first-resource).
