FiveM sv_licenseKey: 'no license key was specified' error fix
Your FiveM server stops with 'no license key was specified' or a license key authentication failure. How to get a key at portal.cfx.re, set it, and fix IP binding.
Your server starts, then stops with a line like this in the console:
no license key was specifiedYou may also see a variant that says the license key authentication failed. FiveM refuses to run a server without a valid key, so the fix is always on the key: get one, put it in the right place, and make sure it matches the machine.
Why it happens
Every FXServer needs a license key registered to a Cfx.re account. The key proves the server belongs to someone and ties it to an IP address. The error means one of these:
sv_licenseKeyis missing fromserver.cfg, or the line is commented out with a#.- The key has a typo, a missing character, or stray spaces or quotes.
- The key was created for a different IP than the one your server runs on.
- The key was deleted or regenerated on the portal, and the server still uses the old one.
Get a key at portal.cfx.re
- Go to
portal.cfx.reand sign in with your Cfx.re account. - Open the Server section and choose Registration Keys.
- Create a new key. Give it a label, and enter the public IP address of the machine that will run the server.
- Copy the key. It looks like
cfxk_followed by a long string.
Tip: the IP you enter is the public IP of your server, not a local address like
192.168.x.x. On a hosted VPS or dedicated server, use the IP your provider gave you.
Put the key in server.cfg
Open server.cfg and add the line, with the key between double quotes:
sv_licenseKey "cfxk_your_key_here"Rules to follow:
- One line, with straight double quotes (not typographic quotes copied from a chat or a web page).
- No spaces before or after the key inside the quotes.
- The line must not start with
#. - Save the file and restart the server completely. A resource restart does not reload it.
If you use txAdmin
txAdmin asks for the key when you run the server setup, and the recipe deployer writes it into the server.cfg it creates. If you set txAdmin up by hand, or you pasted a wrong key during setup, open the server.cfg that txAdmin runs (the CFG Editor in the txAdmin panel) and check the sv_licenseKey line there.
Two things catch people out here:
- You have several txData profiles or server folders and you edited the wrong
server.cfg. Check the path shown at the top of the txAdmin console. - The key is correct in the file but txAdmin runs a different config. Look at the config file path in txAdmin's settings.
IP binding: key valid, still failing
A key works only for the IP it was registered with. If the key is correct and authentication still fails, compare two values:
- The IP on the key in the portal, under Registration Keys.
- The public IP of the machine. From the server itself you can check it with:
curl ifconfig.me(Invoke-WebRequest -UseBasicParsing https://ifconfig.me/ip).ContentIf they differ, edit the IP on the key in the portal, or create a new key for the new IP. This happens a lot after moving to another host, after a home internet provider changes your IP, or when you test on a PC at home and then upload the same server.cfg to a VPS.
Regenerating a key
If a key leaked (it was posted in a screenshot, a Discord message or a public GitHub repository), regenerate it from the portal. The old key stops working at once, so update server.cfg straight after and restart.
# old key, revoked
# sv_licenseKey "cfxk_old_key"
sv_licenseKey "cfxk_new_key"Keep the key out of public repositories. If your server.cfg is in Git, store the key in a separate file that is not committed and load it with exec:
exec secrets.cfg# secrets.cfg (not committed)
sv_licenseKey "cfxk_your_key_here"Several servers
You need one key per server. If you run a test server next to your live one, create two keys, each with its own IP, and label them so you do not mix them up. Using the same key on two servers makes one of them fail authentication.
Still stuck after the key
Once the key is accepted, the next thing people hit is that nobody can join. That is a network issue, covered in FiveM server not showing up: port forwarding and firewall. If you are installing on a fresh VPS, running a FiveM server on Linux walks through the whole setup.
Checklist
| Symptom | Fix |
|---|---|
no license key was specified |
Add sv_licenseKey "cfxk_..." to the server.cfg the server really runs |
license key authentication failed |
Key has a typo, was deleted, or was regenerated: copy it again from portal.cfx.re |
| Key correct but rejected | The IP on the key does not match the server's public IP: edit it in Registration Keys |
| Works at home, fails on the VPS | Create a key for the VPS IP |
| Key leaked | Regenerate it and update server.cfg |
| Two servers, one fails | Use one key per server |
Quick answers
Where do I get a FiveM server license key?
Sign in at portal.cfx.re with your Cfx.re account, open the Server section, then Registration Keys, and create a key for your server. Copy it once it is shown, it starts with cfxk_.
Can I use one license key on several servers?
No. A key is registered for one server and one IP address. Create a separate key for each server you run.
My key is correct but authentication still fails. What now?
Check that the IP registered on the key is the public IP of the machine running the server. If you moved hosts or your IP changed, edit the key's IP or regenerate it, then put the new key in server.cfg.

