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.
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
- Go to
https://keymaster.fivem.netand sign in with your cfx.re account. If you do not have one, register athttps://forum.cfx.re. - Click New Server.
- Fill in a server label (internal reference only — players never see this).
- 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.
- 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:
- Open your server in the panel.
- Go to Startup (or Variables).
- Paste your key into the
SERVER_LICENSE_KEYfield. - 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:
- Go to
https://keymaster.fivem.net. - Find the server entry and click Revoke or Regenerate.
- Update
sv_licenseKey(or the panel variable) with the new key. - 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 |