Skip to content
GTA666
beginner9 min readUpdated 2026-09-09

How a Private Server Actually Works

Client, server, artifacts, resources, frameworks, database and Discord — the six moving parts of a GTA roleplay server, explained with the FiveM stack.

Quick answer

A private server is a program you run that tells modified game clients what exists in their world. On today's FiveM stack that program is FXServer, built from a downloadable artifact, running a folder of resources, backed by a MySQL database, with Discord acting as the community front door. GTA 6 has no equivalent platform announced — this is the GTA V model you learn on.

Before you install anything, it helps to know what the pieces are and which one you are touching when something breaks. This chapter is the map. Everything here describes the FiveM/Cfx.re stack for GTA V, which is the working model this whole track teaches — private-server support for GTA 6 is not announced, and no equivalent platform exists yet.

Client and server

Every player already owns GTA V. The FiveM client sits on top of it, and when they connect to your server it does three things: downloads your server’s mod content, loads it, and then keeps the player’s game synchronised with everyone else’s.

Your server never sends the game itself. It sends your content — scripts, custom vehicles, map edits, sounds — and then acts as the authority on what is true. Where is that car? Who owns this house? How much money does this character have? The server decides, and tells the clients.

That authority split matters more than any other idea in this track. Anything the client decides can be lied about by a cheater. Anything the server decides cannot. When you read performance and security, this is the sentence the whole chapter hangs off.

The synchronisation layer is called OneSync. Cfx.re’s docs explain it as the system that lets a server exceed the base game’s tiny player cap — it is free up to 48 slots, and requires a paid Element Club tier above that.

The artifact

The server program is called FXServer, and you get it as an artifact: a numbered build you download from the official server download page. There is a Windows build and a Linux build.

The artifact is the platform. You did not write it, you do not edit it, and you replace it wholesale when you update. Practically:

  • Keep artifacts in their own folder, separate from your content.
  • Keep the previous one so you can roll back in thirty seconds when a new build breaks a script.
  • Don’t update on launch night. Ever.

Resources

Your actual server is a folder — conventionally resources/ — and everything inside it is a resource. A resource is a directory containing an fxmanifest.lua that declares what it is: which client scripts to run, which server scripts to run, which files to send to players, which version of the scripting runtime it targets. The resource manifest reference is the authority on those fields.

Resources are how everything is delivered. The chat box is a resource. The spawn system is a resource. Your police job, your custom cars, your map of a rebuilt Paleto Bay — all resources. Your server.cfg starts them with ensure resourcename, and the order it does so in is a real source of bugs, because a resource that depends on another must start after it.

The mental model to hold: the server is a folder plus a start list. Almost every “my server is broken” question resolves to something in that folder, or something missing from that list.

Frameworks

If every server built characters, money, inventories and jobs from scratch, nothing would ever get finished. So the community converged on frameworks — big shared resources that provide the plumbing, and a script ecosystem written against them.

A framework typically gives you: player accounts and characters, a money system with cash/bank, an inventory, a job system with grades, permission handling, and a set of functions that third-party scripts call. When someone sells a “QBCore mechanic job”, they mean a resource written against QBCore’s functions.

Picking one is the single most consequential decision you will make, because it determines which of the tens of thousands of community scripts you can install without rewriting. Pick a framework covers the trade-offs properly.

You can also run standalone — no framework, just resources you choose — which is clean, fast and lonely.

The database

The game has no memory. Close the server, and everything is gone.

So frameworks store state in MySQL (or MariaDB), reached from server-side Lua through a connector resource. Characters, bank balances, owned vehicles, houses, inventories, licences, phone messages, and usually your ban list all live in tables there.

Consequences you should internalise now:

  • Your database is the server. The artifact and the resources are replaceable in an afternoon. The database is not. Back it up automatically, off the machine, and test a restore before you need one.
  • Slow database queries are one of the most common causes of a server that “lags for everyone at once”.
  • Anyone with database access can silently hand themselves money. That is a staffing decision, not a technical one — see staff and moderation.

Discord: the actual front door

Here is the part that surprises new owners. Your server is not primarily a game server. It is a Discord community that happens to have a game attached.

Discord is where people find you, read the rules, apply for whitelist, get verified, report players, appeal bans, coordinate factions, and — critically — where they go when the game server is offline. A server with 60 players in-game typically has several thousand people in its Discord, and the Discord is what survives an outage.

Practically, most servers wire the two together:

  • Players link their Discord account so identifiers carry into the game.
  • Whitelist and role checks are done against Discord roles.
  • Server logs, ban notices and staff actions are posted to private channels.
  • Applications run through a form or bot, covered in rules and whitelisting.

If you take one thing from this chapter: build the Discord before you build the server.

Where the money and the map fit

Two more layers sit above all of this. Your economy — starting cash, job pay, what drains money back out — is designed, not inherited; see economy and jobs design. And your hosting decides where the machine physically is, how many slots it can carry, and who fixes it at 2am, which is the next chapter: choose your hosting.

Takeaways
  • FXServer is just a program running a folder of resources — everything else is layered on top
  • Artifacts are the platform build; resources are your content; frameworks are shared plumbing
  • Almost all persistent data lives in MySQL, not in the game
  • Discord is where your server really lives — the game is only one of its rooms
  • The same architecture is what any future GTA 6 platform would most likely have to reinvent

Frequently asked

Does the server send players the whole game?

No. Every player owns and runs GTA V themselves. The server sends only the mod content — scripts, custom vehicles, map edits — and then tells each client what is happening in the shared world. That is why joining a heavy server downloads a few hundred megabytes, not fifty gigabytes.

What is an artifact?

An artifact is a numbered build of the Cfx platform server binary, downloaded from the official server-download page. It is the platform, not your content. You update it periodically the same way you update any server software, and you keep the old one so you can roll back.

Why does everything need a database?

Because the game has no memory. Characters, money, vehicles, houses, inventories and bans all have to persist between sessions, so frameworks store them in MySQL and read them back on join.

Sources
  1. Setting up a server · Cfx.re
  2. Server commands · Cfx.re
  3. Resource manifest · Cfx.re
  4. OneSync · Cfx.re
Day-one whitelist

Get recruited when GTA 6 private servers open.