Skip to content

Runtime Configuration Reference

Southclaws edited this page Mar 9, 2018 · 7 revisions

A Runtime Configuration is a samp.json or samp.yaml file - whichever you prefer. It's a JSON or YAML version of the server.cfg file you are already familiar with.

If your server directory has a Runtime Configuration file in it, the values will be used to generate a server.cfg file when you use sampctl server run or sampctl server ensure.

The setting key names are the exact same as the server.cfg settings the only difference is how the gamemodes settings are handled.

In server.cfg for multiple gamemodes, you have multiple gamemode# entries, like:

gamemode0 sumo
gamemode1 golf
gamemode2 tdm

But in JSON-land, this looks like:

{
  "gamemodes": ["sumo", "golf", "tdm"]
}

Currently, there's no way to set the number of times each gamemode will repeat. If there is demand for this feature, I will implement it.

Additional Settings

There are additional fields that do not go into the server.cfg file, these are for controlling sampctl itself.

  • version The SA:MP server version to use
  • endpoint Endpoint URL to download server binaries from - defaults to http://files.sa-mp.com
  • mode The Runtime Mode of the server - only really applies to packages
  • extra An object containing strings for any additional settings for plugins for example:
    {
      "extra": {
        "discord_token": "abc123"
      }
    }

All Possible Settings

key value type
version string
endpoint string
mode string
extra . object of strings
gamemodes array of strings
rcon_password string
announce bool
maxplayers int
port int
lanmode bool
query bool
rcon bool
logqueries bool
stream_rate int
stream_distance float
sleep string
maxnpc int
onfoot_rate int
incar_rate int
weapon_rate int
chatlogging bool
timestamp bool
bind string
password string
hostname string
language string
mapname string
weburl string
gamemodetext string
filterscripts array of strings
plugins array of strings
nosign string
logtimeformat string
messageholelimit int
messageslimit int
ackslimit int
playertimeout int
minconnectiontime int
lagcompmode int
connseedtime int
db_logging bool
db_log_queries bool
conncookies bool
cookielogging bool

Environment Variables

You can also use environment variables to configure, just prefix them with SAMP_ and uppercase the rest.

For example: rcon_password's environment variable is SAMP_RCON_PASSWORD.

Clone this wiki locally