FiveM Updated April 27, 2026

Getting and Configuring Your FiveM License Key

How to generate a FiveM license key from cfx.re Keymaster and add it to your server configuration.

FiveMLicense KeyKeymastercfx.reserver.cfg

Overview

Every FiveM server requires a license key issued through the cfx.re Keymaster portal. The key is free, ties your server to a cfx.re account, and is required before the server will authenticate with cfx.re infrastructure or accept player connections from the FiveM client launcher.

Generating a Key

  1. Go to https://keymaster.fivem.net and sign in with your cfx.re account. If you do not have one, register at https://forum.cfx.re.
  2. Click New Server.
  3. Fill in a server label (internal reference only — players never see this).
  4. Under Server IP, enter the public IP address of your server. If you are behind NAT or using a panel that assigns a shared IP, enter the egress IP.
  5. Click Generate. Your key appears in the format cfxk_xxxxxxxxxxxxxxxxxxxx_xxxxxx.

Keep this key private. Anyone with it can impersonate your server listing.

Applying the Key in server.cfg

Open server-data/server.cfg and add or replace the license key directive:

sv_licenseKey "cfxk_xxxxxxxxxxxxxxxxxxxx_xxxxxx"

This line must be present for the server to start. If it is missing or invalid, FXServer will exit immediately with a license error.

Pterodactyl / WISP Panel Variable

Most FiveM eggs expose a SERVER_LICENSE_KEY startup variable. When set, the egg injects sv_licenseKey into the configuration automatically. To set it:

  1. Open your server in the panel.
  2. Go to Startup (or Variables).
  3. Paste your key into the SERVER_LICENSE_KEY field.
  4. Restart the server.

If your egg injects the key and you also have a hard-coded sv_licenseKey line in server.cfg, the injected value typically takes precedence. Remove duplicates to avoid confusion.

Rotating a Compromised Key

If your key is leaked:

  1. Go to https://keymaster.fivem.net.
  2. Find the server entry and click Revoke or Regenerate.
  3. Update sv_licenseKey (or the panel variable) with the new key.
  4. Restart FXServer.

Revoking the old key immediately disconnects any server using it, so coordinate timing with your players if needed.

Common Errors

Error message Cause Fix
License key not found Key was revoked or never set Regenerate at keymaster.fivem.net
Invalid license key Typo or extra whitespace in the key Copy-paste the key directly
Server starts but is not listed Wrong IP registered for the key Update the IP in Keymaster