# Setting up a FiveM server on Windows

> Install a FiveM server on Windows: folder layout, extracting server.7z, first start with txAdmin, firewall rules for 30120 and auto-start on boot.

Source: https://fam-tools.com/guides/fivem-windows-server-setup · FAM Tools · published 2026-09-11 · updated 2026-09-11 · about 11 min

**Short answer.** Create `C:\FXServer\server`, download the recommended Windows build (`server.7z`) from the Server Download page, extract it with 7-Zip, and run `FXServer.exe`. txAdmin opens in the browser: link your Cfx.re account, deploy a recipe or point it at your server data, and enter your licence key. Open port 30120 TCP and UDP in Windows Firewall and use Task Scheduler to start the server at boot.

## Key points

- Binaries in one folder (`C:\FXServer\server`), server data in another.
- Extract `server.7z` with 7-Zip or WinRAR.
- Double-click `FXServer.exe` for txAdmin; or `FXServer.exe +exec server.cfg` for vanilla.
- Allow 30120 TCP and UDP in Windows Firewall; do not expose 3306.
- Task Scheduler “At startup” keeps the server running after reboots.

Windows is the platform Cfx.re builds FXServer for first — the Linux build is officially a courtesy port — so a Windows VPS or dedicated server is a comfortable home for FiveM, especially if you already know Remote Desktop. The setup takes about fifteen minutes.

## Step 1: folders

| Folder | Holds |
| --- | --- |
| `C:\FXServer\server` | The server binaries (artifacts) — replaced on every update |
| `C:\FXServer\server-data` | server.cfg and resources — your actual server |
| `C:\FXServer\txData` | txAdmin data (created next to the binaries folder by default) |

> **Avoid Program Files and Desktop** — Protected folders cause permission errors, and paths with spaces or brackets break some tools. A short path like `C:\FXServer` avoids both.

## Step 2: download and extract

1. Open the Server Download page on docs.fivem.net and download the **recommended** Windows build (`server.7z`).
2. Open it with 7-Zip or WinRAR and extract into `C:\FXServer\server`.
3. The folder should now contain `FXServer.exe` and many DLLs.

> **FiveM for GTAV Enhanced** — For an Enhanced server the archive is named `cfx-server_win_x64` and the executable `cfx-server.exe`; the steps are otherwise the same.

## Step 3: first start with txAdmin

1. Double-click `FXServer.exe`. A browser tab opens on txAdmin.
2. Check the PIN and click Link Account, then log in with your Cfx.re account.
3. Create a password for the admin panel.
4. Name the server, choose Popular Recipes (or your existing server data) and run the recipe deployer.
5. Enter your licence key when asked — see [the licence key guide](https://fam-tools.com/guides/fivem-license-key-keymaster).
6. Save & Run Server.

Everything after this happens in txAdmin — see [the txAdmin setup guide](https://fam-tools.com/guides/txadmin-setup-guide).

## Alternative: vanilla FXServer without txAdmin

*start.bat in C:\FXServer\server-data*

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

Run it from the server-data folder: if the server says it found no resources, you started it from the wrong directory; if nothing starts and players time out, `+exec server.cfg` is missing.

## Step 4: Windows Firewall

*PowerShell (as Administrator)*

```powershell
New-NetFirewallRule -DisplayName "FiveM TCP" -Direction Inbound -Protocol TCP -LocalPort 30120 -Action Allow
New-NetFirewallRule -DisplayName "FiveM UDP" -Direction Inbound -Protocol UDP -LocalPort 30120 -Action Allow
# txAdmin only from your own IP:
New-NetFirewallRule -DisplayName "txAdmin" -Direction Inbound -Protocol TCP -LocalPort 40120 -RemoteAddress <your.home.ip> -Action Allow
```

Your hosting provider may have its own firewall in front of the machine — open the same ports there. Details: [ports and firewall](https://fam-tools.com/guides/fivem-server-ports-firewall).

## Step 5: start on boot

1. Open Task Scheduler → Create Task.
2. General: “Run whether user is logged on or not”, “Run with highest privileges”.
3. Triggers: At startup (add a 30-second delay so the network and database are up).
4. Actions: start `C:\FXServer\server\FXServer.exe` with “Start in” set to `C:\FXServer\server`.
5. Settings: “If the task fails, restart every 1 minute”.

txAdmin then restarts the game server on crashes and on your schedule — see [scheduled restarts](https://fam-tools.com/guides/fivem-scheduled-restarts).

## Common startup errors

| Error | Fix |
| --- | --- |
| No license key was specified | Set `sv_licenseKey` in server.cfg or in txAdmin settings |
| Failed to start resource / no resources found | Start from the server-data folder (vanilla) or fix the path in txAdmin |
| Players time out, server shows no errors | Firewall — open 30120 TCP and UDP on Windows and at the provider |
| Very slow start on Windows | Antivirus scanning the server folders — add an exclusion |

## Questions

### How do I install a FiveM server on Windows?

Download the recommended `server.7z`, extract it to `C:\FXServer\server`, run `FXServer.exe`, and complete the txAdmin setup in the browser.

### Which Windows version do I need?

A current 64-bit Windows or Windows Server (2019, 2022, 2025) works.

### Should I use Windows or Linux for FiveM?

Both work. Windows is Cfx.re’s primary platform; Linux is officially a courtesy port but cheaper to host and widely used.

### How do I open ports for FiveM on Windows?

Allow inbound TCP and UDP 30120 in Windows Firewall (and at your provider’s firewall).

### Why is my Windows FiveM server slow to start?

Usually antivirus scanning thousands of resource files. Exclude the server folders.

## Related

- https://fam-tools.com/guides/txadmin-setup-guide
- https://fam-tools.com/guides/fivem-linux-server-setup
- https://fam-tools.com/guides/fivem-server-ports-firewall
- https://fam-tools.com/guides/fivem-license-key-keymaster
