/ Support / FiveM / Understanding and Configuring Your server cfg File in FiveM
server.cfg
in FiveMThe server.cfg
file is the primary configuration file for your FiveM server. This is where you set important options such as license key, resources, database connections, and more. Below, we’ll go through the different sections of the example you provided. Customize the file to suit your server’s needs and setup.
sv_master1
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
sets tags "roleplay, dansk, english"
sv_endpointprivacy true
net_maxPackets 50
sv_forceIndirectListing false
sv_connectTimeout 120
sv_maxclients 48
true
, this hides players’ IP addresses in certain logs and scripts.false
, your server can appear directly in the FiveM server list.set steam_webApiKey none
sv_licenseKey cfxk_XXXXXXXXXhPXXXXXXX_XXXXX7
none
.sets sv_hostname "My awesome fivem server"
sets sv_projectName "My awesome fivem server"
sets sv_projectDesc "My awesome fivem project"
sets locale "da-DK"
load_server_icon Logo.png
sets sv_enforceGameBuild 3095
Logo.png
) as your server icon.# Voice config
setr voice_useNativeAudio true
setr voice_useSendingRangeOnly true
setr voice_defaultCycle "GRAVE"
setr voice_defaultVolume 0.3
setr voice_enableRadioAnim 1
setr voice_syncData 1
`
(backtick) key on a QWERTY keyboard.# QBCore locale config
setr qb_locale "en"
exec perms.cfg
# These resources will start by default.
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode
ensure hardcap
ensure baseevents
# QBCore & Extra stuff
ensure ox_lib
ensure qb-core
ensure ram_monitor
ensure chat
ensure qb-multicharacter
ensure cd_drawtextui
ensure qb-target
ensure
lines make sure all necessary resources and scripts are started. Bracketed folder names (e.g., [qb]
, [illegal]
) help keep the structure organized.set mysql_connection_string "mysql://username:[email protected]:3306/database_name"
mysql://username:password@host:port/databasename
.server.cfg
in case you need to restore it.#
to organize your configuration and add short descriptions about what each change does.qb-core
before qb-policejob
).server.cfg
.onesync
) should be configured there instead of in server.cfg
.If you need stable FiveM hosting or help with configuration, we offer:
CTA: Ready to get started or upgrade your FiveM server? Check out our FiveM hosting plans here.
With a properly configured server.cfg
, your FiveM server will run more reliably and be easier to manage. Have fun!
Feel free to contact us if you have questions, and we will get back to you.
Contact one of our live chat supporters to receive real-time assistance.
Join our community Discord and ask any questions you may have.
Our knowledge base contains a wealth of information to help you with the issue you're facing.