Sign inCreate server
FiveM

How to Host a FiveM Server on a VPS (Guide)

A guide to running a FiveM server on a VPS: requirements, the Cfx.re license key, installing FXServer and txAdmin, ports, a database and performance.

6 min read#fivem server#host fivem on vps#txadmin#fxserver#fivem server.cfg#esx qbcore#gta v roleplay server

To host a FiveM server on a VPS, create a server key at the Cfx.re portal, install the FXServer artifacts on your VPS, start it and finish setup in the txAdmin web panel, open port 30120 for players, and add a database if your framework (ESX, QBCore or QBox) needs one. The real work is sizing the machine and keeping your resources lean. This guide walks through the process and the points where servers usually go wrong.

What FiveM is

FiveM is a modification framework for Grand Theft Auto V that lets you run your own multiplayer servers, most famously for roleplay. The server software is called FXServer, and it comes with txAdmin, a web interface to start, stop, configure and monitor the server.

You do not host the game itself. You run FXServer, and players connect with the FiveM client on their copy of GTA V.

Note: FiveM is a third-party project governed by the Cfx.re terms. Read their platform and monetization rules before running a public or paid server.

Do you need a VPS?

A VPS is a good fit because you control the machine, and FiveM benefits from fast CPU cores. SolumeCore does not sell a ready-made FiveM panel, so you run it on a VPS yourself. If you are not sure that a VPS is the right product, read VPS vs VDS vs shared hosting vs game server.

Step 1: Size the server

FiveM uses more memory and CPU as you add resources (scripts, jobs, custom maps and vehicles) and as players join. The framework matters too: ESX, QBCore and QBox each add their own overhead.

Do not guess. Our RAM calculator estimates RAM and vCPU for FiveM from player count, framework and the number of resources. Treat the result as a starting point, then watch real usage.

Two rules of thumb:

  • Single-core performance matters, because a lot of FiveM server work is not well spread over many threads.
  • A heavy server with a large player count that needs consistent performance is where a VDS (reserved cores) makes sense over a shared-core VPS.

Step 2: Create a license key

  1. Sign in at the Cfx.re portal with your account.
  2. Register a new server key. It is tied to your account and, if you want, to your server's IP.
  3. Keep the key secret. It goes into your server.cfg as sv_licenseKey.

Step 3: Prepare the VPS

Order a VPS with a supported Linux distribution (Ubuntu or Debian are common choices) or Windows. Then:

  1. Log in and secure it first: how to secure a new VPS.
  2. Create a normal user for FiveM, not root.
  3. Install basics such as git, xz-utils, screen or tmux.

On a SolumeCore VPS you can apply a firewall template for FiveM from the panel.

Step 4: Install FXServer

  1. Open the official FiveM artifacts page and download the latest recommended build for your OS. Use the official source only.
  2. Extract it in a folder, for example ~/fivem/server.
  3. Start it for the first time. On Linux:
bash
cd ~/fivem/server
./run.sh

With no arguments, FXServer starts txAdmin and prints a link and a PIN in the console. Open the link (the web interface runs on its own port, 40120 by default) and enter the PIN.

Step 5: Set up with txAdmin

The txAdmin wizard asks you to:

  1. Link your Cfx.re account.
  2. Choose a recipe, a ready-made setup. Recipes can deploy a basic server, or a full roleplay framework with its resources.
  3. Enter your license key and basic settings.
  4. Deploy and start.

You can also build server.cfg by hand, or use our server.cfg generator.

Step 6: Open the ports

Players connect to the game port, 30120, on both TCP and UDP. Allow both in your firewall. Keep txAdmin's port (40120 by default) closed to the public, or restrict it to your IP. It is an admin interface and should not be open to the world.

If you use ufw on Linux:

bash
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udp

For admin access, either allow your own IP only or use an SSH tunnel.

Step 7: Add a database

Most roleplay frameworks need MySQL or MariaDB. Install MariaDB on the VPS, create a database and a user with a strong password, and point your database resource (commonly oxmysql) at it through the connection string in server.cfg. Bind the database to localhost so it is not exposed to the internet. See how to secure a new VPS.

Step 8: Run it as a service

If the server only lives in a terminal session, it will die when you disconnect. Run it under systemd, screen or tmux. The systemd and cron tool generates a unit file. txAdmin also manages restarts and scheduled restarts for you.

Step 9: Connect and share the address

Players use the FiveM client and connect to your-ip:30120, or through a cfx.re/join link. Learn how those links resolve in how to find a FiveM server IP from a cfx.re link, and consider a domain for the address; see connect a domain to your game server.

Keep performance healthy

  • Remove unused resources. Each one costs time on every tick.
  • Watch the resource monitor in txAdmin or resmon to find scripts that spike.
  • Use well-maintained scripts and update them.
  • Schedule restarts at quiet hours.
  • Back up your resources, server.cfg and database. See game server backups.
  • Mind DDoS exposure. Game servers are frequent targets; read DDoS protection for game servers.

Common problems

Problem Likely cause
"Authentication failed" Wrong or reused license key
Players cannot connect Port 30120 TCP/UDP closed, or wrong IP
Hitching, high server tick time Heavy resources; check resmon
Database errors Wrong credentials or the database not started
txAdmin unreachable Port 40120 blocked, or FXServer not running

FAQ

Can I run FiveM on shared hosting?

No. It needs to run a long-lived server process and open game ports, which shared web hosting does not offer.

How much RAM does a FiveM server need?

It depends on players, framework and resources. Use the RAM calculator for a starting estimate and measure real use.

Linux or Windows?

Both work. Linux is lighter and common for servers; some people choose Windows for compatibility with specific tools.

Do I need txAdmin?

It is the recommended way to manage the server, with recipes, monitoring and restarts.

Yes, within the Cfx.re terms and the law where you live. Review the rules, especially on monetization.

Get a machine for it

Pick a VPS with the CPU and RAM your calculation suggests, and use the FiveM tools to build your config. The docs cover the panel.

Was this article helpful?
How to Host a FiveM Server on a VPS (Guide)