Skip to main content
TRACK A·INSTALL YOUR SERVER·Verified June 2026 · Lua 5.4 · ox_lib 3.x
Learning with an AI assistant?
Copies this lesson plus 2026 ground rules (no lua54 'yes', Cfx.re Portal, correct callback signatures) as a ready-to-paste mentor prompt.
Step 01

Install the FiveM client

Before you can write a single line of Lua you need a working FiveM. Ten minutes here removes most of the "nothing works" feeling later. You will download FiveM.exe, point it at your real GTA5.exe, let it cache the game data once, and sign in with Cfx.re so every server can verify it is you.

You'll do
Download the FiveM client, point it at your GTA V install, update game data, and sign in with Cfx.re.
Time
~10 minutes (plus download time)
You need
A legal copy of GTA V on Steam, Epic, Rockstar Games Launcher, or Xbox Game Pass PC / Microsoft Store (already updated). A working internet connection.
You'll learn
What the FiveM client is -> where it lives on disk -> what Cfx.re is -> what "authorize" actually does
BEFORE YOU START

Build it

Download the FiveM client

FiveM.exe is sitting in your Downloads folder.

Only download FiveM from the official site. Do not run installers from mirrors, Discord attachments, or video descriptions.

Open this URL in your browser:

text
https://fivem.net/

Click the Download Client button. Read FiveM's Terms of Service, then click Sure, I agree!. The download starts and you end up with one file:

text
Downloads/FiveM.exe

This file is small. It is a few MB, not the full game. The big download comes later when FiveM caches the game data.

Run the installer and point it at GTA5.exe

FiveM knows where your GTA V install lives.

Double-click FiveM.exe. Windows may show a SmartScreen or antivirus warning. SmartScreen is the Windows reputation check that flags files it has not seen often. If you see a warning, stop and confirm the file came directly from fivem.net. Do not bypass a warning for a file from any other source.

When FiveM asks for your game, browse to your GTA V folder and select GTA5.exe. On the Xbox Game Pass PC / Microsoft Store version, FiveM auto-detects the install, so you usually will not be asked to browse. The default folders are:

text
Steam: C:\Program Files (x86)\Steam\steamapps\common\Grand Theft Auto V\
Epic: C:\Program Files\Epic Games\GTAV\
Rockstar: C:\Program Files\Rockstar Games\Grand Theft Auto V\

Pick GTA5.exe, not PlayGTAV.exe. They sit side by side in the same folder and are easy to mix up. PlayGTAV.exe is the launcher shortcut. GTA5.exe is the real game binary FiveM needs. Click Open to confirm.

GTA V not in the default path? Steam: right-click the game > Manage > Browse local files. Epic and Rockstar: check the launcher's install-folder setting to find where GTA V lives.

Let FiveM update game data

FiveM has built its local cache of GTA V assets.

A message says local game data needs to be updated. Click Yes. FiveM caches a stripped, signed copy of the GTA V data so it can boot into a server in seconds. An .rpf is one of the archive files GTA V stores its assets in. Caching them once means FiveM does not have to re-read every .rpf each time you join. This is a one-time job per machine.

Expect a few minutes on an SSD, longer on a hard drive. The progress bar moves visibly. Everything FiveM writes lives here:

text
%LocalAppData%\FiveM\

%LocalAppData% is a Windows shortcut to your user app-data folder. Paste it into the File Explorer address bar and it jumps straight there.

Sign in with Cfx.re

You see a Welcome screen with your username inside FiveM.

FiveM shows its Terms of Service. Read it and click I Accept. A window appears: Sign in with Cfx.re. Do not skip this.

Cfx.re is FiveM's identity platform. Identity means it is the account that proves who you are. One Cfx.re account covers the forum, your launcher sign-in, and the Cfx.re Portal at portal.cfx.re, where you will later generate the free license key your own server needs.

Click Sign in with Cfx.re. Your browser opens to:

text
https://forum.cfx.re/

No account? Create one now at forum.cfx.re (2 minutes), then continue. If you already have one, log in, then click Authorize. To authorize means you grant this copy of FiveM permission to act as you. It tells Cfx.re "this FiveM on this machine speaks for me". The token only proves your identity to servers you join. It does not hand FiveM your password, email, or billing, and you can revoke it any time at forum.cfx.re/my/preferences/account.

Prove the install with a quick connect

You can open the F8 console and reach a server.

Click Continue to land on the FiveM main menu with your username in the top right. The fastest proof is to connect to any public server. Click Play, search for one (for example "Grand Theft Hamlet"), and click Connect. If Grand Theft Hamlet is gone, pick any busy public server with low ping.

To talk to FiveM directly you use the in-game F8 console. The F8 console is the text window that opens when you press F8 in the game. It is where you type commands like connect. You will use this same console to reach your own local server in a later step, once you have one running.

Here 127.0.0.1 means "this same computer" (also called localhost), and 30120 is the port the FiveM server listens on. A port is the numbered door on a machine that a program answers on. Later, when your own server exists, you will reach it with connect 127.0.0.1:30120.

text
PREVIEW - do not run yet
connect 127.0.0.1:30120

Do not run this yet. You have no server of your own running at this point, so it will fail to connect. It is shown here only so you recognise it later.

For now you only need to confirm the client works. To leave a server, open F8 and run:

text
disconnect

If something went wrong

SymptomFix
Could not find a Grand Theft Auto V installationYou pointed FiveM at the wrong folder or at PlayGTAV.exe. Close GTA V, re-run FiveM.exe, and pick GTA5.exe directly. They sit in the same folder.
This product is not currently activated for online playSign in to Steam, Epic, or Rockstar, launch GTA V once so it activates, then return to FiveM. Cracked copies do not work.
Stuck on "updating game data" or it re-caches every launchLet the progress bar reach 100% and do not close it. On a hard drive this can take 15+ minutes. Patch GTA V fully from your store, add a FiveM exception in your antivirus, and confirm you have 5 GB free.
SmartScreen or antivirus blocks FiveM.exeIf you downloaded from fivem.net, click More info then Run anyway. If the file came from anywhere else, delete it.
The Welcome screen never appears after AuthorizeYour browser blocked the redirect or a session cookie. Re-open FiveM, click Sign in with Cfx.re again, and finish authorizing in the window FiveM opened. Do not paste the URL into a different browser.
FiveM window is black or empty after openingThe server list has not loaded yet. Wait 30 seconds. If it stays empty, confirm Windows Firewall is not blocking FiveM.
FiveM crashes the second it opensUpdate your GPU drivers from the vendor site, then disable game overlays (Discord, RivaTuner, Razer, AMD Adrenalin) for FiveM.

What you can do now

  • Explain that FiveM is a separate launcher that uses your legal GTA V to join community servers.
  • Install FiveM from fivem.net and point it at GTA5.exe, not PlayGTAV.exe.
  • Describe what Cfx.re is and what authorizing the launcher actually grants.
  • Open the F8 console and run connect 127.0.0.1:30120 to reach a local server later.
  • Find FiveM's cache and logs under %LocalAppData%\FiveM\ when something fails.

Try it yourself