Server Hosting – Arma Reforger
Lou Montana (talk | contribs) m (Fix) |
Lou Montana (talk | contribs) m (Fix 'operating' section) |
||
Line 127: | Line 127: | ||
}, | }, | ||
"operating": { | "operating": { | ||
"lobbyPlayerSynchronise": true | |||
"lobbyPlayerSynchronise": true | |||
}, | }, | ||
"a2sQueryEnabled": true, | "a2sQueryEnabled": true, | ||
Line 341: | Line 339: | ||
{{ArgTitle|4|operating|{{GVI|armaR|0.9.7}}}} | {{ArgTitle|4|operating|{{GVI|armaR|0.9.7}}}} | ||
<!-- | |||
===== storage ===== | ===== storage ===== | ||
default: "online" | default: "online" | ||
Allows selection of storage for storing player/game data - | Allows selection of storage for storing player/game data - this option only makes sense if the server is allowed to use cloud storage (e.g official servers). | ||
Possible values: | Possible values: | ||
* {{hl|online}} - cloud storage - only works for official servers | |||
* {{hl|online}} - cloud storage | * {{hl|local}} - files in profile directory - should be {{hl|local}} for a community server | ||
* {{hl|local}} - files in profile directory | --> | ||
===== lobbyPlayerSynchronise ===== | ===== lobbyPlayerSynchronise ===== | ||
bool value, default: false | bool value, default: false | ||
If enabled, the list of player identities present on server are sent to the GameAPI with heartbeat (advanced synchronisation). | If enabled, the list of player identities present on server are sent to the GameAPI with heartbeat (advanced synchronisation). | ||
{{Feature|informative|This setting solves the "ghost players" that are preventing players to connect to a non-full server.}} | |||
<!-- | |||
===== disableCrashReporter ===== | ===== disableCrashReporter ===== | ||
bool value, default: false | bool value, default: false | ||
If enabled, the automatic server-side [[Arma Reforger:Crash Report|Crash Report]] is disabled. | If enabled, the automatic server-side [[Arma Reforger:Crash Report|Crash Report]] is disabled. | ||
--> | |||
==== Template ==== | ==== Template ==== | ||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
Line 403: | Line 401: | ||
==== Scenario Selection ==== | ==== Scenario Selection ==== | ||
'''Scenario''' and '''Source''' are two related fields | '''Scenario''' and '''Source''' are two related fields: | ||
* '''Scenario''' is the list of all available scenarios | * '''Scenario''' is the list of all available scenarios | ||
* '''Source''' is a read-only field telling from which mod (or {{armaR}}) the selected Scenario is. | * '''Source''' is a read-only field telling from which mod (or {{armaR}}) the selected Scenario is. | ||
Line 432: | Line 430: | ||
{{Feature|informative|A community Docker image is available on GitHub: https://github.com/acemod/docker-reforger}} | {{Feature|informative|A community Docker image is available on GitHub: https://github.com/acemod/docker-reforger}} | ||
# Install the latest Docker | # Install the latest Docker: | ||
## {{Link|https://docs.docker.com/desktop/windows/install/|Download}} and install Docker | |||
## [https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v Enable Hyper-V in Windows] if it is not already | ## [https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v Enable Hyper-V in Windows] if it is not already | ||
## Assign HW resources in {{hl|Docker/Settings/Resources/Advanced}}: | ## Assign HW resources in {{hl|Docker/Settings/Resources/Advanced}}: |
Revision as of 17:25, 11 January 2023
Server Hosting is the fact of hosting a game instance accessible over the network to other players. There are two possible modes in Arma Reforger: player-hosted and dedicated.
Dedicated Server
A Dedicated Server is a server without any game instance launched; it purely processes game information and network synchronisation.
Ports
Protocol | Port | Description |
---|---|---|
UDP | 2001 | Game port |
UDP | 50000..65000 | Steam communication ports |
UDP | 17777 | Steam Query protocol used to provide Steam with server status (amount of players, scenario name, etc) |
BattlEye
It is possible to modify BattlEye's RCon port and password by adding the following settings to Arma Reforger
RConPort 5678 RConPassword myNewBEPassword
Startup Parameters
See Startup Parameters - Hosting and the Configuration section below for more information.
config
The Server exe uses the -config startup parameter to target the configuration file.
ArmaReforgerServer.exe -config ".\Configs\Campaign_SWCoast.json"
In above example, Campaign_SWCoast.json is expected to be locted in Configs folder next to the exe.
maxFPS
ArmaReforgerServer.exe -maxFPS 60
Others
Below Arma Reforger:Startup Parameters are optional but may prove useful upon some cases:
- logStats - allows to log server's FPS every x milliseconds
- logLevel - sets the log detail level
- listScenarios - logs available scenario {{|.conf}} file paths on startup
Configuration File
Arma Reforger uses JSON configuration format to run. A configuration file looks like this:
{
"dedicatedServerId": "",
"region": "EU",
"gameHostBindAddress": "",
"gameHostBindPort": 2001,
"gameHostRegisterBindAddress": "",
"gameHostRegisterPort": 2001,
"adminPassword": "changeme",
"game": {
"name": "Server Name - Mission Name",
"password": "",
"scenarioId": "{ECC61978EDCC2B5A}Missions/23_Campaign.conf",
"playerCountLimit": 32,
"autoJoinable": false,
"visible": true,
"supportedGameClientTypes": [
"PLATFORM_PC",
"PLATFORM_XBL"
],
"gameProperties": {
"serverMaxViewDistance": 2500,
"serverMinGrassDistance": 50,
"networkViewDistance": 1000,
"disableThirdPerson": true,
"fastValidation": true,
"battlEye": true,
"VONDisableUI": true,
"VONDisableDirectSpeechUI": true,
"missionHeader": {
"m_iPlayerCount": 40,
"m_eEditableGameFlags": 6,
"m_eDefaultGameFlags": 6,
"other": "values"
}
},
"mods": [
{
"modId": "59727DAE364DEADB",
"name": "WeaponSwitching",
"version": "1.0.1"
},
{
"modId": "59727DAE32981C7D",
"name": "Explosive Goats beta",
"version": "0.5.42"
}
]
},
"operating": {
"lobbyPlayerSynchronise": true
},
"a2sQueryEnabled": true,
"steamQueryPort": 17777
}
Values are strings, unless mentioned otherwise.
dedicatedServerId
Used by the "Favourite" system. If not provided, the backend will provide a new ID and save it to the config file. It is recommended to server administrators to store this ID safe to ensure to keep their playerbase in case of a server migration or a config accident.
Code | Country |
---|---|
US | USA |
DE | Germany |
CN | China |
CZ | Czech Republic |
FR | France |
GB | United Kingdom of Great Britain and Northern Ireland |
RU | Russian Federation |
JP | Japan |
AU | Australia |
region
ID / name of region - it is needed when the server registers the launched game in the Lobby. ISO 3166-1 alpha-2 code can be used in this field. Usual Nitrado values:
- "EU-FFM"
- "US-LA"
- "US-MI"
gameHostBindAddress
IP address which server socket will be bound to. In most cases, this should be left empty. It can be used to restrict connections to particular network interface. When left out or empty, 0.0.0.0 is used, which allows connections through any IP address.
gameHostBindPort
number value, range 1..65535, default: 2001
UDP port to which the server socket will be bound.
gameHostRegisterBindAddress
IP address registered in backend. This should be set to the public IP address to which clients can connect in order to reach the server (either IP of the server itself or IP of the machine that will forward data to the server). When left out or empty, an attempt is made to automatically determine the IP address, but this will often fail and should not be relied upon as the server might not be reachable from public networks.
gameHostRegisterPort
number value, range 1..65535, default: 2001
UDP port registered in backend. If the server itself has a public IP address, this should be the same value as in gameHostBindPort. Otherwise, this is the UDP port that is forwarded to the server.
adminPassword
Defines the server's admin password, allows a server administrator to login and control the server, to access this either open the chat input box by pressing C in the lobby or Enter ↵ in-game followed by: #login [the admin password]
game
Define the server's settings - see the game section below.
operating
Define various server settings - see the operating section below.
a2sQueryEnabled
bool value, default: false
Enable Steam Query protocol
steamQueryPort
number value, range 1..65535, default: 17777
Change Steam Query UDP port on which game listens to A2S requests
game
name
length 0..100 characters
password
length 0..x characters
Password required to join the server.
scenarioId
The scenario's .conf file path is defined here. See the listScenarios startup parameter to list available scenarios and obtain their .conf file path.
gameNumber
number value, range 1..9999
Add a suffix to the server's name, if more servers hosted by script (typically in data centers) - e.g "Server Name - 56"
playerCountLimit
number value, range 1..256, default: 127
Set the maximum amount of players on the server.
autojoinable
bool value, default: false
Set if the session can be selected through the auto join feature.
visible
bool value, default: true
Set the visibility of the server in the Server Browser.
supportedGameClientTypes
array value, default: ["PLATFORM_PC"]
Define the platforms which the server accepts, allowing crossplay.
Possible values:
Key | Value |
---|---|
PLATFORM_PC | PC |
PLATFORM_XBL | Xbox console |
gameProperties
Define the scenario's settings - see the gameProperties section below.
mods
The list of mods required by the client. They will automatically be downloaded and activated on join.
modID
GUID of the mod. It can be obtained from i.e. Workbench options when mod is running or directly from gproj file
name
This parameter doesn't do anything and is only used as sort of comment, with human readable name of the mod.
version
gameProperties
serverMaxViewDistance
number value, range 500..10000, default: 1600
serverMinGrassDistance
number value, range 0 / 50..150, default: 0
Minimum grass distance in meters. If set to 0 no distance is forced upon clients.
fastValidation
bool value, default: false
Validation of map entities and components loaded on client when it joins, ensuring things match with initial server state.
- true (enabled) - minimum information required to make sure data matches is exchanged between client. When a mismatch occurs, no additional information will be available for determining where client and server states start to differ. All servers that expect clients to connect over internet should have fast validation enabled.
- false (disabled) - extra data for every replicated entity and component in the map will be transferred when new client connects to the server. When a mismatch occurs, it is possible to point at particular entity or component where things start to differ. When developing locally (ie. both server and client run on the same machine), it is fine to disable fast validation to more easily pin point source of the problem.
networkViewDistance
number value, range 500.5000, default: 500
Maximum network streaming range of replicated entities.
battlEye
bool value
true to enable BattlEye, false to disable it.
disableThirdPerson
bool value, default: false
Force clients to use the first-person view.
VONDisableUI
bool value, default: false
Force clients to not have VON (Voice Over Network) UI.
VONDisableDirectSpeechUI
bool value, default: false
Force clients to not have VON (Voice Over Network) Direct Speech UI.
missionHeader
This property overwrites the scenario's [enfusion:
operating
lobbyPlayerSynchronise
bool value, default: false
If enabled, the list of player identities present on server are sent to the GameAPI with heartbeat (advanced synchronisation).
Template
{
"dedicatedServerId": "",
"region": "",
"gameHostBindAddress": "",
"gameHostBindPort": 0,
"gameHostRegisterBindAddress": "",
"gameHostRegisterPort": 0,
"game": {
"name": "",
"password": "",
"scenarioId": "",
"playerCountLimit": 0,
"visible": true,
"gameProperties": {
"serverMaxViewDistance": 0,
"serverMinGrassDistance": 0,
"networkViewDistance": 0,
"disableThirdPerson": false,
"fastValidation": true,
"battlEye": true,
"VONDisableUI": false,
"VONDisableDirectSpeechUI": false
},
"mods": []
}
}
Player-Hosted Server
Also known as Listen Server, a Player-Hosted Server is a server also hosting a local player. Such server is started from within the game, in Multiplayer > Host tab > Host new server.
Settings
The settings are all self-explanatory and Dedicated Server can be used.
Scenario Selection
Scenario and Source are two related fields:
- Scenario is the list of all available scenarios
- Source is a read-only field telling from which mod (or Arma Reforger) the selected Scenario is.
Crossplay
This option allows console players to join - see supportedGameClientTypes.
Mods
This tab allows to enable or disable local mods to make them available to the hosted game (or not). The Workshop is accessible from here.
Linux Server
The game server will by default use Docker container's IP for server browser registration and client connection which will cause failure during client connection attempt.
To avoid it use:
- Run the "ipconfig" command in cmd to list the local IPs
- "IP Connect" option in the server browser and insert one of the server's local IPs
- Custom server config (.json file) with "gameHostRegisterBindAddress" and "gameHostRegisterPort" parameters set to one of the local IP:Port combinations
Example:
-config "./My_Config.json" ClientConnectAddress 192.168.39.98
Docker Setup
- Install the latest Docker:
- Download and install Docker
- Enable Hyper-V in Windows if it is not already
- Assign HW resources in Docker
/Settings /Resources /Advanced: - CPU: 4 cores
- Memory: 6 GB
- Download Ubuntu 18.04 image via batch or powershell cmd: docker pull ubuntu:18.04
- Run Ubuntu image:
- mount volume with server data
- expose client connection UDP port
- Example: docker container run -t -d -p 2001:2001
/udp -v D:\server_data\linux_packed: /home /packed --name ubuntu_test ubuntu:18.04
- Connect to bash console: docker exec -it ubuntu_test
/bin /bash - Install necessary software:
- libcurl4 - required by server app
- net-tools - for debug purposes (enables ifconfig etc)
- Installation:
- apt-get update
- apt-get install libcurl4
- apt-get install net-tools
- apt-get install libssl1.1
- Create logs directory, e.g: mkdir
/home /profile - Run server:
- server executable needs proper execution/access rights:
- cd server_root_folder
- chmod +x ArmaReforgerServer
- Example: .
/ArmaReforgerServer -gproj . /addons /data /ArmaReforger.gproj -config Configs /ServerConfig /Campaign.json -backendlog -nothrow -profile /home /profile
- server executable needs proper execution/access rights: