# How to Make a FiveM Server: Hosted or Free on Your Own PC (2026)

Make a FiveM server two ways: hosted with txAdmin ready, or free on Windows or Linux with FXServer, a free Cfx.re key, MariaDB and port 30120.

Updated 2026-11-05. https://gamezservers.com/guides/how-to-make-a-fivem-server

There are two ways to make a FiveM server. Host it with us and txAdmin, the FiveM web panel, is ready about a minute after checkout, with your license key and a MySQL database already filled in. Or run it yourself for free: download FXServer from Cfx.re, generate a free license key (it starts with `cfxk_`) at portal.cfx.re, install MariaDB for a roleplay framework like QBCore, Qbox or ESX, and forward port 30120 on TCP and UDP. Plan on 4 GB of RAM for a vanilla server and 8 GB or more for roleplay. The free key allows up to 48 players. This guide covers both ways.

## Which way should you host FiveM?

| | Free on your own PC | Hosted with GamezServers |
| --- | --- | --- |
| Cost | Free software, plus hardware and electricity | From 9.99 USD a month, splittable |
| Setup | Download FXServer, install MariaDB, open ports, about an hour the first time | About a minute after checkout |
| Database | Install and secure MariaDB yourself | Made for you and filled into txAdmin |
| Port forwarding | 30120 TCP and UDP | Nothing to forward |
| Online when you are not | Only while your PC is on | Yes |
| DDoS protection | None | Included |
| Your home IP | Shared with every player | Never shared |

A home server is fine for testing, building and playing with a few friends. Once a roleplay community with staff and regular players depends on it, it needs to be online when you are not.

## What does a FiveM server cost to run?

The software side is free in both cases:

| Part | Cost | Where it comes from |
| --- | --- | --- |
| FXServer (the server program) | Free | runtime.fivem.net artifacts |
| txAdmin (web panel) | Free | Built into FXServer |
| License key | Free | portal.cfx.re, Server Keys |
| Database (for QBCore, Qbox, ESX) | Free | MariaDB |
| Frameworks and many scripts | Free | GitHub, txAdmin recipes |
| GTA V | Already owned | Needed on the PC you play from, not on the server |

FiveM's [server hosting page](https://fivem.net/server-hosting) says the default license supports up to 48 players with OneSync Infinity. More slots need a paid Element Club subscription. The full budget, including paid scripts, is in [FiveM server hosting cost](https://gamezservers.com/guides/fivem-server-hosting-cost).

## How much RAM does a FiveM server need?

RAM decides how many resources a server can carry. Every script, car and map takes memory, and a roleplay framework with a few dozen scripts uses far more than vanilla freeroam.

| Server | RAM | Player slots | Our plan |
| --- | --- | --- | --- |
| Vanilla freeroam or a small test server | 4 GB | 16 | Starter, 9.99 USD a month |
| QBCore, Qbox or ESX roleplay, up to 32 players | 8 GB | 32 | Standard, 19.99 USD a month |
| Roleplay with many custom cars, maps and scripts | 12 GB | 48 | Pro, 29.99 USD a month |
| Busy 48 slot server with a large resource pack | 16 GB | 48 | Elite, 39.99 USD a month |

48 is the most a free Cfx.re key allows, so the bigger plans add room for resources rather than slots. FiveM runs most of its work on one thread, so a fast CPU core matters more than many cores. Upload speed matters too: each player downloads the server's resources on their first join, and a big roleplay server can be hundreds of megabytes. More in [choosing a plan](https://gamezservers.com/docs/choosing-a-plan).

## How do you get a FiveM license key?

Every FiveM server needs a free license key, hosted or not:

1. Go to [portal.cfx.re](https://portal.cfx.re) and sign in with your Cfx.re account (the same one you use on the FiveM forum).
2. Open **Server Keys** and generate a new key.
3. Give it a name like "My RP server" and create it.
4. Copy the key. It starts with `cfxk_`.

A key is not tied to an IP address, so you can keep it if you move the server. Use one key per running server.

## Option 1: Host a FiveM server with GamezServers

1. **Pick a plan** from the table above. A typical QBCore or ESX server runs well on Standard. New customers get 50% off the first month.
2. **Choose a server type.** **txAdmin** (best for most) deploys complete roleplay frameworks from recipes and handles restarts, bans, admins and whitelists. **Plain FXServer** is just the server and its `server.cfg`, started automatically, for experienced owners bringing their own files.
3. **Paste your license key**, name the server and pay. Choose **Split with friends** at checkout to share the bill between 2 and 10 people, each paying their own share by card with a 1 USD fee per share. The server shows **Setting up** while the FiveM files download, then **Online**.
4. **Open txAdmin.** The **Overview** tab of your panel has a txAdmin card with an **Open** button. txAdmin runs one port above your game port, for example `http://203.0.113.10:30121`. Sign in with the username `admin` and the txAdmin password shown in the panel. There is no PIN and no Cfx.re sign in. txAdmin reads that password on the first start only, so to change it later, click your name at the top right of txAdmin and pick **Change password**.
5. **Pick a recipe** and press **Next** until it deploys:

   | Recipe | What you get |
   | --- | --- |
   | QBCore | The most widely used roleplay framework, with jobs, inventory, housing and phone scripts. Right for most roleplay servers. |
   | ESX Legacy | The long running ESX framework and its big script library. Pick it if the scripts you bought say ESX. |
   | Qbox | A modern fork of QBCore built around ox_lib and ox_inventory, compatible with most QBCore scripts. |
   | CFX Default | A clean server with the basic Cfx resources, for freeroam, racing or a custom build. |

   Your license key and database are filled in, so leave those pages as they are. The recipe downloads the framework, creates the database tables and writes a `server.cfg`. txAdmin is pinned to your server's own ports, so there are no endpoints or ports to edit.
6. **Press Start Server.**
7. **Name your server at portal.cfx.re.** Since October 2026 the FiveM server list takes the name, description, tags, language and banner from the Cfx Portal, not the server. Sign in with the Cfx.re account that made your license key, open **Servers**, pick yours and fill in its details, or the list shows it as "Missing server data".
8. **Invite players.** The **Invite friends** button in your panel gives you a join page with the steps filled in.

Every FiveM server runs its own MySQL database inside the server. It starts and stops with it and is part of every backup. Its host, port, user, password and name are under **Settings**, so you can open it in HeidiSQL or import the `.sql` files scripts come with. We run FiveM for Grand Theft Auto V Legacy, the version nearly every server and resource is made for. FiveM for GTA V Enhanced is still in early access, so we do not offer it yet.

### Running it day to day

With the txAdmin type, txAdmin is in charge of the game:

- **Commands, kicks and announcements:** use txAdmin's **Live Console** and **Players** pages. The console in our panel still shows everything the server prints, but commands typed there do not reach the game while txAdmin runs it.
- **Restarts:** schedule them in txAdmin under **Settings > Restarter**. A daily restart keeps a busy roleplay server healthy.
- **Admins:** add your staff under **Admin Manager** in txAdmin.
- **Player count:** shows on your panel's Players tab. Names and identifiers live in txAdmin.
- **Different framework later:** a recipe is a one time install. In txAdmin open **Settings**, then **FXServer**, then **Reset** next to Server Data Folder. Setup runs again into a new folder, and your old files stay in place.

On Plain FXServer, the panel has buttons for `say`, `ensure`, `stop` and `refresh`, and a Kick button on the Players tab. A Steam Web API key is optional, under **Settings**, if your scripts need players' Steam identifiers. Billing is monthly with no contract. See [billing and cancellation](https://gamezservers.com/docs/billing-and-cancellation) and the [control panel guide](https://gamezservers.com/docs/control-panel).

## Option 2: Make a FiveM server on your own PC for free

### What you need

- **A PC or server that stays on** while people play. Your server does not need GTA V installed.
- **RAM:** 4 GB free for vanilla, 8 GB or more for a roleplay framework. If you also play GTA V on the same PC, add what the game needs.
- **A Cfx.re account** for the license key and the txAdmin login.
- **Port forwarding** on your router, or a VPS with a public IP.
- **Grand Theft Auto V and FiveM** on the PC you play from.

### Step 1: Download FXServer

FXServer builds are called artifacts. Use the build marked **Recommended** unless a resource asks for a newer one.

**Windows**

1. Download the recommended build from the Windows artifacts page on [runtime.fivem.net](https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/).
2. Create a folder like `C:\FXServer\server` and extract the archive into it with 7-Zip.
3. Create a second folder, `C:\FXServer\txData`, for your server data. Keeping the two apart lets you replace FXServer without touching your server.

**Linux**

```
mkdir -p ~/FXServer/server && cd ~/FXServer/server
wget <link to the recommended fx.tar.xz>
tar xf fx.tar.xz
```

Copy the link from the Linux artifacts page on [runtime.fivem.net](https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/). Install `xz-utils` first if `tar` cannot read the file.

### Step 2: Install MariaDB (for roleplay frameworks)

QBCore, Qbox and ESX store characters, money and inventories in MySQL. Skip this step for a plain freeroam server.

- **Windows:** install [MariaDB](https://mariadb.org/download/) and set a root password during setup. HeidiSQL comes with it for browsing the database.
- **Linux:** `sudo apt install mariadb-server`, then run `sudo mariadb-secure-installation`.

Create a database and a user for the server:

```
CREATE DATABASE fivem;
CREATE USER 'fivem'@'localhost' IDENTIFIED BY 'a-long-password';
GRANT ALL PRIVILEGES ON fivem.* TO 'fivem'@'localhost';
FLUSH PRIVILEGES;
```

### Step 3: Start FXServer and open txAdmin

- **Windows:** run `FXServer.exe` from `C:\FXServer\server`.
- **Linux:** run `./run.sh` from the server folder. Use `screen` or `tmux` so it keeps running after you log out.

txAdmin starts and prints its address and a 4 digit PIN, for example `http://localhost:40120`. Open it in a browser (on a VPS use the server's IP), enter the PIN, sign in with your Cfx.re account and set a master password. That account owns the server, so use the Cfx.re account you want in charge.

Keep port 40120 private. Anyone who reaches txAdmin's login page can try to get in, so do not forward it unless you need to manage the server from outside.

### Step 4: Deploy a recipe

In txAdmin's setup choose **Popular Recipes**, then:

1. Pick **CFX Default**, **QBCore**, **Qbox** or **ESX Legacy**.
2. Set the data folder to your `txData` folder.
3. Paste your license key.
4. For roleplay recipes, enter the database host (`localhost`), port (`3306`), user, password and database name from step 2.
5. Run the recipe, then **Save & Run Server**.

The recipe writes a `server.cfg` like this, which you can edit later in txAdmin's **CFG Editor**:

```
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
sv_hostname "My FiveM Server"
sv_maxclients 48
sv_licenseKey cfxk_your_key_here
set mysql_connection_string "mysql://fivem:a-long-password@localhost/fivem?charset=utf8mb4"
ensure qb-core
```

txAdmin recipes turn OneSync on, which most current scripts expect.

### Step 5: Open the ports

| Port | Protocol | What for | Open to the internet |
| --- | --- | --- | --- |
| 30120 | TCP and UDP | The game, the server list and players.json | Yes |
| 40120 | TCP | txAdmin web panel | Only if you manage it from outside |
| 3306 | TCP | MariaDB | No |

Forward 30120 TCP and UDP on your router to the server's local IP, and allow both in Windows Defender Firewall or `ufw`. The server also needs to reach Cfx.re's servers to check its key and appear in the server list, so do not block outbound traffic. Our [port forwarding guide](https://gamezservers.com/guides/how-to-port-forward-a-game-server) shows the router side.

If your router's WAN IP is different from your public IP, your provider uses CGNAT and nobody outside can connect. See [hosting a game server without port forwarding](https://gamezservers.com/guides/how-to-host-a-game-server-without-port-forwarding).

### Step 6: Name the server and join

Fill in your server's name and details at [portal.cfx.re](https://portal.cfx.re) under **Servers**, the same as Option 1, step 7. Then start FiveM, press **F8** and type `connect` followed by your address:

- On the same PC: `connect localhost:30120`
- Friends: `connect your-public-ip:30120`

## How do players join a FiveM server?

1. Install FiveM from [fivem.net](https://fivem.net) on a PC that owns an up to date, legal copy of Grand Theft Auto V from Steam, Epic Games or Rockstar Games, and start it once so it can set itself up. Story mode does not need to be finished.
2. Press **F8** in the FiveM main menu to open the console.
3. Type `connect` followed by the address, for example `connect 203.0.113.10:30120`, and press Enter.

The first join downloads the server's resources, which can take a while on a full roleplay server. A new server can take a while to appear in the FiveM server list, and it only shows while the server is started. Connecting by address always works.

## What are the catches with a free FiveM server?

- **It is only online while your PC is.** Turn it off for the night and the city is gone for everyone.
- **Your PC is shared.** Running GTA V, FiveM, FXServer and MariaDB at once is heavy, and your own game will stutter as the server works harder.
- **Port forwarding can be impossible** behind CGNAT.
- **Your home IP is public.** Every player who joins sees it, and FiveM servers are a common target for DDoS attacks. A home connection has no protection.
- **Upload speed.** Home connections often upload far slower than they download, which makes first joins slow and can cause lag on a full server.
- **You are the sysadmin.** Updates, backups and database security are your job.

"Free FiveM hosting" offers deserve care too. A FiveM server needs real RAM, a database and an open port around the clock, which costs a host money, so free plans usually come with low RAM, few slots, forced shutdowns, ads or no database. They can do for a quick test. Our guide to [free vs paid game server hosting](https://gamezservers.com/guides/free-vs-paid-game-server-hosting) covers what to look for.

## How do you add scripts, cars and maps?

Resources go in the `resources` folder of your server data. Only use resources you have the rights to, including paid ones from Tebex and the Cfx.re forum.

1. Upload the resource's folder. On our servers use the **Files** tab or SFTP.
2. Add an `ensure` line in `server.cfg` (txAdmin's **CFG Editor**):

   ```
   ensure my-car-pack
   ensure my-mlo-map
   ```

3. In txAdmin's **Resources** page, press **Refresh**, then **Start** next to it. Only that script starts or restarts, and players stay on.

## Backups, updates and upgrades

- **Backups:** on our servers, press **Backup** before a big change. Each server keeps 3, and the database is included. At home, copy your `txData` folder and export the database.
- **Updates:** FiveM releases new server builds often, and txAdmin warns when yours is too old. On our servers press **Update game** to install the build in your **FXServer build** setting: Recommended (the default and safest), Latest, or an exact build number. At home, download a newer recommended artifact and extract it over the `server` folder. Your resources, `server.cfg` and txAdmin data stay either way.
- **Upgrading:** if the server runs out of memory as you add resources, move to a bigger plan in **Settings**.

## Common problems

- **License key errors:** usually a key copied with a space, a key deleted or regenerated on the portal, or a key changed in our Settings while txAdmin still uses the old one. Once a recipe is deployed, change the key in txAdmin's CFG Editor (`sv_licenseKey`) as well. See [fixing FiveM license key errors](https://gamezservers.com/guides/fivem-server-license-key-error).
- **"Missing server data" in the server list:** fill in the server's details at portal.cfx.re under **Servers**.
- **"Couldn't load resource" for a framework script:** the database connection failed. Check `mysql_connection_string` and that MariaDB is running.
- **Stuck downloading on join:** let a big first download finish. If it keeps failing, clear the FiveM cache (the `cache`, `server-cache` and `server-cache-priv` folders in FiveM's data folder) and join again.
- **Friends time out but you can join:** port 30120 is not forwarded on both TCP and UDP, the firewall blocks FXServer, or your provider uses CGNAT.
- **txAdmin says the server is outdated:** update FXServer as above.

## FAQ

### Is it free to make a FiveM server?

Yes. FXServer, txAdmin and the Cfx.re license key are all free, and you can run them on your own PC. You only pay if you rent hosting.

### How much does it cost to host a FiveM server?

With us, from 9.99 USD a month for 4 GB. A typical QBCore or ESX roleplay server runs well on 8 GB at 19.99 USD. New customers get 50% off the first month, and the bill can be split with up to 10 people.

### How many players can join a FiveM server?

Up to 48 with OneSync Infinity on the free license key. More slots need a paid Element Club subscription. At home, your PC and connection are usually the limit long before 48.

### Does a FiveM server need GTA V installed?

No. Only players need a legal copy of Grand Theft Auto V for PC, including you if you want to play.

### Can I run a FiveM server on Linux?

Yes. Linux builds are on the same artifacts site, and txAdmin works the same way.

### Can I use my existing server files?

Yes. Upload your resources and `server.cfg` in the **Files** tab or over SFTP. On the txAdmin type, choose **Existing Server Data** during setup and point it at the folder with your `server.cfg`. On Plain FXServer, put your `server.cfg` and `resources` folder in the main folder. Moving from a home server, also export your database and import it into the new one.

### Is GamezServers affiliated with FiveM or Rockstar?

No. GamezServers is not approved, sponsored or endorsed by Rockstar Games or Cfx.re. Every server must follow the [FiveM terms](https://fivem.net/terms).

See [FiveM server hosting](https://gamezservers.com/games/fivem) to pick a plan and get your city online.
