How to Host a FiveM Server on a VPS (With the Commands That Actually Work)

Axel Grubba, September 18, 2026
Start selling digital products with Crevio
Crevio E-Commerce Platforms logo
Crevio
Sponsored
5.0
(1)
Free plan available
Crevio is an AI-powered platform that runs your business while you sleep. Describe what you want to se... Learn more about Crevio
Get an AI summary of this post on:

Before anything else: get a licence key. It’s free, it comes from the Cfx.re Portal, and FXServer will not run without it. Everything below assumes you have one.

The install, from Cfx.re’s own Linux guide

Prerequisite: xz-utils, which most minimal Ubuntu images don’t ship.

sudo apt update && sudo apt install -y xz-utils

Then the four commands that matter, taken from Cfx.re’s vanilla FXServer documentation:

mkdir -p ~/FXServer/server
# download the current artifacts build into that directory, then:
cd ~/FXServer/server && tar xf fx.tar.xz

Get the artifacts URL from Cfx.re’s own build listing rather than copying a version number from a tutorial — including this one. Builds change, and a stale artifact is the most common reason a copy-pasted guide fails.

Add your licence key to server.cfg:

sv_licenseKey "licenseKeyGoesHere"

And start it:

cd ~/FXServer/server-data && bash ~/FXServer/server/run.sh +exec server.cfg

Your game port is 30120. Cfx.re’s example config binds endpoints to 0.0.0.0:30120, so that’s the port to open in your firewall — TCP and UDP.

The txAdmin route, which is easier

txAdmin is the recommended path and it does most of the above for you. The flow per Cfx.re’s documentation:

  1. Download the recommended build.
  2. Start it, and open the setup interface.
  3. Enter the licence key you created on the Portal, then click “Run Recipe” — recipes deploy a full framework server rather than an empty one.

The recipe step is the real value. It pulls a working framework, its resources and its database schema in one action, instead of you assembling them.

Secure the panel before you walk away

This is the step tutorials skip and it matters more than any of the above.

txAdmin is a web control panel with full control of your server — start, stop, execute commands, read your config. If it’s reachable from the open internet with a weak password, that’s your entire server.

What to do:

  • Firewall the panel port so it isn’t world-reachable. Open only the game port (30120) publicly.
  • Reach the panel over an SSH tunnel instead of exposing it — ssh -L from your own machine gives you access without opening anything.
  • Or put it behind a reverse proxy with HTTPS and its own authentication, if several admins need access.
  • Use a strong, unique password regardless of the above.

We’re deliberately not quoting a default port number here. We searched Cfx.re’s documentation for one and found no port specified for the panel, so rather than repeat a number we couldn’t verify, check what yours binds to on first run and firewall that.

The general hardening applies too — SSH keys, a default-deny firewall and unattended upgrades are an evening’s work you do once.

The database is the only thing worth backing up

Your RP server’s value is its database. Characters, inventories, vehicles, bank balances, property — every hour your players have invested lives in MySQL or MariaDB, not in your resources folder.

Resources are replaceable. They’re on GitHub or in your recipe. The database is not.

So:

  • Dump it on a schedule. A nightly mysqldump to a directory, and then off the server — a backup on the same box doesn’t survive the failure that destroys the box.
  • Test a restore before you need one. An untested dump is a belief, not a backup.
  • Keep several generations. The common disaster isn’t a dead disk — it’s a bad script or a rogue admin wiping something, discovered days later.

One hosting note that bears directly on this: if you’re on Hetzner and keep the database on an attached Volume, Hetzner’s backups explicitly exclude Volumes. Your database would not be in them.

We have not published innodb tuning values here. The brief asked for sane settings; we haven’t benchmarked MariaDB under a FiveM workload, and copying buffer-pool numbers from a generic tuning guide into an article about a specific game is how bad advice propagates. Start with your distribution’s defaults and tune from your own slow query log.

Sizing, and the cliff at 48 players

The honest structural fact first, because it changes your budget more than any spec:

OneSync — the system that raises FiveM’s slot count — is free up to 48 slots. Above that, Cfx.re’s documentation says you need a paid FiveM Element Club tier, starting at Argentum. That’s a subscription on top of your VPS, and it’s the real cliff in FiveM hosting.

On the hardware side, the load pattern is the thing to understand: a framework server’s cost is resources executing per tick, not players in isolation. A heavily scripted 30-player QBCore server can work a box harder than a light 60-player one.

We have not measured FiveM’s memory or CPU use, so there’s no table of figures here. What we’d do instead: run resmon in your own server console. It reports per-resource cost on your actual resource list, which is the only version of that table that’s true for you.

The one spec we’d prioritise: dedicated rather than shared vCPU. FiveM’s main loop is sensitive to contention, and a noisy neighbour shows up as stutter your players blame on you.

Where to run it

Hostinger — $11.99 renewal for 4GB, $14.99 for 8GB, root access and one-click Docker templates. The cheapest sensible starting point, and the 8GB tier is the one to buy once MySQL shares the box. Refund terms cover renewals, which is a real safety net while you’re testing a build.

Hetzner — the most RAM and cores per euro, and its dedicated-vCPU CCX line is sold explicitly for “constantly high CPU usage” — the correct product class for a framework server, and a published commitment no game host in our research makes. Remember the Volume backup caveat above.

UltaHost — $15.87 for 4GB with 3 vCPU, more cores per dollar than most, and its two-year rate is also its renewal rate. Cores are the right thing to over-buy here.

ScalaHosting — managed VPS with its own SPanel instead of cPanel, removing a licence cost. Worth considering if you want the infrastructure managed but still need root for FXServer.

Cloudzy — $17.37 for 4GB billed monthly with no term. The low-commitment way to test a build before signing up for a year — sensible given how many RP servers don’t survive their first month.

How we checked this

Every command in this article is from Cfx.re’s own documentation, read on 18 August 2026: the xz-utils prerequisite, mkdir -p ~/FXServer/server, tar xf fx.tar.xz, the start command cd ~/FXServer/server-data && bash ~/FXServer/server/run.sh +exec server.cfg, the sv_licenseKey "licenseKeyGoesHere" config line, and the 0.0.0.0:30120 endpoint binding. The txAdmin flow — download the recommended build, enter the Portal licence key, click “Run Recipe” — is from its txAdmin setup page.

We did not run this installation. We have not provisioned a VPS, installed FXServer, deployed a recipe or started a server for this article. The commands are transcribed from the vendor’s documentation, not verified by execution, which is a meaningful difference for a tutorial and you should know it. If a command fails, trust Cfx.re’s docs over ours — and note we’ve deliberately not given you an artifacts URL or build number, because those go stale and a stale artifact is the usual failure.

We searched the documentation for txAdmin’s default panel port and did not find one specified. Rather than repeat a number from memory, the security section tells you to check what yours binds to. That’s less convenient and less likely to be wrong.

The OneSync 48-slot limit and the Element Club requirement above it are quoted from Cfx.re’s OneSync documentation as established in our FiveM hosting comparison. We have not priced the Element Club tiers.

There are no performance figures in this article, and no innodb settings, because we have not measured FiveM or benchmarked a database under it. The sizing guidance is structural reasoning plus a pointer to resmon on your own build.

The security advice is general practice, not a FiveM-specific audit — we have not reviewed txAdmin’s authentication implementation or tested any attack against it. The principle that a full-control web panel shouldn’t sit open on the internet doesn’t require that, but it’s not a security assessment either.

Provider prices are figures established across this series rather than re-read today.

What we did not do: install FXServer, run txAdmin, deploy QBCore or ESX, restore a database backup, or hold an account with any provider here.

The host links above are affiliate links. The advice most likely to save you something — dump your database off the server and test the restore — costs nothing.

FAQ

Can I host a FiveM server on a VPS?

Yes. Cfx.re publishes Linux setup guides for both vanilla FXServer and txAdmin, and self-hosting is fully supported alongside its authorized partner programme.

Do I need a licence key for FiveM?

Yes, and it’s free — register it on the Cfx.re Portal and set sv_licenseKey in your server.cfg. The server won’t run without it.

What port does a FiveM server use?

30120 by default — Cfx.re’s example config binds endpoints to 0.0.0.0:30120. Open it for TCP and UDP, and keep your admin panel port closed.

Is txAdmin safe to expose to the internet?

Treat it as unsafe. It’s a web panel with full control of your server, so firewall it and reach it over an SSH tunnel, or put it behind a reverse proxy with its own authentication.

How much does a FiveM server cost to run?

From about $12–15/month for a VPS. Above 48 slots you also need a paid FiveM Element Club subscription for OneSync, which is separate from hosting.

What should I back up?

The database. Characters, inventories and economy live there; resources are replaceable from GitHub. Dump it nightly, store it off the server, and test a restore.

How many players can my server handle?

It depends on your resources, not just the player count — a heavily scripted 30-player server can be heavier than a light 60-player one. Use resmon in your console to see what your actual resources cost.

Founder & Software Review Editor
Axel Grubba is the founder of Findstack, a B2B software comparison platform, with his background spanning management consulting and venture capital where he invested in software. Recently, Axel has developed a passion for coding and enjoys traveling when he is not building and improving Findstack.
Business Software Reviews SaaS Product Evaluation CRM Software
Subscribe, get software deals straight to your inbox.
Join 8,100+ other entrepreneurs staying up-to-date on all the latest deals.
Zero spam. Unsubscribe at any time.