
- ESX
By Luke

This guide sets up a FiveM server for GTA V Legacy using FXServer and txAdmin on Windows or Linux. You will create a server registration key in Cfx.re Portal, deploy the default recipe, review the configuration and test a connection. Add a roleplay framework after the basic server works.
| Requirement | What to prepare |
|---|---|
| Cfx.re account | Use your account for Portal registration and the txAdmin account link. |
| A server host | A local PC for learning, or a host that supports FXServer. Check access to files, the console, firewall settings and backups before choosing a service. |
| A player client | To join this Legacy server, use a legitimate GTA V Legacy installation and the matching FiveM client. GTA V does not need to be installed on the server host. |
| Windows tools | An archive utility that opens .7z files, such as 7-Zip. |
| Linux tools | A non-root account for running FXServer, a download tool and support for extracting .tar.xz archives. Package commands below are for Debian/Ubuntu. |
There is no useful player-capacity guarantee based only on RAM or CPU specifications. Resource code, streamed assets, the database and simultaneous activity all affect demand. Start with a small test configuration and measure it before paying for more capacity.
The commands below cover GTA V Legacy and FXServer. At the source-review date shown below, Cfx.re describes FiveM for GTAV Enhanced as an early-access release. Enhanced uses separate Cfx Server binaries, including cfx-server.exe on Windows, and has changes that can require resource or configuration updates.
For Enhanced, read the official migration and breaking-change notes before selecting a framework or moving a server. Check asset, voice and Asset Escrow support for the current release. Our Legacy and Enhanced comparison explains the choice; renaming an executable is not a migration procedure.
server.cfg, the corresponding setting is sv_licenseKey.The current Cfx.re registration instructions use a display name; they do not ask for the first-use public IP described in older Keymaster tutorials. Keep the key out of public repositories, screenshots and shared logs. If it leaks, regenerate it in Portal and update your server configuration.
Use the official Server Download page, select FiveM for GTA V Legacy and your operating system, then download the recommended build. Copy the current download URL from that page rather than reusing a build number from a tutorial.
C:\FXServer\server for the server binaries.server.7z and extract its contents into that directory.Install the download and extraction tools with an account allowed to manage packages. Run FXServer itself as your dedicated non-root user.
sudo apt update
sudo apt install ca-certificates wget xz-utils
mkdir -p ~/FXServer/server
cd ~/FXServer/server
wget -O fx.tar.xz 'PASTE_RECOMMENDED_LINUX_URL_HERE'
tar -xf fx.tar.xz
Replace PASTE_RECOMMENDED_LINUX_URL_HERE before running the download command. Stop and resolve any download or extraction error before continuing. For other distributions, use their package manager and check the official Linux setup requirements.
txAdmin is included with current FXServer builds. Start it without +exec server.cfg; txAdmin will manage the server configuration through its setup flow.
FXServer.exe from the extracted directory.bash ~/FXServer/server/run.sh.Read the console for the setup URL and PIN. The default txAdmin web port is 40120 TCP. On the server machine, open http://127.0.0.1:40120. A managed host may provide its own URL or port.
For a remote host with SSH access, you can open a tunnel from your own computer, keep it running and then visit that same local URL:
ssh -N -L 127.0.0.1:40120:127.0.0.1:40120 user@YOUR_SERVER_IP
Replace the SSH username and server address. Restrict direct access to the admin port through your host's access controls or firewall; a tunnel does not itself close a publicly exposed port. Players do not need access to txAdmin to join.
server.cfg, then open Recipe Deployer.The default recipe is a basic server without a complete roleplay economy. It lets you check the server before introducing framework and database dependencies. If deployment fails, keep the first relevant error from the console and resolve it before retrying.
Give staff their own accounts through txAdmin's Admin Manager. Grant only the actions they need: viewing a console, executing commands, editing configuration and managing other admins are separate permissions. Framework roles and server ACE rules require their own configuration.
Edit the existing values in the configuration generated by the recipe. Keep its resource-start lines. This excerpt illustrates a small test server; it is not a replacement for the complete file:
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
sv_hostname "My Legacy test server"
sets sv_projectName "My Legacy test server"
sets sv_projectDesc "A basic server for connection testing"
sets tags "test"
sv_maxclients 8
set onesync on
sv_licenseKey "REPLACE_WITH_YOUR_KEY"
| Setting | Check |
|---|---|
endpoint_add_tcp and endpoint_add_udp | Use the port assigned by your host. The examples use 30120 for both protocols; firewall rules and connection commands must match. |
sv_maxclients | This sets the player cap, not a performance guarantee. Higher limits may require a Cfx.re subscription; check your current Portal entitlements. |
sv_projectName and sv_projectDesc | Set meaningful values for the server listing. |
sv_enforceGameBuild | Only add a game-build requirement after checking the documentation for your resources and the supported builds for your server branch. |
The server.cfg guide explains the configuration in more detail. You can also review the server.cfg generator and other server tools; check any generated values against your recipe and host.
For players on other machines, allow the configured game port through the operating-system firewall and any hosting-provider firewall. The examples below use 30120 TCP and UDP. Keep the separate txAdmin port restricted to administrators.
New-NetFirewallRule -DisplayName "FiveM TCP" -Direction Inbound -Protocol TCP -LocalPort 30120 -Action Allow
New-NetFirewallRule -DisplayName "FiveM UDP" -Direction Inbound -Protocol UDP -LocalPort 30120 -Action Allow
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udp
sudo ufw status
Check the resulting rules and preserve the access you use to manage the host. These commands do not configure an upstream firewall or router.
If you host behind a home router, forward the game port for both protocols to the server PC's local address. Confirm that your connection permits incoming public traffic. A public home-hosted server exposes your home connection's public address; choose the hosting location with that in mind.
Open the Legacy FiveM client, press F8 and use the address appropriate to your test. Replace the example address labels and port as needed.
| Test | Client command |
|---|---|
| Client and server on the same PC | connect 127.0.0.1:30120 |
| Another PC on the same local network | connect SERVER_LAN_IP:30120 |
| A player outside your network | connect SERVER_PUBLIC_IP:30120 |
Join the world, move around, disconnect and reconnect while watching the server console. For a public server, have a player test from a different network: a successful local join does not establish public reachability.
You can also check http://SERVER_PUBLIC_IP:30120/info.json from outside the server network. A JSON response checks the HTTP endpoint; it does not prove that UDP traffic or the complete joining process works. Keep the external client test.
Once these checks pass, back up the working data directory and txAdmin configuration securely before making further changes.
Choose a framework around the resources you intend to use and the interfaces your team can maintain. Compare the options in our FiveM framework guide.
| Framework | Compatibility checkpoint |
|---|---|
| QBCore | Check that your resources support the QBCore APIs and dependencies used by the installed version. |
| Qbox | Its QBCore bridge covers many resources that use documented interfaces. Scripts that access internal tables or files can need changes. The installation guide requires MariaDB and does not support MySQL or XAMPP. |
| ESX Legacy | Use ESX-compatible resources and follow the current ESX recipe and database instructions. |
Read the framework's current installation guide before deployment. Use a fresh data directory and an empty test database for the recipe. Give the application a dedicated database account, keep credentials private and verify character creation and persistence before adding more resources.
resources/ directory, for example resources/[local]/example_resource. Inspect its supplied fxmanifest.lua and installation instructions.ensure example_resource after its required dependencies in server.cfg.For custom gameplay scripts, validate sensitive actions on the server using server-side permissions and state. Client-side checks alone cannot protect item grants, payments or privileged actions.
Keep backups of resources, configuration and any database, and test a restore. Review release notes and try updates on a separate copy before replacing a working installation. Use logs and measurements to investigate problems; scheduled restarts do not resolve their underlying cause.
| Symptom | What to check next |
|---|---|
no license key was specified | Check sv_licenseKey in the configuration actually loaded by txAdmin. For a manual launch, also check the data directory and +exec server.cfg; do not add that argument to the txAdmin startup command. |
Failed to start resource | Read the preceding error. Check the resource folder, manifest, dependencies and start order; the message alone does not identify one cause. |
| Connection times out or is refused | Confirm that FXServer is running, then check the selected address, both game-port protocols, host firewall and router or provider rules. |
| Direct connection works but the server is absent from the list | Allow time for listing updates. Check sv_projectName, sv_projectDesc and any sv_master1 "" override against Cfx.re's server-listing guidance. |
| txAdmin cannot be reached | Check the URL and port printed by the console, the process and your admin-access rules. 127.0.0.1 in a browser refers to the machine running that browser unless you have set up the tunnel above. |
| FXServer stops responding | Inspect logs around the first failure, recent resource changes and host CPU, memory and storage usage. Keep that evidence before restarting. |
For further diagnosis, use the FiveM error guide and the official server-issues documentation below.
A basic FXServer installation does not need a paid framework. Budget separately for hosting, any licensed resources and Cfx.re subscriptions required by the features you choose. If you plan to monetize the server, read the current Cfx.re Tebex guidance and linked policies before designing packages.
Choose an operating system your host supports and your team can administer. This guide gives both Legacy startup paths; package installation, service management and troubleshooting differ between systems.
Downloads, account access, networking and recipe dependencies determine the time. Treat successful connection checks as the first milestone. Framework configuration, resource integration and a tested recovery process are separate work before a public launch.
Technical source review: 10 October 2026. This article was checked against the linked documentation; the commands were not executed on a test server for this review.
Trying to appear in the FiveM server list? Read the Cfx Portal and listing troubleshooting guide.





