How to Make a FiveM Server: License Key, txAdmin, Ports

Short answer: To make a FiveM server you need a Linux server, a free license key from the Cfx.re Portal, and two ports: 30120 (TCP and UDP) for players and 40120 (TCP) for txAdmin. With a web panel like ServerSheriff you connect your server, pick FiveM, paste in the key and finish the setup in txAdmin in your browser. Doing it by hand works too, it just takes longer.

Last checked: 22 Oct 2026. FXServer recommended build 35245, txAdmin 8.1.1.

→ Try ServerSheriff for free Free plan: 1 node, up to 5 applications, no credit card.

Panel or by hand?

With ServerSheriffBy hand
Command line needednoyes
Server setupthe panel installs everything, Docker includedyou set up the server files, folders and service
License keypasted into server.cfg in the file managerpasted into server.cfg over SSH
txAdminaddress and PIN shown on the dashboardstart it yourself, find the address in the log
Backupsone click or on a scheduleyour own script
More games and a databasesame panela separate setup for each

Just want to get your crew on the streets of Los Santos? Go with option 1. Want every file under your own control? Option 2.

What is FiveM?

FiveM is a multiplayer mod for Grand Theft Auto V. It lets you play on your own servers with your own rules, cars, maps and scripts, roleplay being the big one. FiveM is built by Cfx.re, which has been part of Rockstar Games since August 2023. Only download FiveM and the server files from the official sites, fivem.net and docs.fivem.net.

The server software is called FXServer. It comes with txAdmin, a web interface for running the server from your browser: restarts, players, bans, resources.

What you need

  • Your own Linux server (VPS or dedicated). For ServerSheriff it has to be a fresh Debian 13 install with nothing else running on it.
  • Memory: Cfx.re does not publish fixed minimums, and ServerSheriff doesn’t enforce any either. An empty server with the default resources needs little. Every framework, car pack and script adds to that. Start small and check Monitoring in the panel to see what the server really uses.
  • Ports: 30120 TCP and UDP for players, 40120 TCP for txAdmin (admin only).
  • A Cfx.re account, free via the Cfx.re forum. You need it for the license key and to log in to txAdmin.

You do not need GTA V on the server. Only your players need the game on their PCs.

Option 1: FiveM server with ServerSheriff

FiveM server: what you need

ServerSheriff is a web panel for game servers. You bring your own server, the panel sets it up, and you run everything from your browser. ServerSheriff does not rent out servers.

Step 1: Sign up and connect your node

  1. Sign up at cp.serversheriff.com. The Free plan costs nothing and needs no credit card.
  2. Click Create Node. A node is your Linux server inside the panel.
  3. Enter your server’s IP address, SSH port and root password.
  4. The panel connects and installs everything it needs, Docker included. You do not type a single command.

ServerSheriff only needs the root password for the setup. After that the panel logs in with its own SSH key. Once the node shows as ready, you can change the root password.

Step 2: Get a license key from the Cfx.re Portal

  1. Open the Cfx.re Portal and log in with your Cfx.re account.
  2. Click the big + to register a new server.
  3. Fill in the details and click Generate Key.
  4. Open your new server in the Portal and click Copy Key.

The key is free. Treat it like a password and never post it anywhere.

Step 3: Create the game server

  1. Click Gameserver Create.
  2. Pick your Node and give the server a Title.
  3. Leave Assign port automatically on. The panel finds free ports for you.
  4. Set CPU Cores, Memory and Storage.
  5. Slots is the player limit (default: 32). The panel writes it into server.cfg every time the server starts.
  6. Under Game pick FiveM, and under Game Version pick the server build. Take the newest build in the list. The panel doesn’t mark any build as recommended.
  7. Save.

You can ignore Update At Start for FiveM. It only does something for games the panel updates through SteamCMD. With FiveM you update by switching to a newer build (see below).

Under Startup there is only one field, Custom Arguments, for extra launch options. Everything else lives in server.cfg.

Step 4: Add the key to server.cfg

The panel creates server.cfg on the first start, so start the server once. Then:

  1. Open Files on your game server. The file manager opens straight in the folder with server.cfg.
  2. Open server.cfg. The last line reads sv_licenseKey "".
  3. Paste your key between the quotes: sv_licenseKey "your-key".
  4. Save and restart the server.

Server name, description, language and icon for the server list are set in the Cfx.re Portal, not in this file.

Without a valid key FXServer will not start properly, and the log shows no license key was specified.

Step 5: Set up txAdmin

As soon as txAdmin is ready, the panel shows a txAdmin Setup box on the Dashboard with the address and a PIN.

  1. Open the URL from the box in your browser (it looks like http://your-server-ip:40120).
  2. Enter the PIN from the box.
  3. Click Link Account and log in with your Cfx.re account.
  4. Set a password for txAdmin.
  5. Enter a server name for txAdmin.
  6. Under Deployment Type, choose Existing Server Data.
  7. For the folder, use the path shown under Local Server Data Directory (/home/container/data/cfx-server-data/). For the config file, use the path under Server CFG File (/home/container/data/server.cfg).
  8. Click Save & Start Server.

If the box doesn’t show up on the Dashboard, read the URL and PIN straight from the game server’s Console. The box disappears once setup is done.

For roleplay frameworks like ESX or QBCore, txAdmin has ready-made templates under Popular Recipes. Most of them need a MySQL or MariaDB database, which you can add in ServerSheriff in a few clicks. It counts as one application on the Free plan. We haven’t tested these templates with ServerSheriff yet. The safe route is Existing Server Data as described above.

Step 6: Test the connection

Launch FiveM on your PC, press F8 and type connect your-server-ip:30120. Use the port the panel lists under Port with the Connect tag. How your players join is covered in How to join a FiveM server.

In game, open the txAdmin menu by pressing F8 and typing tx.

Step 7: Backups and schedules

  • Backups: create and restore them in the panel with one click.
  • Schedules: run backups, restarts or commands at set times. A good start: a backup every night, then a restart.
  • txAdmin can schedule restarts too. Use one or the other, or your server restarts twice.

Tip: Turn on Two-Factor Authentication in the panel. Whoever has your panel account controls your servers.

More about FiveM in the panel: FiveM servers with ServerSheriff

→ Try ServerSheriff for free

Option 2: FiveM server by hand

To be upfront: Cfx.re only offers the Linux build of FXServer as a courtesy, and bugs get fixed faster on Windows. It still runs fine on Linux. You need SSH access and some command line experience. FiveM is not a Steam server, so you do not need SteamCMD.

  1. Create a separate user for the server. Do not run FXServer as root.
  2. Install the tools: sudo apt install xz-utils git
  3. Grab the recommended Linux build from the official download page and unpack it:
mkdir -p ~/FXServer/server && cd ~/FXServer/server
wget "<link to the recommended Linux build>"
tar xf fx.tar.xz
  1. Clone the default resources into their own folder:
git clone https://github.com/citizenfx/cfx-server-data.git ~/FXServer/server-data
  1. Create a server.cfg in ~/FXServer/server-data. There is a template in the official guide. Put your key in sv_licenseKey.
  2. Start it:
cd ~/FXServer/server-data && bash ~/FXServer/server/run.sh +exec server.cfg

If you run run.sh without +exec server.cfg, txAdmin starts on port 40120 instead. The setup then works like step 5, except there is no panel box: the PIN is in the log.

To keep the server running after you log out and bring it back after a reboot, you need a systemd service, or at least tmux. You open ports 30120 TCP and UDP in your firewall yourself. Updating means downloading a new build, replacing the old folder and restarting. Backups are up to you.

Key settings in server.cfg

LineWhat it does
sv_licenseKey "…"your key from the Portal, required
sv_maxclients 32player limit. On ServerSheriff it comes from Slots and is overwritten on every start.
endpoint_add_tcp / endpoint_add_udpthe server port. ServerSheriff sets these, leave them alone.
set onesync onOneSync, on by default. Required from 32 players up.
ensure namestarts a resource. One line per resource.
set steam_webApiKey ""optional, only for Steam login
#sv_master1 ""keep the #. Without it your server shows as private and the connect button in the list is disabled.

Server name, description, language and icon are managed in the Cfx.re Portal now. Cfx.re marks lines like sv_hostname and sets locale in server.cfg as deprecated.

More than 48 players: your Cfx.re account needs a subscription at the “Element Club Argentum” tier or higher. Without one you are capped at 48 slots.

Resources, data and updates

FiveM server: key settings in server.cfg
  • Resources (scripts, cars, maps) go as folders into the resources folder inside your server data folder, for example in the [local] subfolder. The txAdmin Setup box shows the server data folder (/home/container/data/cfx-server-data/). The file manager opens data/, from there go to cfx-server-data/resources/. Start each one with an ensure name line in server.cfg. Upload them with the file manager or over SFTP.
  • Saved data: FiveM has no world save like Minecraft. Whatever persists lives in your resources and, with frameworks like ESX or QBCore, in the database. Back up both: the game server backup and the database backup.
  • Updates: Update At Start does nothing for FiveM, and you can’t change the build of an existing game. To update, go to the Game page of your game server, add a new game with the newer build and activate it. The new game gets its own folder. Your server.cfg and your resources don’t move over on their own. Copy them from the old folder to the new one over SFTP. Take a backup first. You don’t need the Update Service button for this.
  • Why updating matters: Cfx.re only supports old builds for a few weeks. Once a build is more than three months old, players can no longer join your server from the server list.

Common problems

  • no license key was specified: the key is missing or not between the quotes. Check the last line of server.cfg.
  • Server not in the list: it can take up to 8 minutes after start. To see if it is running, open http://IP:30120/info.json in your browser.
  • Nobody can get in: port 30120 has to be open for TCP and UDP, including your provider’s firewall. More in “Game server not reachable“.
  • Server stuck at 48 slots: more requires a Cfx.re subscription (see above).
  • Your sv_maxclients change is gone after a restart: the panel overwrites it. Change Slots in the panel instead.
  • Red “End of Life” message when connecting: the build is too old. Switch to a newer one as described under Updates above.

Docker publishes ports past ufw. How to lock the server down properly anyway is covered in How to secure a game server.

FAQ

Does the license key cost anything?
No. You get it for free in the Cfx.re Portal. You only pay for a subscription if you want more than 48 slots.

Do I need GTA V on the server?
No. The server only runs FXServer. Your players need GTA V and FiveM on their PCs.

Can I use ESX or QBCore?
txAdmin has templates for both. They need a MariaDB or MySQL database, which you can create in ServerSheriff. We haven’t tested these templates with ServerSheriff yet.

How many players fit?
As many as you set under Slots, up to 48 without a subscription. How many run smoothly depends on CPU, RAM and your resources.

Is FiveM allowed?
FiveM is made by Cfx.re, which is part of Rockstar Games. Stick to the Cfx.re rules and only download from the official sites.

With ServerSheriff

ServerSheriff is a web panel for your own server. Connect it once, then manage game servers, databases and Docker in your browser. The Free plan costs nothing, needs no credit card and includes 1 node and up to 5 applications.

→ Try for free · Manage game servers and databases with ServerSheriff