SimplisticNode

How to make a FiveM server (step by step)

A step-by-step guide to making a FiveM server: license key, txAdmin, choosing a framework, server.cfg, adding scripts and inviting players.

FiveM6 min read

Making your own FiveM server is easier than it used to be. Tools like txAdmin now handle a lot of the fiddly setup, and you can go from nothing to a working roleplay server in an evening. This guide takes you through the whole process, from planning to inviting your first players, whether you host it yourself or use a hosting provider.

What you need before you start

  • A legitimate PC copy of GTA V and the FiveM client, so you can join and test your own server. Your players need the same.
  • A Cfx.re account. This is the account used on the FiveM forums and the Cfx.re portal.
  • Somewhere to run the server: your own computer, a VPS, or a game server host.
  • A rough idea of what kind of server you want to build.

Step 1: Decide what kind of server you want

This sounds obvious, but it decides almost everything else. A serious roleplay city needs a framework, a database and a lot of scripts. A drift, race or freeroam server can be much simpler. Write down what players will actually do on your server, and roughly how many you expect in the first few months. It will help you pick a framework and a server size later.

Step 2: Choose where to host it

You can run a FiveM server on your own PC, but it comes with trade-offs:

  • Your PC has to stay on whenever people want to play.
  • You need to forward port 30120 on your router, for both TCP and UDP, and allow it through your firewall.
  • Your home upload speed limits how many players you can handle and how fast they download your custom content.
  • Your home IP address is exposed to everyone who connects, which can make you a target for attacks.

Self-hosting is fine for testing with a couple of friends. For anything public, most people move to a hosting provider. A dedicated game server host gives you FiveM ready to go, while a VPS gives you a whole server to set up yourself. If you are not sure how much memory you need, read our guide on how much RAM a FiveM server needs.

Step 3: Get a license key

Every FiveM server needs a free server license key from Cfx.re. Sign in to the Cfx.re portal at portal.cfx.re, go to the server license keys section, and register a new key. Give it a name, fill in the details it asks for, and copy the key somewhere safe. Treat it like a password: anyone who has it can run a server under your account.

Step 4: Install and open txAdmin

txAdmin is the official web panel for running a FiveM server. It comes built into the FiveM server software, and it handles setup, restarts, players, bans and logs from your browser.

  • On a game server host: txAdmin is usually installed for you. On our FiveM plans you start the server in the panel, and the console shows the txAdmin address and a one-time PIN.
  • Self-hosting on Windows or Linux: download the latest recommended server build (called artefacts) from Cfx.re, extract it, and run the server. txAdmin starts and prints its address and PIN in the console.

Open the txAdmin address in your browser, enter the PIN, and link your Cfx.re account. That creates your master admin login.

Step 5: Pick a framework and run a recipe

In the txAdmin setup, choose Popular Recipes. A recipe installs a complete base for you: framework, core scripts, database tables and a starter server.cfg. The two most popular roleplay choices are QBCore and ESX Legacy, and there are also options for a plain server with no framework. If you are torn, our comparison of QBCore vs ESX covers the differences.

When the recipe asks, paste in your license key and your database details. On a host, you usually create the database in your panel first. If you self-host, you need to install MySQL or MariaDB yourself and create a database and user for the server.

Step 6: Tidy up server.cfg

The recipe writes a working server.cfg, but you will want to make it your own. Open it from txAdmin's CFG editor or your file manager. These are the lines most people change first:

  • sv_hostname: the name shown in the server list.
  • sets sv_projectName and sets sv_projectDesc: your server's project name and a short description.
  • sets tags: a few comma-separated words, such as roleplay or drift, that help people find you.
  • sets locale: your server's language and region, for example en-GB or en-US.
  • sv_maxclients: the maximum number of players. Keep it within what your plan and your Cfx.re account allow.
  • load_server_icon: an optional 96 by 96 pixel PNG shown next to your name in the server list.

Leave the sv_licenseKey line and the endpoint lines alone unless you know you need to change them. The ports have to match what your host or router expects.

Step 7: Add your scripts

  1. Upload each resource folder into your resources folder. Grouping them in folders with square brackets, such as [jobs] or [cars], keeps things tidy.
  2. Read the resource's instructions. Many include an SQL file to import into your database, and a config file to fill in.
  3. Add ensure followed by the resource's folder name to server.cfg, below your framework's own resources so they start first.
  4. Restart the server and check the console for errors before you add the next one.

Add scripts one or two at a time. If something breaks, you will know exactly what caused it. Only download from sources you trust, and make sure each script was made for your framework.

Step 8: Set up admins and permissions

Use txAdmin's admin manager to give trusted staff access to the web panel, with only the permissions they need. For in-game admin powers, frameworks use FiveM's ACE permission system, set in server.cfg. Keep your admin team small at first, and never share the master account.

Step 9: Test and invite players

Before you go public, join the server yourself. Open FiveM, press F8 to open the console, and type connect followed by your server's IP and port. Walk around, try the jobs, test the shops and check the console for errors. Then invite a few friends to help you test with more than one player.

Once you are happy, players can join the same way or find you in the FiveM server browser. A Discord server for announcements, rules and support makes a big difference to how quickly a community grows.

Step 10: Keep it healthy

  • Schedule regular restarts in txAdmin to keep memory tidy.
  • Take backups of your database and resources before every big change.
  • Keep your artefacts and framework reasonably up to date.
  • Watch your console and txAdmin logs for errors after adding anything new.
  • Consider an anticheat once you are public. We offer FiveGuard for FiveM servers.
  • If you run roleplay with emergency services, a CAD/MDT like SnailyCAD helps with dispatch and records.

Common problems

  • Players cannot connect: check the IP and port, and if you self-host, make sure port 30120 is forwarded and open for TCP and UDP.
  • License key errors: make sure the key is pasted correctly with no spaces, and that it has not been revoked in the Cfx.re portal.
  • SQL errors on start-up: a resource's SQL file probably has not been imported, or your database details are wrong.
  • A script does not start: check it is listed with ensure in server.cfg, that the folder name matches exactly, and that its dependencies start before it.

Skip the hard parts

If you would rather spend your time building your city than setting up servers, our FiveM hosting comes with txAdmin pre-installed, free MySQL databases, automatic artefact updates and DDoS protection, on high-clock Ryzen CPUs in the UK and US. Our FiveM setup guide covers the exact steps on our panel, and our team is on hand 24/7 if you get stuck.

Start your FiveM server today

txAdmin, MySQL and high-clock Ryzen ready from the moment you order. Your players can be in within minutes.