NEW 📢 Save up to 30% on your first month, limited time offer!

How to Configure Your RedM server.cfg

RedMUpdated Sep 24, 20263 min read

A RedM server is configured by one file, server.cfg, which is a list of console commands the server runs at startup. Everything from the name to which scripts load is in there.

Open the file

  1. Stop the server.
  2. In the panel open Files and open server.cfg in the server root.

The essential lines

endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"

sv_hostname "My PlayNHost RedM Server"
sv_maxclients 32
sv_projectName "My Server"
sv_projectDesc "Roleplay, whitelist applications open"

sv_licenseKey "your-key-here"
sv_endpointprivacy true
sv_scriptHookAllowed 0
  • endpoint_add_tcp and endpoint_add_udp must use the port allocated to your server, shown on the server overview. Leave the address as 0.0.0.0 so the server binds correctly.
  • sv_hostname is the name in the server list, and supports colour codes.
  • sv_licenseKey is required. Without it the server will not start. See the section below.

The licence key

RedM servers need a free licence key from the Cfx.re keymaster.

  1. Sign in at keymaster.fivem.net with your Cfx.re account.
  2. Create a new key. Choose the option for a server on a fixed IP and enter your server's IP address from the panel.
  3. Copy the key into sv_licenseKey in server.cfg.

The key is tied to the IP you registered it with. If your server IP changes, update the key in the keymaster or the server stops appearing in the list.

Treat the key as a secret. Do not paste it into a support ticket or post it publicly.

Slots

Your plan's slot count is applied through the MAX_PLAYERS variable on your server's Startup Settings page, reachable from the server overview. Raising sv_maxclients alone does not add slots. Upgrade the plan in the billing area to run more players.

Starting resources

Every resource the server runs needs a line:

ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager-rdr3
ensure my-resource

Order matters. A framework resource must be started before anything that depends on it.

Apply the changes

Save the file and start the server. Read the panel console, which reports each resource as it starts and names any that fail with the reason.

CREATE YOUR GAME SERVER
READY TO GET STARTED?

Save up to 30% on your new game server.
Premium performance, instant activation, and unbeatable reliability all at a better price.

OUR LATEST BLOGS