Error when starting server, no key specified

I’m having the same problem. I can’t get my server to start whatsoever with a fatal error saying this server does not have a license key specified. I also get an error in the command prompt saying no such config file: server.cfg Here is my server.cfg file:

# you probably don't want to change these!
# only change them if you're using a server with multiple network interfaces
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"

start mapmanager
start chat
start spawnmanager
start sessionmanager
start fivem
start hardcap
start ■■■■■■■
start scoreboard
start playernames

sv_scriptHookAllowed 1

# change this
#rcon_password yay

sv_hostname "TheHavenGamingRP"

# nested configs!
#exec server_internal.cfg

# loading a server icon (96x96 PNG file)
#load_server_icon myLogo.png

# convars for use from script
set temp_convar "hey world!"

# disable announcing? clear out the master by uncommenting this
#sv_master1 ""

# want to only allow players authenticated with a third-party provider like Steam?
#sv_authMaxVariance 1
#sv_authMinTrust 5

# add system admins
add_ace group.admin command allow # allow all commands
add_ace group.admin command.quit deny # but don't allow quit
add_principal identifier.steam:110000112345678 group.admin # add the admin to the group

# remove the # to hide player endpoints in external log output
#sv_endpointprivacy true

# server slots limit (must be between 1 and 31)
sv_maxclients 30

# license key for server (https://keymaster.fivem.net)
set sv_licenseKey "server key here"
1 Like
  1. Don’t hijack others threads. That’s not proper forum etiquette.

  2. You’re making sure to add +exec server.cfg when starting your server, correct?

2 Likes

Sorry I am at work and didn’t see a rules thread for posting. I saw other users posting their problems in other peoples threads so I didn’t think it was a big deal. When I open the command prompt to start the server this is what I put: cd /d C:\FXServer\server-data and then I put C:\FXServer\run.cmd +exec server.cfg Thanks for the help. I really appreciate it.

1 Like

Do you not read stuff when you put it in your server?
Good thing to do is read everything first then ask.

Alright I couldn’t get the glow to work in Word so I couldn’t blur my server key out so I put “server key here”. So what exactly is the problem here? And yes I know how to read. The fatal error I receive says that the server key needs to be in this format
set sv_license key “key”.

Okay Jake Ryan what did I do wrong here?

How are you trying to start your server? What do you do exactly? Do you type in a command in command prompt to start your server? Are you clicking on a .bat or .cmd file, are you clicking the .exe file? Let us know exactly what you’re doing to start your server so we can try to point you in the right direction.

I open the command prompt and start it that way. Once I open the command prompt I put in: cd /d D:\FXServer\server-data and press enter and then I put in: D:\FXServer\run.cmd +exec server.cfg and press enter. I get a fatal error saying that this server does not have a license key specified and in the command prompt, I also get the error that no such config file: server.cfg. I have looked over the server key guide that Not_Blu has posted in other forum posts and I have the key exactly as it says to put it in and to no avail, it still says that there is no server key specified.

2 Likes

Alright so the key is probably setup correctly, the issue is your server.cfg file couldn’t be found. Where did you put your server.cfg file? In your server-data folder or in your FXServer folder? And are you sure you spelled it correct?

1 Like

I put it in the server-data folder.

It looks like your server.cfg file is actually a server.cfg.txt file, try opening it in notepad, then click “save as”, make sure to select “all file types” instead of “text document, .txt” and save it as server.cfg again.

1 Like

I click all file types and it keeps saving it as a txt file. Odd. I wonder if I do it with notepad++ if it would save differently.

1 Like

Most likely notepad++ will allow you to do it correctly, if not download this file and put your server.cfg contents in it:
server.cfg (17 Bytes)

4 Likes

That was it. Thank you so much. It started perfectly. So I do have one question. In the cfg it said to change the password for rcon. Is that the password people will use to access my server?

No that password can be used by you to login using icecon (rcon) to manage your server via a command line. Or you can use it for the runcode resource if you’re testing some code.

Okay just making sure. Also I just went into fivem and my server isn’t there and I searched for it as well? Is that a common problem?

It can take up to 4 minutes before it shows up. Granted you’ve set everything up correctly.

If you’re running your server from a computer at home, check this out:

So how do I connect to my own server. Do I direct connect or do I find it on the list and connect that way? I found it and it wouldn’t let me connect. It tried 3 times.

Direct connect to localhost

Okay thanks man you were a big help. Also, how do I setup a password for my server?