server.cfg Not Found: Folder Layout and the Right Start Command
FXServer cannot find server.cfg or reports a missing license key? Keep it in server-data, start from there with +exec server.cfg, and check the console.
Short answer: keep server.cfg in your server-data folder, not in the binaries folder. Start FXServer from that folder with +exec server.cfg. If the console still says the file is missing, the start folder is wrong.
Last checked: 5 December 2026
Where should server.cfg be?
The official vanilla setup uses two folders. The first holds the server binaries. The second holds the cfx-server-data files, and it sits outside the binaries folder. The docs use these examples:
- Windows:
C:\FXServer\serverfor the binaries,C:\FXServer\server-datafor the data. - Linux:
~/FXServer/serverfor the binaries,~/FXServer/server-datafor the data.
The docs then say to make server.cfg in your server-data folder. Copy the example file into it, then edit it there.
How do I start the server so it finds the file?
Start the server from the server-data folder. The official commands are:
Windows, in cmd.exe:
cd /d C:\FXServer\server-data
C:\FXServer\server\FXServer.exe +exec server.cfg
Linux:
cd ~/FXServer/server-data && bash ~/FXServer/server/run.sh +exec server.cfg
The /d flag is only needed when you change to a folder on another drive. Keep +exec server.cfg in the command.
Where does the license key go?
Set the key in server.cfg with sv_licenseKey "licenseKeyGoesHere", and replace the placeholder with your own key. The server commands reference says the key comes from portal.cfx.re.
If FXServer never opens server.cfg, it never reads that line. So a "missing license key" message can come from a wrong path, not a wrong key. Fix the folder first, then check the key.
Check the first console lines
- Start the server with the command above.
- Read the first lines of the console. A forum thread reports the message
No such config file: server.cfgwhen the server starts from the wrong folder. - On Windows, check the file name. In the same thread, a user found the file saved as
server.cfg.txtbecause file extensions were hidden. - Fix the folder or the name, then start the server again.
Common mistakes
- Starting FXServer from the binaries folder while the file is in
server-data. - Saving the file as
server.cfg.txt. - Leaving out the
sv_licenseKeyline, or writing it in a format other than the one in the docs.
Frequently asked questions
Can server.cfg go in the binaries folder?
The official setup puts it in server-data. Use that location so your paths match the docs.
Do I have to use +exec?
The official launch commands pass +exec server.cfg. Use the same form.
The console still says the key is missing. What now?
Read the lines above that message, confirm the file name and folder, and check that the line reads sv_licenseKey "..." with the key from portal.cfx.re.
Sources
- FiveM docs, Setting up a vanilla FXServer: https://docs-backend.fivem.net/docs/server-manual/setting-up-a-server-vanilla/
- FiveM docs, Server commands (sv_licenseKey): https://docs.fivem.net/docs/server-manual/server-commands
- Cfx.re forum, "Can't find server.cfg": https://forum.cfx.re/t/cant-find-server-cfg/115798
FiveM.tools was founded with sponsorship from Nyru.