# server.cfg explained line by line

Source: https://rpbase.org/guides/server-cfg-explained
Publisher: RP Base (https://rpbase.org)
Updated: 2026-11-12

> server.cfg tells the server which ports to listen on, how many players it holds, its license key, whether OneSync is on, which game build to use, which resources to start and who is an admin. Lines starting with # are comments.

The lines in a FiveM server.cfg that every owner should understand: ports, slots, the license key, OneSync, the game build, resources and permissions.

## Ports
```
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
```
The server listens on port 30120 for both TCP and UDP. Open both in your firewall.

## Name and slots
```
sv_hostname "My City | Serious RP"
sets sv_projectName "My City"
sets sv_projectDesc "Serious roleplay, whitelisted"
sv_maxclients 48
```
The project name and description show in the server browser.

## License key
```
sv_licenseKey "your key here"
```
Get it from the Cfx.re portal. Never post it in Discord or on GitHub.

## OneSync
```
set onesync on
```
Needed for more than 32 players and by most modern scripts. See [What OneSync is](https://rpbase.org/guides/what-is-onesync).

## Game build
```
sv_enforceGameBuild 3258
```
Forces a newer GTA V build, which unlocks newer cars, clothing and map areas. Players download it on first join.

## Resources
```
ensure oxmysql
ensure ox_lib
ensure my_garage
```
`ensure` starts a resource. Order matters: start libraries before the scripts that use them.

## Admins
```
add_ace group.admin command allow
add_principal identifier.fivem:123456 group.admin
```
See [ACE permissions explained](https://rpbase.org/guides/fivem-ace-permissions).
