Skip to content
Current coupon:10% offUse it in your order

FiveM license key: how to get one and where to put it

Create a license key (Server Registration Key) on the Cfx.re Portal and add it to your server through txAdmin, the variables in the customer area or server.cfg.

  • beginner
  • ~5 min
  • Updated 2 Oct 2026

A FiveM server won't start without a license key. Here's how to create one for free on the Cfx.re Portal and exactly where to put it on your server.

What you'll need

  • A Cfx.re account (the same one you use on the forum.cfx.re (opens in a new window) forum); if you don't have one, you create it the first time you sign in to the Portal
  • A FiveM server at StormHost (or your own server on a VPS)
  • About 5 minutes

What a license key is#

A license key (officially a Server Registration Key, formerly created on the Keymaster website) is the key your server uses to identify itself to Cfx.re, the company that runs FiveM. The server verifies it at startup, and only then does it start and appear in the server list.

  • The key starts with cfxk_ and is as secret as a password. Anyone who has it can use it for their own server.
  • One Cfx.re account can have at most 3 active keys, so 3 servers at once.
  • The key belongs to your account. Paid scripts protected by Asset Escrow only run on a server whose key belongs to the same account you bought the script with.
  • When you create a key today, you only enter a server name, not an IP address. Older guides that mention a “key IP address” no longer apply.

Creating a key on the Cfx.re Portal#

  1. Open portal.cfx.re (opens in a new window) and sign in with your Cfx.re account.

  2. Go to the Server Registration Keys (opens in a new window) page (Servers in the Portal menu).

  3. Click Generate Key +.

  4. Type a server name in the dialog, for example Muj RP server. Only you see the name in your list of keys; players never see it.

  5. Click Generate.

    The new key appears in the list of keys.

  6. Copy the key and store it in a password manager.

Never publish the key

Don't put it in a public GitHub repository, on Discord or in a console screenshot. If the key leaks, generate a new one (see “Troubleshooting”).

Adding the key to your server#

Where the key goes depends on whether you manage the server through txAdmin. You can tell from the Console tab: a running txAdmin prints a box with All ready! Please access: after startup.

With txAdmin

New server: you enter the key in the txAdmin setup wizard, in Step 2: Input Parameters, in the Server Registration Key field. txAdmin writes it to server.cfg for you. The whole wizard is covered in txAdmin: first setup.

The server is already running and you want to change the key:

  1. In txAdmin, open CFG Editor in the left menu.

  2. Find the sv_licenseKey line and replace the old key with the new one:

    server.cfgcfg
    sv_licenseKey "<LICENSE_KEY>"
    • sv_licenseKey – the setting the server reads the license key from.
    • "<LICENSE_KEY>" – replace <LICENSE_KEY> with the full key from the Portal (it starts with cfxk_), inside the quotes and without the angle brackets.
  3. Click Save File (CTRL+S).

  4. Restart the server (with the restart button on the left in txAdmin, or with Restart in the Console tab of the customer area).

Without txAdmin

  1. In the customer area, open My services, click your server and go to the Settings tab.
  2. In the Variables section, find the license key variable. You'll recognize it by its description, which links to the Cfx.re Portal.
  3. Paste the key and click Save. For security, the key field is masked; click the eye icon in the field to show its content.
  4. In the Console tab, click Restart.

If the server has no variable for the key, add the key directly to server.cfg (Files tab) with the line sv_licenseKey "<LICENSE_KEY>".

Your own VPS

On your own server, the key goes into server.cfg in the server data folder:

server.cfgcfg
sv_licenseKey "<LICENSE_KEY>"

Replace <LICENSE_KEY> with the key from the Portal. Then start the server with the +exec server.cfg parameter, otherwise it won't load the file. If you use txAdmin, follow the “With txAdmin” tab.

Key in the variable and in server.cfg

If the key is both in the variable and in server.cfg, whichever is set later wins. That's usually server.cfg, because it's loaded after the startup parameters. It's simplest to keep the key in one place only. If you leave it in both, it has to be the same.

Verification#

  • After the restart, the Console tab shows no license key error and the server loads its resources.
  • Within a few minutes (at most about 8 minutes after startup), the server shows up in the FiveM server list.
  • You can also check the server with our CFX Resolver tool: enter the address from the Network tab (IP:port).

Troubleshooting#

no license key was specified#

The server didn't get a key at all. Check that the sv_licenseKey line is in the server.cfg the server actually loads (with txAdmin, in the folder you chose during deployment), or that the variable in the Settings tab is filled in. On your own VPS, check that you start the server with +exec server.cfg.

Could not authenticate server license key#

The key is invalid, deactivated or was copied incompletely (a character missing at the start or end, or an extra space). Copy it from the Portal again. On the Server Registration Keys (opens in a new window) page, check that its status is Active. You can reactivate a deactivated key with the Re-Activate button in the key details.

The key leaked#

On the keys page, click the Server ID of the key, then Regenerate, and confirm with Yes. The old key stops working, so add the new one to your server right away as described above. Cfx.re may also email you that it found your key in a public GitHub repository. The procedure is the same.

You can't create another key#

You have 3 active keys. Open the key of a server you no longer run and click Deactivate.

You lack the required entitlement to use …#

The paid script (Asset Escrow) was bought on a different Cfx.re account than the one the server's license key belongs to. Use a key from the account you bought the script with, or transfer the script to the right account on the Portal. More details in FiveM resources.

Summary

  • Create a license key (Server Registration Key) for free at portal.cfx.re › Servers › Registration Keys › Generate Key +.
  • One account can have at most 3 active keys, and a key isn't tied to an IP address.
  • With txAdmin, enter the key in the setup wizard (Server Registration Key) or in CFG Editor; without txAdmin, in the Settings tab › Variables or in server.cfg.
  • Restart the server after changing the key. Regenerate a leaked key right away with Regenerate.

Search the guides