Server Hosting – Arma Reforger
Server Hosting is the fact of hosting a game instance accessible over the network to other players.
Player-Hosted Server
Also known as Listen Server, a Player-Hosted Server is a server with a local client that plays on it too.
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) |
Startup Parameters
config
The Server exe uses the -config startup parameter to target the configuration file.
As of 0.9.5 it can only load json files from relative
ArmaReforgerServer.exe -config "Configs\Campaign_SWCoast.json"
See Startup Parameters - Hosting and the Configuration section below for more information example.
Others
Below Arma Reforger:Startup Parameters are optional but may prove useful upon some cases:
- logFPS - allows to log server's FPS every x milliseconds
- logLevel - sets the log detail level
- maxFPS - sets a maximum FPS limit for the server - saving performance in some cases
- 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,
"gameProperties": {
"serverMaxViewDistance": 2500,
"serverMinGrassDistance": 50,
"networkViewDistance": 1000,
"disableThirdPerson": true,
"fastValidation": true,
"battlEye": true,
"missionHeader": {
"m_iPlayerCount": 40,
"m_eEditableGameFlags": 6,
"m_eDefaultGameFlags": 6,
"other": "values"
}
},
"mods": [
{
"modId": "abcd3995-b1d9-473d-aa11-0836c0a595ad",
"name": "WeaponSwitching",
"version": "1.0.1"
},
{
"modId": "efgh3995-b1d9-473d-aa11-0836c0a595ad",
"name": "Explosive Goats beta",
"version": "0.5.42"
}
]
}
}
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 for client connection.
gameHostBindPort
number value, range 1..65535, default: 2001
gameHostRegisterBindAddress
IP for backend registration
gameHostRegisterPort
number value, range 1..65535, default: 2001
Port for backend registration
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.
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.
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.
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.
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.
missionHeader
This property overwrites the scenario's [enfusion:
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
},
"mods": []
}
}
Linux Setup
Docker
- Install latest Docker download link
- 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 SW
- 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 folder for logs, e.g:
mkdir /home/profile
- Set TRACY_NO_INVARIANT_CHECK environment variable to 1 in order to avoid Tracy Profiler initialization failure:
export TRACY_NO_INVARIANT_CHECK=1
- 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: