Server Configuration

Revision as of 14:28, 29 August 2023 by Mex (talk | contribs)

Summary

The default server configuration file is named server.xml, and is located in the same folder as the file named Server.exe on Windows or Server on Linux.
You can use a custom server configuration file with the -config option. Example: Server.exe -config my-config.xml. See the server command line page for more info on accepted command arguments.
The file uses the XML syntax, with a root node named server. Official XML Specification

Settings

Server Property Name Default Value Description
bindip true Forces the server to use a specific IP. Only for hosts that have multiple IP addresses.
cvar null Sets a server's cvar value. See CVars for more information.
duplicatenames false The status of whether to allow players with duplicate names.
game gta:iii (required) The identifier of the game that the server should run for. See game identifiers for more information.
gamemode n/a (required) Custom text to identify the game mode. Appears in the server browser. This is not IV gamemode ID.
httpport 22000 The port for the server to transfer HTTP data on, between 0 and 65,535.
httpserver true Whether or not to run the HTTP server.
httpurl "" (empty string) A URL (like a CDN) containing the server's client resource files and scripts. Clients will download them from that URL instead of the server.
iv_episode -1 Sets the DLC to use for IV. See IV Episodes for more information.
iv_gamemode 8 Sets the built-in gamemode for IV. See IV Gamemodes for more information.
iv_nativemultiplayer true If enabled, server uses native sync (from Rockstar/GFWL), otherwise server uses GTAC's custom sync.
logpath "" (empty string) The path to store the server logs. Leave blank to not use server logs.
logtimestamp "" (empty string) The timestamp format to use in the log files. Based on the strftime format from C++. Some examples:

[%H:%M:%S] This displays only the time.
[%d/%m/%Y %H:%M:%S] This would display the date in dd/mm/yyyy format followed by the time in hour:minute:second format.

maxplayers 255 The maximum amount of players that can connect to the server, between 0 and 255.
minclientversion 1.3.0 The minimum version that clients can connect with. See latest client version here.
modules (empty node) The modules to load. Use the <module> tag inside the <modules> tag, for each module to load, including the src attribute for the directory path.
multithreaded false Enables/disables using multiple threads for managing network peers. Useful on multi-core systems.
password "" (empty string) The password to connect to the server.
pickupstreamindistance 50.0 The distance that a pickup is sent to the client, recommended to be about 50.0.
pickupstreamoutdistance 100.0 The distance that a pickup is removed from the client, recommended to be about 100.0. Must be higher than pickupstreamindistance.
port 22000 The port for the server to listen on, between 0 and 65,535. Players only need to know the port if using the /connect command in-game, not when using the server browser.
rcon false [Inoperable] The status of whether the server will host the remote console service.
rconpassword "" (empty string) The password to connect to the remote console service.
resources (empty node) The resources to load. Use the <resource> tag inside the <resources> tag, for each resource to load, including the src attribute for the directory path.
rule "" (empty string) Adds a server rule. See server rules for more info.
serverbrowser false The status of whether to show the server in the server browser, use true or false.
servername n/a (required) The name of the server, which appears in the server browser.
streamindistance 100.0 The distance that an entity is sent to a client, recommended to be about 100.0 mainly because of game limits.
streamoutdistance 200.0 The distance that an entity is removed from a client, recommended to be about 200.0. Must be higher than streamindistance.
syncinterval 30 The interval, in milliseconds, of each sync occurrence for the regularly sync'd data, between 0 and 65,535.
syncmethod interval The sync type for regularly sync'd data. Use none, interval, or replay. (See sync methods section below.)
timesync false Enables/disables syncing the time set by server to all clients.
weathersync false Enables/disables syncing the weather set by server to all clients.

CVars

See the CVars page for info.

Sync Methods

There are a few different config options for server sync. Here is the list of them and a brief description of each.

Name Description
none Disables element sync entirely. Not recommended for multiplayer environments.
replay This will sync elements as soon as they're processed. If CPU usage is too busy and processing is slow, sync will be too.
interval Default. This forces sync of elements at a specified interval. Use <syncinterval> in server config to set the interval time in milliseconds (ms)

Optional Settings

Most of the XML server config settings are optional, and have a default value used if not specified.
The "Default Value" column in the settings list shows "required" if the setting is required.
To explicitly not specify a server config XML setting, either remove that setting's XML element, or comment it out with an XML comment.
Do not leave a setting's XML element present with a blank value.

IV Settings

Server config settings iv_episode, iv_gamemode, and iv_nativemultiplayer, are all optional to be specified in the server config XML file. Check the list above for default values.

When iv_nativemultiplayer is false:

iv_episode and iv_gamemode are ignored, whether they are specified or not.

When iv_nativemultiplayer is true:

iv_episode and iv_gamemode are acknowledged and used if specified, or their default values are used if not specified.

iv_gamemode -1
This means that an internal IV gamemode is not used, and that a sandboxed scripting environment is preferred.
A script will need to be present to fade the camera in and spawn the player, via scripting functions fadeCamera and spawnPlayer.

iv_gamemode 30
This is an outdated value for iv_gamemode, and should not be used. Please use -1 instead.
Using iv_gamemode with a value of 30, is different than using iv_gamemode with a value of -1.
This setting value is currently left in for backward compatibility, however may become obsolete in the future.