Server Hosting – Arma Reforger
Lou Montana (talk | contribs) (Remove ports (as they are all configurable through Arma Reforger:Server Config) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 2: | Line 2: | ||
Server Hosting is the fact of hosting a game instance accessible over the network to other players. | Server Hosting is the fact of hosting a game instance accessible over the network to other players. | ||
There are two possible modes in {{armaR}}: '''player-hosted''' and '''dedicated'''. | There are two possible modes in {{armaR}}: '''player-hosted''' and '''dedicated'''. | ||
Line 35: | Line 34: | ||
==== config ==== | ==== config ==== | ||
The Server exe uses the {{hl|-config}} | The Server exe uses the {{hl|-config}} {{Link|Arma Reforger:Startup Parameters|startup parameter}} to target the configuration file. | ||
ArmaReforgerServer.exe -config ".\Configs\Campaign_SWCoast.json" | 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. | In above example, Campaign_SWCoast.json is expected to be locted in Configs folder next to the exe. | ||
==== maxFPS ==== | ==== maxFPS ==== | ||
{{Feature|warning|As of '''0.9.8''' it is '''heavily recommended''' to use | {{Feature|warning|As of '''0.9.8''' it is '''heavily recommended''' to use {{Link|Arma Reforger:Startup Parameters#maxFPS|this}} {{Link|Arma Reforger:Startup Parameters|startup parameter}}, set to a value in the 60..120 range; otherwise, the server can try to use all the available resources!}} | ||
ArmaReforgerServer.exe -maxFPS 60 | ArmaReforgerServer.exe -maxFPS 60 | ||
==== server ==== | ==== server ==== | ||
This parameter instructs the executable to launch '''local''' server and '''load selected world'''. When this parameter is used, config is ignored. Server parameter can be combined with | This parameter instructs the executable to launch '''local''' server and '''load selected world'''. When this parameter is used, config is ignored. Server parameter can be combined with {{Link|Arma Reforger:Startup Parameters#addons|addons}} and {{Link|Arma Reforger:Startup Parameters#addonsDir|addonsDir}} parameters to start a server with local mods, which can be useful when testing addon before uploading it Workshop. | ||
ArmaReforgerServer.exe -server "worlds/MP/MPTest.ent" -addonsDir "C:\MyModsDir" -addons MyCustomMod | ArmaReforgerServer.exe -server "worlds/MP/MPTest.ent" -addonsDir "C:\MyModsDir" -addons MyCustomMod | ||
==== Others ==== | ==== Others ==== | ||
The below {{Link|Arma Reforger:Startup Parameters}} are optional but may prove useful upon some cases: | |||
* | * {{Link|Arma Reforger:Startup Parameters#logStats|logStats}} - allows to log server's FPS every x milliseconds | ||
* | * {{Link|Arma Reforger:Startup Parameters#logLevel|logLevel}} - sets the log detail level | ||
* | * {{Link|Arma Reforger:Startup Parameters#listScenarios|listScenarios}} - logs available scenario {{hl|.conf}} file paths on startup | ||
=== Configuration File === | === Configuration File === | ||
Line 77: | Line 76: | ||
=== Mods === | === Mods === | ||
This tab allows to enable or disable local mods to make them available to the hosted game (or not). The | This tab allows to enable or disable local mods to make them available to the hosted game (or not). The {{Link|Arma Reforger:Workshop}} is accessible from here. | ||
Revision as of 00:36, 2 December 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.
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 Server Config page 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
server
This parameter instructs the executable to launch local server and load selected world. When this parameter is used, config is ignored. Server parameter can be combined with addons and addonsDir parameters to start a server with local mods, which can be useful when testing addon before uploading it Workshop.
ArmaReforgerServer.exe -server "worlds/MP/MPTest.ent" -addonsDir "C:\MyModsDir" -addons MyCustomMod
Others
The below 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
See Server Config.
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
SteamCMD Setup
- Install SteamCMD - for the latest documentation, see https://developer.valvesoftware.com/wiki/SteamCMD
- Download and install it (link on the SteamCMD page) - it will auto-update to the latest version
- Login as anonymous - type in login anonymous
- Set the install path with the force_install_dir command (otherwise the default location will be used,
/home /<username> /steam /steamapps /common)
- Download and install the server app_update 1874900
- Quit SteamCMD quit
Example Script
- update_armar_ds.txt
Based on the SteamCMD page's example
// update_armar_ds.txt
//
@ShutdownOnFailedCommand 1
@NoPromptForPassword 1
force_install_dir ../armar_ds
login anonymous
app_update 1874900 validate
quit
- Execution
steamcmd +runscript update_armar_ds.txt
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: