Installing Server-Sided EUP - The Right Way
Setting up a server.cfg
Flawless Widescreen/Custom FOV FiveM
FiveM Weapon Models
MLO Door Locks
WildFyr Documentation > FiveM Tutorials > Setting up a server.cfg
Setting up a server.cfg
Every FiveM server has one, a server.cfg
And if you have any ensure
or ace perms
nodes in it, your doing it wrong.
So, lets fix that
The first thing that you need to do is see a proper server.cfg file, Here is the cfg file from my server, only 38 total lines and even then most of it is empty space or comments for organization.
Lets break it down, shall we?
set sv_enforcegamebuild 2699
- This sets every ones game to the latest (as of this article) game build so the server will let players use the latest clothing, cars, and map assets from GTA and GTA Online updates.
exec permissions.cfg/exec resources.cfg
- This tells the server.cfg to find an external file, inthis case both permissions.cfg and resource.cfg and run the code in them. (We will get back to this later)
endpoint_add_tcp "0.0.0.0:30120"/endpoint_add_udp "0.0.0.0:30120"
- Tells the server what port to use both TCP and UDP, don't touch if you don't know what you are doing
sv_maxclients 10
- Sets the max users who can connect
set steam_webApiKey "API-KEY"
- Lets your server auth with Steam
sv_licenseKey "cfxk_LICENSE-KEY"
- Your CFX license key
sets tags
sv_hostname
sets sv_projectName
sets sv_projectDesc
load_server_icon
- All parts used for the end user on the FiveM server search
sets locale "en-US"
- Sets the region and language used by the server, if you are form the US you can use this on, if not the FiveM forums has a lit of all local codes you can use.
Alright, with that out of the way lets take a look at the permission.cfg and resoruces.cfg
resources.cfg
As you can see this also have a lot of organization in the please of each resource or resource folder the server starts on star up.
This whole thing is pretty self explanatory, ensure resource_name
-or- ensure [resource_folder_name]
permissions.cfg
Now this one is a bit longer but this is mostly due to the fact that we have vMenu and that has a lot of permissions but it also has a lot of comments both added by the devs of vMenu but also myself for my devs to see waht happens and what some things do, comments are your best friend so don't forget to use them. And if you don't know how to add comments on a specific file, if you are using Visual Studio Code you can use the keyboard shortcut ctrl+/
to comment out selected text. I hope this helps you keep your server configuration files organized and easier to navigate, and also make it a lot harder to fuck out for server.cfg because you wanted to add a sex script but accidentally over wrote your server host name and port.
Review this page