# How To Configure Your RedM Server (/docs/redm/configure-your-server)



import { Step, Steps } from 'fumadocs-ui/components/steps';

RedM servers are primarily configured through the `server.cfg` file, which controls server settings, resources, permissions, and more. This is very similar to FiveM configuration if you are familiar with that platform.

Basic Configuration [#basic-configuration]

<div className="fd-steps">
  <div className="fd-step">
    Open the XGamingServer Panel [#1-open-the-xgamingserver-panel]

    Log in to the [XGamingServer Panel](https://panel.xgamingserver.com).
  </div>

  <div className="fd-step">
    Open Files [#2-open-files]

    In the sidebar, click **Files**.
  </div>

  <div className="fd-step">
    Open server.cfg [#3-open-servercfg]

    Find and click on `server.cfg` to open it in the editor.
  </div>

  <div className="fd-step">
    Review Key Settings [#4-review-key-settings]

    Here are the most important settings in your `server.cfg`:

    ```
    # Server name displayed in the browser
    sv_hostname "My RedM Server"

    # Max players
    sv_maxclients 32

    # License key from keymaster.fivem.net
    sv_licenseKey "your_license_key_here"

    # Steam Web API key (optional, for Steam authentication)
    set steam_webApiKey "your_steam_api_key"

    # Server icon (must be a 96x96 PNG)
    load_server_icon myicon.png

    # Server tags (shown in server browser)
    sets tags "roleplay, rdr2, vorp"

    # Server description (shown in browser)
    sets sv_projectDesc "A Red Dead Redemption 2 roleplay server"

    # Locale
    sets locale "en-US"

    # OneSync (required for higher player counts and recommended for all servers)
    set onesync on

    # Database connection (required for most frameworks)
    set mysql_connection_string "mysql://user:password@host/database?charset=utf8mb4"
    ```
  </div>

  <div className="fd-step">
    Save and Restart [#5-save-and-restart]

    After making changes, click **Save** and **restart** your server.
  </div>
</div>

Loading Resources [#loading-resources]

Resources (scripts, maps, game types) are loaded in `server.cfg` using the `ensure` or `start` command:

```
# Ensure a resource starts
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager

# Start a custom resource
ensure my-custom-resource
```

> 📝 **Note:** Resources must be placed in the `resources` directory before they can be loaded. See the [Install Resources](/docs/redm/install-resources) guide for details.

Server Convars [#server-convars]

You can set custom convars (configuration variables) that resources can read:

```
# Set a convar
set my_custom_setting "value"

# Set a replicated convar (visible to clients)
setr my_replicated_setting "value"
```

> 💡 **Tip:** Always make sure you have a valid [cfx.re license key](/docs/redm/create-license-key) set in your configuration. Without it, your server will not start properly.

If you need help with configuration, join our [Discord](https://discord.xgamingserver.com) and we will help you out.
