A FiveM server is a game server and a small web application at the same time: the FXServer process runs the city, txAdmin manages it from a browser, and a database holds every player's inventory and car. The install is mostly clicking through txAdmin; the preparation is what this guide is for.
Size and OS
Ubuntu 22.04 or 24.04. 8 GB of RAM for a whitelisted city of around 32 slots with a lean resource list; 16 GB for 64 to 128 slots on OneSync with the usual 200 resources and MLOs. FXServer runs the main loop on one thread, so a plan with priority vCPU matters; a crowded core shows up as the city "hitching".
The database
sudo apt update && sudo apt install -y mariadb-server
sudo mysql_secure_installation
sudo mysql -e "CREATE DATABASE fivem; CREATE USER 'fivem'@'localhost' IDENTIFIED BY 'a-long-password'; GRANT ALL ON fivem.* TO 'fivem'@'localhost';"
Keep the database on the same VPS. Every inventory check is a query, and a database across the network is the most common cause of a slow city.
FXServer
sudo useradd -m -s /bin/bash fivem && sudo su - fivem
mkdir -p ~/server/artifact ~/server/data && cd ~/server/artifact
Download the latest recommended Linux artifact from the Cfx.re artifacts page (a fx.tar.xz), then:
tar xf fx.tar.xz && cd ~/server/data
~/server/artifact/run.sh
The first run starts txAdmin and prints a PIN and a URL on port 40120. Open it in a browser, enter the PIN, create the admin account.
The licence key
A free Cfx.re licence key from the Keymaster portal, tied to the server's public IP. Our dedicated IPv4 is static, so the key stays valid. txAdmin asks for it during setup.
The framework recipe
txAdmin's setup wizard offers recipes: ESX Legacy, QBCore and others. Pick one, give it the database details, and it downloads the framework and its resources and imports the SQL. Twenty minutes later you have a working city with jobs, inventory and vehicles. Custom resources go in resources/ and get an ensure line in server.cfg.
Ports and the firewall
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udp
sudo ufw allow from YOUR.OFFICE.IP to any port 40120
sudo ufw enable
Players use 30120. txAdmin's 40120 should be reachable only from your own IP, or over an SSH tunnel; it is an admin panel on the public internet otherwise.
Keeping it running
txAdmin has its own scheduler: restarts, announcements, a watchdog that restarts a crashed server. Set a nightly restart; FXServer with 200 resources does not like running for a week. Keep the artifact updated when Cfx.re recommends a new build; txAdmin tells you.
DDoS
RP cities are attacked constantly, usually by someone who was banned. Our gaming plans include game-protocol filtering with port isolation, so an attack on your city is absorbed before it reaches the server and does not spill onto the node. On other hosts, ask before you go public.
Questions we get asked
Linux or Windows for FiveM? Both work; Linux uses less RAM and is what most hosts run. Windows if your team only knows Windows.
How many slots on 8 GB? Around 32 with a lean resource list. Beyond that, 16 GB and OneSync.
Can I run RedM on the same stack? Yes, same artifact, same txAdmin, a RedM licence key.
Do you install it? Yes, on request: artifact, txAdmin and MariaDB ready, you add the key and pick the recipe.
Why is my city slow? Nine times in ten: a database somewhere else, a single slow resource, or the server on a shared core. The txAdmin resource monitor shows the second.



