How to Create a Free FiveM Server License Key (Cfx.re Keymaster)
Step-by-step guide to generating a free license key on Cfx.re Keymaster and linking it to your FiveM server IP in production.
Running a FiveM server requires a license key issued by the Keymaster, the official Cfx.re system. Without it, FXServer refuses to boot with the message invalid license key specified and the server won’t appear on the public list. The good news: there is a free key. All you need is a Cfx.re forum account and the IP address of the server where FXServer will run.
This tutorial is for anyone setting up their first FiveM server — whether on a VPS, dedicated server, or local test environment. We’ll cover Keymaster registration, key generation tied to the correct IP, configuration in server.cfg, and the most common validation errors that appear in the first few minutes of operation.
Prerequisites
Before generating the key, make sure you know which IP will host the server. The license is bound to that address — if you generate it with the wrong IP, you’ll need to update the binding afterward.
You need: a valid email address to register on the Cfx.re forum, the public IPv4 of the server where FXServer will run, SSH or panel access to edit server.cfg, and FXServer already installed (or about to be installed).
If you don’t have a server yet, decide where it will run before continuing. The key supports three binding modes:
Binds to a specific IPv4 address 127.0.0.1 — local testing only Accepts any IP, but with limitations For production, use a fixed IP. Localhost works for development on your own machine. Wildcard is functional, but Cfx.re may revoke wildcard keys used on public servers with high player counts.
Create a Cfx.re Forum Account
Keymaster authenticates via the official Cfx.re forum — you don’t create an account directly on the key panel. Instead, you register on the forum, which acts as SSO for the entire FiveM ecosystem.
Go to the official forum address:
https://forum.cfx.re/Click Sign Up in the upper right corner. You can register via Discord, Google, GitHub, or traditional email. Discord is recommended if you’re already part of FiveM communities — it simplifies future support.
Fill in the registration form with a valid email, username, and password. The forum sends a confirmation link by email — click it before proceeding, otherwise Keymaster won’t recognize the account.
After confirming, log into the forum at least once so the session is initialized.
Access Keymaster at:
https://keymaster.fivem.net/Click Log in with Cfx.re and authorize access via OAuth. You’ll be redirected to the Keymaster dashboard, which lists all your license keys (none at this point).
Your forum account grants full access to your keys, support threads, and Cfx.re asset management. Use a strong password and enable 2FA in the forum settings (Preferences → Security).
Generate the License Key in Keymaster
With an active account, key generation takes under a minute. The system allows up to roughly 9 keys per account for free — enough for multiple servers or staging environments.
On the Keymaster dashboard, click the + button or Generate a new server key at the top of the page.
You’ll see a form with three fields: server label (a descriptive name), IP address, and binding type.
Fill in the Server Label with a name that identifies the server — for example roleplay-prod-01 or dev-local. This name is for your internal organization only and is not visible to players.
In the IP address field, enter the server’s public IPv4. If you’re on a VPS, retrieve the IP via:
curl -4 ifconfig.meFor local development, use 127.0.0.1. For hosting with a dynamic IP, select the wildcard option, but be aware of its limitations.
Click Generate. The key will be created and displayed in the format:
cfxk_XXXXXXXXXXXXXXXXXXXXX_YYYYYYYCopy the full value. Treat this string like a password — do not publish it in screenshots, public repositories, or Discord.
Cfx.re actively monitors keys exposed on GitHub and pastebins. If your key leaks, it is automatically revoked and the server goes down. Add server.cfg to .gitignore if you version your configuration.
Configure the Key in server.cfg
The key must be declared in the configuration file that FXServer reads during boot. By default, this file is located at ~/server-data/server.cfg on Linux or in the server folder on Windows.
Open the configuration file:
nano ~/server-data/server.cfgLocate the line starting with sv_licenseKey — usually near the end of the file in the default txAdmin or FXServer template.
Replace the placeholder value with your key:
sv_licenseKey cfxk_XXXXXXXXXXXXXXXXXXXXX_YYYYYYYDo not use quotes around the key. Do not add extra spaces. FXServer parses by simple whitespace and any extra character will break validation.
Save and close the file (Ctrl+O, Enter, Ctrl+X in nano).
Restart FXServer. If you’re using txAdmin, click Restart in the web panel. For manual execution:
cd ~/server-data
bash ~/fxserver/run.sh +exec server.cfgVerification
A server with a valid key displays specific messages in the console during boot. You confirm success by observing these logs.
Look in the console for a sequence similar to:
Authenticating with [Cfx.re]...
Server license key authentication succeeded.
Server is now available on the server list.
If authentication fails, FXServer exits with the message Invalid license key specified, or RCON password not set. In that case, review the key and the bound IP.
You can also verify via FiveM’s public API whether the server appears listed. Replace IP:PORT with your endpoint:
curl http://IP:PORT/info.json
The response should contain a JSON with vars, version, and resources. If it returns a connection error, the issue is firewall or port — not the key.
Troubleshooting
Error: invalid license key specified
The most common cause is a wrong IP in Keymaster. Go back to the dashboard, edit the key (pencil icon), and update the IP. The change is instant, but FXServer must be restarted to revalidate.
Second cause: the key was copied with an invisible character (space, line break). Delete the entire line in server.cfg and re-enter it, or use echo to ensure a clean format:
echo 'sv_licenseKey cfxk_YOUR_KEY_HERE' >> server.cfg
Error: license key has expired or been revoked
Keymaster keys don’t expire by time, but are revoked in three scenarios: public leak detected by Cfx.re, terms of service violation (commercial use without adequate licensing for large servers), or manual deletion by the account owner. Generate a new key from the dashboard.
Server starts but doesn’t appear on the public list
In this case, the key worked, but there’s another issue. Check that sv_endpoints is configured correctly and that port 30120 (UDP and TCP) is open in the firewall:
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udp
The server may take up to 2 minutes to appear on the public list after the first successful boot.
Generate separate keys for production and staging — using the same key on two simultaneous servers invalidates both. Since the limit is around 9 keys per account, there’s enough room for test environments without conflict.
Next Steps
With the key configured, the server is technically operational. From here, consider:
- Setting up txAdmin to manage the server via web (start/stop, remote console, backups)
- Enabling OneSync if you plan for more than 32 simultaneous players
- Adjusting
sv_maxClientsand performance parameters inserver.cfg - Configuring essential resources: ESX or QBCore for roleplay frameworks
- Implementing automated backups for your MySQL database and
resourcesfolder
If you’re taking the server to production with more than 32 slots, a Hostini VPS with NVMe storage and low latency to the Cfx.re backbone reduces tickrate drops during peak hours — FiveM’s typical bottleneck is database I/O and single-thread CPU, both addressed by plans with dedicated vCPU.
Frequently asked questions
Is the FiveM license key really free?
Yes. Cfx.re Keymaster issues free keys with no time limit for servers up to 48 slots. Larger servers may require Patreon Argentum or higher, but the key itself remains free — Patreon unlocks additional slots, it does not unlock the license.
Can I use the same key on two servers at the same time?
No. Cfx.re detects simultaneous use of the same key on different IPs and suspends both instances. For staging and production, generate separate keys — your account allows around 9 active keys.
Do I need a new key if I change my server's IP?
No need to generate a new one. Go to Keymaster, click the edit icon on the existing key, and update the IP field. The change propagates within seconds and you just need to restart FXServer to revalidate.
What happens if my key leaks on GitHub?
Cfx.re runs automated scans on public repositories. Keys detected in public commits are revoked within 24 hours. Always add server.cfg to .gitignore and use environment variables or separate files for secrets.
What's the difference between a wildcard key and a fixed-IP key?
Wildcard accepts connections from any IP, which is useful for dynamic IP hosting or containerized environments. Fixed IP is more secure and stable for production. Wildcard has implicit slot limitations and may be flagged on high-population public servers.
Can I use a FiveM key on a RedM server?
No. RedM (the Red Dead Redemption 2 port) uses keys from the same Keymaster, but generated through a separate flow within the panel. When creating the key, the system asks for the server type — select RedM for that use case.