[EXPLAINED] How to make/add a server key

How to create a server key:

A server registration key is required to use the Cfx.re platform server. Generating a server key is easy via the Portal.

Below are the detailed steps on how to create a registration key:

1. Go to the Servers page on Portal.

2. Once on this page, click on the Generate Key button.

3. A pop-up window will appear for you to create your server key. Enter the display name for your server and click Generate to generate your key.

4. After pressing Generate your new server key should show up in the list of registration keys.

Your key has been created and is now ready to be used!


How to set server key in server.cfg file:

1. Find your specific server folder in either the FXServer or txData Folder’s (Typically named FiveMBasicServerCFXDefault_XXXXXX.base if set up through txAdmin)

image
image

2. Scroll down till you see: server.cfg and double click on file :mascot:

3. Near the bottom (or the top, or middle, or the left) find where it says:

# License key for your server (https://keymaster.fivem.net)
sv_licenseKey changeme

4. Where it says "changeme" copy your server key and paste there. Make sure to keep the quotes (")

5. SAVE THE FILE


BOOM! :boom: Done! :ballot_box_with_check: That was easy, yeah? Hopefully this clears things up! :mascot:

15 Likes

Great tutorial for all the people who struggle with the new key system :slight_smile:

3 Likes

i personally like the key to see for who owns what server if there is an issue.

great tutorial for people :slight_smile:

2 Likes

Is it really THAT hard xD

I can’t believe you actually had to make this. How difficult do people really find this? xD

2 Likes

I mean, some people just don’t understand lol.

3 Likes

Wait, what do you mean when you say you “see” a server key?

1 Like

lol I’ve done it all as you see in my screenshots that I posted… still dosent work.

1 Like

I agree, it’s a super simple process but I’m having a slight issue regardless of that fact. It’s telling me the IP address I’m putting in isn’t a valid one, any way to fix that or do I have to contact support and have them switch my port?

This does not really fix that problem because most people new to FiveM will just click the link to download server on the main page with most of you will know is this https://wiki.fivem.net/wiki/Running_FXServer, with it’s a link to instructions on how to set up the server, but if you follow the instructions without making assumptions like a new person would do you will realize there are no instructions on this matter, not even a mention on troubleshooting about the error/warning that you get for not setting the key, you only get a hint if you read the server.cfg file. Besides that this was very helpfull to a new person like me.

1 Like

The console will tell you that you need to add a server key and provide a link to where to do so if one is not set up properly in the server.cfg. That being said, the wiki should be updated to show/say that a key is needed. Though, I do believe the devs are getting rid of the wiki soon? :thinking:

1 Like

Make sure you’re executing the config…

localhost

in IP doesn’t work

1 Like

Use 127.0.0.1 instead

2 Likes

It’s still coming up i do not know what to do from here.

1 Like

How do you have it in your server.cfg? You’re also making sure to execute the server.cfg file, right?

1 Like

It’s not that people don’t know how to follow instructions (well, at least some people), its a case of we follow the instructions, yet it still says that the key is invalid, which is the case for me. i have gone to keymaster.fivem.net and registered a key (twice) and pasted it in server.cfg where you say to, yet it still comes up with invalid key. I still don’t get why we should have to register a key, even if its just for 5 people to mess around on with car/script mods. i understand with bigger public/whitelisted servers like DOJRP and HighSpeed-Gaming, but for little private servers, it doesn’t make sense.

When you start your server, does it show only one resource starting? If so, you’re not executing your server.cfg file.

Hi im tryinng to get my server back on the list but whitout luck it dont even write this in log Authenticating server license key…
Server license key authentication succeeded. Welcome!

set es_enableCustomData 1
set sv_licensekey “q20d5xad0i6i1s5r31bcii2zfrqx6mbe”
sv_scriptHookAllowed 0

Thats how i put in cfg