EN · $ USD
FiveM and Roleplay Servers

FiveM "Couldn't Start Resource" and Server Won't Start Errors

7 min read Updated: OyunBulut technical team

In short

If your FiveM server won't start or shows a “Couldn't start resource” error, find the first red line in the console. The most common causes are a resource folder with the wrong name or extracted inside another folder, a missing fxmanifest.lua, a dependency that comes later in the ensure order, a bad oxmysql connection string, missing SQL tables, an invalid license key and port 30120 being used by another process.

In this guide
  1. First, read the console correctly
  2. Fixes by error message
  3. 1. Folder structure and wrong resource name
  4. 2. Broken or outdated fxmanifest
  5. 3. Missing dependency and ensure order
  6. 4. SQL and oxmysql errors
  7. 5. License key, artifact and escrow
  8. 6. Port conflict
  9. 7. The fast way to isolate a script error
  10. Server won't start after an update
  11. If the problem is a lack of resources
  12. Next step

If your FiveM server won't start or the console says Couldn't start resource, the problem is almost always written further up in the console, on the first red line. This error isn't a cause on its own; it's a result. FiveM tells you it couldn't start a resource, but it explains why a few lines earlier. In this guide, we cover how to read the console correctly and fix the common causes that block startup, in order, based on the error messages.

First, read the console correctly

  1. If you use txAdmin, open the Live Console page and restart the server.
  2. Scroll the console all the way up and read it top to bottom, not bottom to top. The first error often triggers the others in a chain.
  3. Note which resource the error belongs to. The @resource_adi/dosya.lua:42 format in the line gives you the file name and line number.
  4. If you suspect a single resource, comment out its ensure line in server.cfg with # and restart. If the server starts, you've found the problem resource.

Fixes by error message

Console messageLikely causeFix
Couldn't find resource XThe folder name doesn't match the ensure lineFix the folder name and remove -main suffixes
Resource manifest not found warningfxmanifest.lua is missing or sits in a subfolderMove the nested folder up one level
Could not find dependency Y for resource XThe dependency isn't installed or starts laterInstall the dependency and move it earlier in the ensure order
SCRIPT ERROR: @X/server.lua:NNLua syntax or runtime errorCheck the line it points to
oxmysql ECONNREFUSED / Access deniedThe database is down or the credentials are wrongCheck the connection string and the MariaDB service
Table '...' doesn't existThe script's SQL file wasn't importedImport the .sql file into the database
You lack the required entitlementThe escrowed script is registered to a different Cfx accountTransfer the script to the account your server key belongs to
License key validation errorsv_licenseKey is invalid or missingCheck the key in the Cfx.re Portal

1. Folder structure and wrong resource name

This is the most common cause. Scripts downloaded from GitHub as a ZIP come named script-adi-main, and often there's a second folder with the same name inside. FiveM looks for a folder that exactly matches the name in the ensure line and has fxmanifest.lua directly inside it.

# WRONG
resources/[yerel]/qb-garages-main/qb-garages-main/fxmanifest.lua

# CORRECT
resources/[yerel]/qb-garages/fxmanifest.lua

Folders in square brackets ([yerel], [qb]) are just category folders; you don't write them in the ensure line. For details on folder structure and load order, see the FiveM script installation: ensure and folder structure guide.

2. Broken or outdated fxmanifest

Every resource needs a valid manifest at its root. A minimal server-side manifest looks like this:

fx_version 'cerulean'
game 'gta5'
lua54 'yes'

shared_script '@ox_lib/init.lua'
client_script 'client.lua'
server_scripts {
  '@oxmysql/lib/MySQL.lua',
  'server.lua'
}

dependencies {
  'ox_lib',
  'oxmysql'
}
  • If the fx_version or game line is missing, the resource won't start.
  • If a file named in the manifest doesn't exist on disk, you get a load error; watch out for letter case, since on Linux servers Server.lua and server.lua are different files.
  • Scripts with the old __resource.lua manifest can cause problems with current versions; convert them to the fxmanifest.lua format.
  • Scripts that use modern Lua syntax (for example <const>) won't compile without the lua54 'yes' line.

3. Missing dependency and ensure order

Lines like @ox_lib/init.lua or @oxmysql/lib/MySQL.lua require that resource to have started first. In server.cfg, core libraries should always be at the top:

ensure oxmysql
ensure ox_lib
ensure qb-core
ensure [qb]
ensure [yerel]

When you ensure a whole category folder, the order inside it is alphabetical. If you run into dependency problems, ensure the affected script separately, after its dependency.

4. SQL and oxmysql errors

If a framework can't connect to the database, its core resource won't start, and dozens of scripts that depend on it throw errors in a chain. So don't panic when you see dozens of red lines in the console: they're usually echoes of a single database error, and they all disappear together once the connection is fixed. Checklist:

  1. Confirm that the MariaDB or MySQL service is running.
  2. Check the connection string; if the password contains special characters such as @ or :, they need to be URL-encoded:
set mysql_connection_string "mysql://kullanici:parola@127.0.0.1:3306/fivem?charset=utf8mb4"
  1. Import the .sql file for the framework and every new script into the database. Table doesn't exist and Unknown column errors mean this step is missing.
  2. Make sure the user has privileges on the relevant database.

For the full setup, see the FiveM oxmysql and MariaDB setup guide.

5. License key, artifact and escrow

  • License key: If the sv_licenseKey line is missing, or the key has been revoked or is tied to another IP, the server can't pass authentication. Check the key in the Cfx.re Portal.
  • Artifact: A very old server build doesn't recognize the native functions newer scripts use, while a very new, untested build occasionally causes incompatibilities. Switch versions in a controlled way.
  • Escrow: Encrypted (escrowed) scripts are tied to the Cfx.re account they were purchased on. If your server's license key belongs to a different account, the script won't start.

6. Port conflict

By default, FiveM uses port 30120 for both TCP and UDP, and txAdmin uses port 40120 for its web panel. If a second server on the same machine or an old process that never shut down is holding that port, the server can't start listening and throws a bind error.

# Windows: find the process using port 30120
netstat -ano | findstr :30120

# Linux
ss -tulpn | grep 30120

Close that process, or define a different port for the second server in the endpoint_add_tcp and endpoint_add_udp lines. If you use a ready-made game panel, the panel assigns ports; don't change them by hand. On Windows, an FXServer.exe process left hanging in the background after you shut down the server causes the same error; ending that process in Task Manager and restarting is usually enough.

7. The fast way to isolate a script error

If it isn't clear from the console which resource is causing the problem, the “split in half” method gets you there fastest. Instead of testing dozens of scripts one by one, you disable half of them and find which half has the problem:

  1. Back up your server.cfg file.
  2. Comment out half of the ensure lines with #, except the framework and core libraries (oxmysql, ox_lib, the core framework).
  3. Restart the server. If the error is gone, the problem is in the half you disabled; if it's still there, it's in the half that's still enabled.
  4. Split the problem half in two again and keep going until only one resource is left.

With this method, even on a server with a hundred resources, you find the broken script in a few restarts. Adding and testing only one resource at a time whenever you add new scripts means you never have to do this search at all.

Pre-launch checklist

  • Did you read the dependency list in the new script's README file?
  • Did you import the script's SQL file?
  • Does the folder name match the ensure line exactly?
  • Is the script compatible with the framework version you use (ESX Legacy, QBCore, QBox)?
  • Did you back up your server files and database before making changes?

Server won't start after an update

If a server that ran fine yesterday won't start after a framework or script update, the first thing to do is roll back the change. That's why you should back up the resources folder and the database before every update. New column or table requirements that come with an update are usually provided as a separate SQL file in the release notes; copying only the files and skipping that SQL change is the most common cause of an Unknown column error at startup. When you update the framework, use compatible versions of the scripts that depend on it too; an old inventory script throws chained errors when it can't find the new core functions. If possible, try the update on a test server first, then move it to production.

If the problem is a lack of resources

If the server starts but hangs for a very long time at startup, crashes randomly or runs out of memory while loading, the problem is resources more than code. A large QBCore or ESX pack with addon vehicles and maps needs a lot of memory at startup. In that case, moving to a bigger plan such as OB-FIVEM-3 with 4 CPU cores and 6 GB DDR5 RAM is a more lasting fix than disabling scripts one by one.

Next step

When you read the console from the top and follow the table, most startup problems are solved within minutes. If the error is in a specific script's code and you can't find the source, you can ask for it to be fixed through the FiveM Developer Service. If you want to set up your server with a clean start, OyunBulut's OB-FIVEM-3 FiveM server comes with automatic setup, and you can get help in Turkish through a support ticket for infrastructure questions.

Frequently asked questions

What does the Couldn't start resource error mean?

It's a result message showing that FiveM couldn't start the specified resource. The real cause is usually written a few lines higher in the console, on the first red error line.

I dropped the script folder in, but the server can't find it. Why?

The folder name must match the ensure line exactly, and fxmanifest.lua must sit directly inside that folder. Nested folders with a -main suffix from a ZIP file are the most common cause.

How do I fix the oxmysql ECONNREFUSED error?

Check that the database service is running and that the address, port, user and password in mysql_connection_string are correct.

What does the You lack the required entitlement error mean?

The escrowed script isn't registered to the Cfx.re account your server's license key is tied to. You need to transfer the script to the correct account.

Which ports does FiveM use?

By default, it uses 30120 TCP and UDP for game connections and 40120 for the txAdmin web panel.

For this guide

Recommended plans

Large framework packs need a lot of memory at startup, so OB-FIVEM-3's 4 CPU cores and 6 GB DDR5 RAM remove startup problems on the resource side; for code-related errors, the Developer Service offers a direct fix.

OB-FIVEM-3

Recommended

6 GB DDR5 RAM

$15.73/mo

+VAT

  • Processor4 CPU
  • Disk60 GB NVMe
  • LocationIstanbul
  • DDoS
  • Automatic Setup

Dedicated developer service, weekly or monthly.

$196.62/mo

+VAT

  • LocationIstanbul
  • 5.000 TL
  • 10.000 TL
  • Automatic Setup

FiveM — tüm paketler FiveM Services — tüm paketler

Need help with setup?

Send questions about your service in a support ticket, and our technical team will walk you through it step by step.