Skip to main content
Back to Category

How to Set Up a FiveM Server: Step-by-Step Guide

Complete FiveM server setup guide on REXE VDS: installation, txAdmin configuration, port settings, and performance optimization tips for GTA V roleplay servers.

Read time: 12 min Game Server Setup
fivemgtaroleplaytxadmingame serversetupfivem install
Author
REXE Teknoloji Network & Security Team
Editor
REXE Teknoloji Technical Editorial
First published
Last updated

Introduction

FiveM is a modification framework for GTA V that allows you to run custom multiplayer servers. This guide covers the complete FiveM server setup process on your REXE VDS server, including txAdmin configuration and optimization.

Minimum recommended specs for a FiveM server: 4 CPU cores, 8GB RAM, 50GB NVMe SSD.

Prerequisites

  • A REXE VDS server with Linux (Ubuntu 22.04 recommended)
  • SSH access to your server
  • A Cfx.re account and license key
  • Path Panel firewall rules configured

Step 1: System Preparation

hljs bash
# Update system
sudo apt update && sudo apt upgrade -y

# Install required packages
sudo apt install -y wget git curl xz-utils screen

# Create FiveM user
sudo adduser fivem --disabled-password --gecos ""
sudo su - fivem

Step 2: Download FiveM Server

hljs bash
# Create server directory
mkdir -p ~/fxserver
cd ~/fxserver

# Download latest FiveM server build
wget https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/latest/fx.tar.xz

# Extract
tar -xf fx.tar.xz
rm fx.tar.xz

Step 3: txAdmin Setup

txAdmin is the built-in web-based management panel for FiveM servers.

hljs bash
# Start the server for first-time txAdmin setup
cd ~/fxserver
./run.sh

After starting, txAdmin will display a PIN code in the console. Open your browser and navigate to:

http://SERVER_IP:40120
  1. Enter the PIN code displayed in the console
  2. Log in with your Cfx.re account
  3. Follow the setup wizard to configure your server
  4. Enter your Cfx.re license key when prompted

Save your txAdmin credentials securely. You'll use them to manage your server through the web interface.

Step 4: Port Configuration

FiveM requires the following ports:

PortProtocolPurpose
30120TCP + UDPGame server
40120TCPtxAdmin web panel

Path Panel Rules

Create the following rules in the REXE Path Panel:

hljs yaml
# Game server port
Protocol: UDP
Destination Port: 30120
Filter: Grand Theft Auto (if available)
Comment: "FiveM game port"

# Game server TCP
Protocol: TCP
Destination Port: 30120
Filter: -
Comment: "FiveM TCP port"

# txAdmin panel (restrict to your IP)
Protocol: TCP
Destination Port: 40120
Filter: -
Comment: "txAdmin panel access"

Restrict txAdmin port (40120) to your IP address only. Do not open it globally.

Step 5: Server Configuration

Edit your server.cfg file:

hljs bash
# Server name
sv_hostname "My REXE FiveM Server"

# Max players
sv_maxclients 64

# License key
sv_licenseKey "your_license_key_here"

# Server tags
sets tags "roleplay, custom"

# OneSync (recommended for 32+ players)
set onesync on

Step 6: Running as a Service

Create a systemd service for automatic startup:

hljs bash
sudo nano /etc/systemd/system/fivem.service
hljs ini
[Unit]
Description=FiveM Server
After=network.target

[Service]
Type=simple
User=fivem
WorkingDirectory=/home/fivem/fxserver
ExecStart=/home/fivem/fxserver/run.sh
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target
hljs bash
sudo systemctl daemon-reload
sudo systemctl enable fivem
sudo systemctl start fivem

Performance Optimization

  • Enable OneSync for better performance with many players
  • Use server-side resource loading where possible
  • Monitor RAM usage — FiveM can be memory-intensive
  • Use NVMe SSD for faster resource loading
  • Regularly update server artifacts

For servers with 64+ players, we recommend at least 8GB RAM and 6 CPU cores.

Frequently Asked Questions

What are the minimum requirements for a FiveM server?

Minimum 4 CPU cores, 8GB RAM, and 50GB NVMe SSD. For 64+ player servers, 6+ cores and 16GB RAM are recommended.

How do I access the txAdmin panel?

Open http://SERVER_IP:40120 in your browser. On first setup, enter the PIN code shown in the server console.

Why is my FiveM server not showing in the server list?

Make sure your license key is correctly set in server.cfg, ports 30120 (TCP and UDP) are open in Path Panel, and the server is running without errors.

How do I update FiveM server artifacts?

Download the latest artifact from runtime.fivem.net, extract it to your fxserver directory, and restart the server. Check the FiveM forums for the latest recommended build.

Related Articles

How to Set Up a Rust Server: Oxide Plugin Guide

Complete Rust dedicated server setup guide on REXE VDS: SteamCMD installation, Oxide/uMod plugin system, server configuration, performance tuning, and wipe management.

10 min
ruststeamcmdoxide
Network TrafficInbound GbpsOutbound Gbps