# Set Up a Vanilla FiveM Server on Windows or Linux

> Install FXServer without txAdmin, separate binaries from server data, create a minimal server.cfg, choose the right track and verify the first connection.

Source: https://fivemdocs.com/getting-started/vanilla-server

A vanilla setup runs the server directly from its data directory. It does not require a roleplay framework or a database. Use [txAdmin quick start](/getting-started/quickstart-txadmin) instead when you want managed configuration and recipe deployment.

Register a server key in the [Cfx Portal](https://portal.cfx.re/). Choose a recommended artifact for your operating system and **Legacy or Enhanced** from the [official server download page](https://docs.fivem.net/docs/server-download/). Do not hardcode an old artifact URL as “latest.” The [upstream installation source](https://github.com/citizenfx/fivem-docs/blob/c2b2125759dfb8d0040492692aa1ac81319efa62/content/docs/server-manual/setting-up-a-server-vanilla.md) distinguishes binary and server-data folders; preserve that separation during updates.

## Windows

Install Git to clone the base resources and an archive utility capable of the downloaded format. Enhanced also requires the [Microsoft Visual C++ 2017 Redistributable (x64)](https://aka.ms/vs/17/release/vc_redist.x64.exe); install it before the first start. The Legacy archive is named `server.7z`; the Enhanced download is `cfx-server_win_x64.zip`. Inspect the actual downloaded extension before extracting it.

Create `C:\FXServer\server` for binaries and extract the selected artifact there. In a command prompt:

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

Create `server.cfg` in **server-data**, not in the binary directory. For Legacy, launch from that data directory:

```bat
C:\FXServer\server\FXServer.exe +exec server.cfg
```

Enhanced names the executable **`cfx-server.exe`** instead. Use that filename for the corresponding extracted artifact; do not mix Legacy executables and Enhanced resources. `cd /d` also changes drives, unlike plain `cd` in cmd.exe.

## Linux

The upstream guide describes Linux as a courtesy port with distribution/diagnostic limitations. Choose it with that support boundary understood. Install Git and an xz-capable extractor (`xz-utils` on Debian-family systems), then download the chosen artifact from the official page.

```sh
mkdir -p "$HOME/FXServer/server"
git clone https://github.com/citizenfx/cfx-server-data.git "$HOME/FXServer/server-data"
```

Extract the downloaded archive into `server`. For a Legacy `fx.tar.xz`, after placing it there:

```sh
cd "$HOME/FXServer/server"
tar xf fx.tar.xz
cd "$HOME/FXServer/server-data"
bash "$HOME/FXServer/server/run.sh" +exec server.cfg
```

The Enhanced Linux download is `cfx-server_linux_x64.tar.xz`. Use the launch files and format in that actual package, not a renamed Legacy archive. Run as a dedicated non-root account with access to its own directories; do not grant global write permissions to solve a path error.

## Minimal server.cfg

This intentionally starts the stock basic mode rather than a framework. Replace the private key placeholder; do not commit the real key. Configure public listing metadata separately in the [Cfx Portal](https://portal.cfx.re/).

```cfg
endpoint_add_udp "0.0.0.0:30120"
endpoint_add_tcp "0.0.0.0:30120"
sv_licenseKey "REPLACE_WITH_PRIVATE_SERVER_KEY"
sv_maxclients 8
set onesync on
sv_scriptHookAllowed false
sv_endpointPrivacy true

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

Confirm each resource exists in the downloaded stock-resource revision. A custom framework may own spawning/session behavior and require a different start list. Do not run two spawn controllers together merely because both examples use `ensure`.

A RedM installation uses the appropriate RedM-compatible resources and `set gamename rdr3`; changing only that variable does not convert GTA models or GTA-only scripts. For Enhanced voice and asset changes, follow [voice setup](/ops/voice) and [migration requirements](/reference/enhanced-migration).

## Public server-list metadata

Under the [14 October 2026 Cfx announcement](https://forum.cfx.re/t/portal-update-server-metadata-management/5431315), existing configuration-based listing values remain displayed until **21 October 2026**. From that date, public names, tagline, description, tags, language, banner and icon are managed in the Portal for both FiveM and RedM.

The minimal example deliberately omits the old listing assignments. Review the correct Portal server record and complete any fields that were not backfilled; use the [metadata migration checklist](/reference/server-configuration#public-metadata-in-cfx-portal) for all affected settings, tag limits and image sizes. Existing local values may still be used by resources, so check those dependencies before deleting old configuration. Endpoints, license keys and resource start commands remain in `server.cfg`.

## First connection and failure diagnosis

On a local test client, use F8 `connect 127.0.0.1:30120`. Verify a clean server startup, listed resources, successful connection and an actual spawn. Only then test from another network through deliberately configured TCP/UDP access. Keep administration ports private.

Check the public listing separately from the connection test. A successful direct connection does not prove that the Portal metadata is complete.

| Symptom | First check |
| --- | --- |
| No resources found / failed to start resources | Process working directory is server-data, and resources are not nested under an extra ZIP directory. |
| Nothing starts and connection times out | `+exec server.cfg` is present and resolves to the intended file. |
| No license key specified | Correct config path and execution first, then the private key entry. |
| Bind failure | Another process already owns the address/port or the chosen address is not local. |
| Local join works but remote join fails | [TCP/UDP, NAT, provider firewall and proxies](/ops/networking), not an unrelated framework change. |
| Listing shows missing server data or old branding | Review the [Portal metadata](#public-server-list-metadata), not resource startup or GTA assets. |
| Very slow Windows startup | Follow [platform support diagnostics](/troubleshooting/platform-support) rather than permanently disabling security software. |

For updates, stop the process, back up data/configuration, replace only binaries and test staging before cutover. See [artifact support policy](/ops/artifact-support) and [backup planning](/ops/backups). This page describes a reproducible installation; it does not claim an FXServer process was launched during a website build.
