Recommended FiveM server.cfg settings
A few settings in server.cfg are worth adding to every FiveM server that is open to the public. They decide how your server shows up in the FiveM server list, whether your server's IP address is published there, and how many connections the server accepts before it starts turning players away.
This page explains each one, so you can pick the ones that fit your server.
Where to edit server.cfg
Edit the server.cfg your server actually starts with:
- In txAdmin, open CFG Editor. To open txAdmin, pick Configuration in your server's side menu and click Open txAdmin.
- In the dashboard, pick Files in the side menu. The file is in the server data folder you chose when you set up txAdmin, usually somewhere inside
txData/.
Restart the server after saving so the changes take effect.
The short version
Add these lines near the top of server.cfg:
Code
The rest of this page explains these two lines and the related settings you only need with your own domain or proxy.
Lines the platform writes for you
Every time your server starts, the platform goes through each server.cfg in your server files (under config/ and txData/) and:
- removes any
endpoint_add_tcp,endpoint_add_udpandset sv_listingIpOverridelines, and - adds fresh ones at the very top, with your server's own port and public IP address.
So the top of your server.cfg always looks like this, with your own values:
Code
Leave these three lines alone. Anything you change in them is replaced on the next start. You can see your server's address and port on the External Access page, in the How players join card.
sv_forceIndirectListing
The Cfx.re proxy setup guide describes it as a setting that "prevents the server list from advertising your server using its actual IP."
With it on, the FiveM server list does not publish your IP address. Players still find and join your server through the list as usual. People who collect IP addresses from the public list to attack servers do not get yours from there.
Recommended value: true. It has no downside for a normal server.
sv_listingIpOverride
This tells the server list which IP address to contact to read your server's details (player count, name and so on). Players never see it.
The platform already writes the right value on every start (see above), so you do not need to add it. A line you add yourself is removed at the next start.
sv_listingHostOverride
This makes the server list contact your server at an address you choose, for example http://play.example.com:<your-port>/, instead of the raw IP address. When sv_forceIndirectListing is on, players who join from the server list are also sent to this address.
Use it only when your server has its own domain or sits behind your own proxy. Leave it out otherwise. The full setup is in Show your domain in the FiveM server list.
sv_endpoints
The Cfx.re guide describes it as "the actual endpoint your server is hosted on, or one or multiple server endpoint proxies."
You only need it if you run your own proxy or protection service in front of the server and players must connect to the proxy's address instead of the server's. Without a proxy of your own, leave it out.
set net_tcpConnLimit 50000
This limits how many connections the server accepts at the same time from one IP address. The default is low. Under real load the server list, player connections and file downloads open many connections at once, and when the limit is reached the server refuses new ones. Players then see connection errors.
50000 is generous enough that this limit never gets in the way, while the server still has an upper bound.
When to contact support
Contact support if you have added these settings and:
- players still lose connection or cannot join when the server is busy,
- the server does not appear in the server list, or
- players cannot join using the address from the External Access page.
Send your server.cfg with the license key and rcon_password removed, and the link to your server's page in the dashboard.
