What you need
A FiveM server is a separate program that you run yourself. It does not pull content from Rockstar; it brings its own game logic — which you either write or take from a ready-made framework.
- A legally purchased copy of Grand Theft Auto V. That applies to you and to everyone who wants to play on your server.
- A machine for the server to run on, and file access to it. Without being able to copy folders you cannot install any resources.
- An account with Cfx.re, the makers of FiveM. That is where you get the server key, without which the server accepts no connections.
- Time. The FiveM part is done in an afternoon; a server worth roleplaying on is the work that comes after.
You do not need Node.js, a database or a command line for RPFX. What is needed at runtime is part of the FiveM server itself.
Where the server runs
Three routes are common, and they differ less in technology than in how much you administer yourself.
- Your own machine — for trying things outCosts nothing and is set up in minutes. The server is reachable only by you and your home network unless you change something on your router. Entirely good enough for learning and building.
- A rented game serverA provider hands you a ready-made FiveM installation, usually with a web interface for starting and stopping it. Make sure you get real file access — without it you cannot install resources of your own.
- Your own root server or VPSThe most freedom and the most responsibility: operating system, hardening and backups are yours. The usual route as soon as more than a handful of people play at once.
What matters in all three cases: you must be able to copy folders into the server's directory. Everything else is a matter of taste.
Server files, key, server.cfg
The server files — called artifacts in the FiveM world — come from Cfx.re themselves and are republished regularly. You will find the right download and the step-by-step version of this section in the official FiveM documentation under "Setting up a server"; it is the most reliable source for this because it moves along with the artifacts.
Three things then belong together:
- The unpacked artifacts — the server program itself.
- A folder for the server data with a resources subfolder, which is where every resource goes later.
- A server.cfg — the configuration file read at startup. It holds the server name, the player slots, the server key and the list of resources to load.
You issue the server key yourself in the Cfx.re portal. It is tied to your account and should be treated like a password: not in a screenshot, not in a public repository.
txAdmin already ships with the artifacts — a web interface that walks you through the initial setup, starts and stops the server and shows the logs. It is recommended but not required; everything can be done by hand as well.
The first start
On the first start you should see three things: the server reports in its own window or log, it accepts the key, and you can connect to it with FiveM — via the direct address for a server on your own network.
What you get at this point is an empty server: a city you can walk around in and drive cars in. No character that is still there next time, no inventory, no money, no jobs. That is not a fault, it is the state it ships in.
The question that comes next
Everything that makes a roleplay server comes from resources somebody wrote: that a character is saved, that money exists, that a car boot holds something, that a police faction has different rights from everyone else. A bundle of such resources, tuned to work together, is called a framework.
The choice at this point determines how you will work for the next few months — whether you configure in Lua files or in a user interface, and how easily you can bring someone onto the team who does not program. Which ones exist and how to decide is on a page of its own.
Setting up RPFX
If you decide on RPFX, this is what the way looks like. It takes about 15 minutes and runs once per server; there is no command to type anywhere in it.
- Download the packageSign in with Discord on rpfx.org and download the current rpfx-core package as a ZIP in the server portal.
- Copy the filesUnpack the ZIP. The rpfx-core folder goes into resources, the rpfx.cfg next to the server.cfg.
- Adjust server.cfgOne line into the server.cfg so the rpfx.cfg is read at startup: exec rpfx.cfg. The ensure rpfx-core is already in the rpfx.cfg and does not additionally belong in the server.cfg.
- Start and connectStart the FiveM server. A connect link appears in the server console: open it, sign in with Discord and pick your server or create a new one. The resource fetches the token itself – there is nothing to enter by hand.
The one line that belongs in the server.cfg:
exec rpfx.cfgIf you prefer to enter the token yourself – for slaves, for automation or when no console is at hand – the former way works unchanged: issue the token in the portal and enter it into the rpfx.cfg. This is what the file looks like as it ships; a token entered here takes precedence, and no connect link appears.
set rpfx_master_server "https://data.rpfx.org"
set rpfx_master_token "xxx-xxx-xxx"
ensure rpfx-coreBefore you connect yourself: in FiveM, go to Settings → Linked Accounts → link Discord once and restart FiveM. RPFX identifies players by their Discord ID; without the link every connection attempt is rejected, including the server owner's.
Your admin character already exists — created when the server was connected, with all rights. In the character selection it appears under the server name with the surname "Superadmin".
When it does not work
The most common situation after a fresh setup is that the resource has never reported in. Check in this order:
- Is ensure rpfx-core in the rpfx.cfg, and is the rpfx.cfg loaded from the server.cfg via exec rpfx.cfg? If either is missing the resource never starts — with no error message, because nobody asked for it.
- Is there an RPFX connect link in the server console? Then the server is not connected yet – open the link and sign in with Discord. Only if the token was entered by hand: does it match the one from the portal? A wrong token is rejected, and the server log says why.
- Is the rpfx-core folder really under resources — and named exactly that? FiveM will not find an "rpfx-core-main" left over from an unpacked ZIP.
- What does the FiveM server log say? Messages from rpfx-core appear there in plain text and name the reason.
An npm install is not part of this, even though older guides still say so. The package brings its dependencies with it; a node_modules folder next to the resource is superfluous, not missing.
Anyone who can connect but is dropped again immediately usually has no Discord link in FiveM. The kick states the reason in plain text — but only after it has gone wrong.
The detailed version including every failure mode is available as a text file you can hand to an AI: