Server Hosting – Arma Reforger
Lou Montana (talk | contribs) m (Fix config path) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(64 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{TOC|side}} | {{TOC|side}} | ||
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'''. | ||
{{Feature|important| | {{Feature|important| | ||
[[File:armar-port_fowarding_connection_failed.png|thumb|Connection fails from the outside if the door is closed.]] | |||
For a hosted server to be visible from outside the local network (e.g from internet), {{Link|https://en.wikipedia.org/wiki/Port_forwarding|Port Forwarding}} must be used. | |||
}} | |||
Please refer to your router's user guide for assistance. | |||
Main router brands's documentation links: | |||
{{ | * {{Link|https://www.cisco.com/c/en/us/support/docs/smb/routers/cisco-rv-series-small-business-routers/smb5818-configure-port-forwarding-port-triggering-nat-on-rv34x-serie.html|Cisco router}} | ||
* {{Link|https://www.dlink.com/uk/en/support/faq/routers/mydlink-routers/dir-810l/how-do-i-configure-port-forwarding-on-my-router|D-Link router}} | |||
* {{Link|https://kb.netgear.com/24290/How-do-I-add-a-custom-port-forwarding-service-on-my-NETGEAR-router|Netgear router}} | |||
* {{Link|https://www.tp-link.com/us/support/faq/1379/|TP-Link router}} | |||
}} | |||
Line 21: | Line 23: | ||
A '''Dedicated Server''' is a server without any game instance launched; it purely processes game information and network synchronisation. | A '''Dedicated Server''' is a server without any game instance launched; it purely processes game information and network synchronisation. | ||
{| | {{Feature|informative| stable is app id: '''1874900''' - https://steamdb.info/app/1874900/ | ||
|- | |||
experimental: '''1890870''' - https://steamdb.info/app/1890870/ | |||
}} | |||
==== | === BattlEye === | ||
{{Feature|informative|See {{Link|http://www.battleye.com/|BattlEye}}'s {{Link|https://www.battleye.com/support/documentation/|documentation}} and {{Link|https://www.battleye.com/support/faq/|FAQ}} - there is also a [[BattlEye]] wiki article.}} | |||
{{Feature| | |||
It is possible to modify BattlEye's RCon port and password by '''adding''' the following settings to {{hl|Arma Reforger\BattlEye\BEServer_x64.cfg}}: | |||
RConPort 5678 | |||
RConPassword myNewBEPassword | |||
{{armaR}} | {{Feature|warning| | ||
When editing {{armaR}}'s BattlEye config, make sure to '''append''' new settings to it and not ''erase'' or even ''edit'' existing information.<br> | |||
Missing information will have the kick message "Missing GameID/MasterPort server config settings" welcome (and eject) players, whereas modified values will prevent BattlEye from working.<br> | |||
In the event of the file being already incorrectly edited, verify the game's files on {{Link|https://steampowered.com/|Steam}} (see {{Link|https://help.steampowered.com/en/faqs/view/0C48-FCBD-DA71-93EB|Steam's tutorial}}): | |||
* delete {{hl|BEServer_x64.cfg}} | |||
* in Steam, right-click on {{armaR}} | |||
* select "Properties" | |||
* click on "Local Files" | |||
* press "Verify integrity of game files" | |||
Steam will now verify and repair modified files. This will not erase any personal files, game progress, controls and other configurations will remain unchanged. | |||
}} | |||
=== Startup Parameters === | |||
See {{Link|Arma Reforger:Startup Parameters#Hosting}} and the {{Link|Arma Reforger:Server Config|Server Config}} page for more information. | |||
==== | ==== 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" | |||
In above example, Campaign_SWCoast.json is expected to be locted in Configs folder next to the exe. | |||
{{ | ==== maxFPS ==== | ||
{{ | {{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 | |||
===== | ==== 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 {{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 | |||
==== | ==== 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 === | ||
See {{Link|Arma Reforger:Server Config}}. | |||
{{ArgTitle|2|Player-Hosted Server|{{GVI|armaR|0.9.7}}}} | |||
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 {{hl|Multiplayer > Host tab > Host new server}}. | |||
{{Feature|PC|Player-hosting is only available on PC.}} | |||
===== | === Settings === | ||
The settings are all self-explanatory and {{Link|#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 {{armaR}}) the selected Scenario is. | |||
==== | ==== Crossplay ==== | ||
This option allows console players to join - see {{Link|#supportedGameClientTypes}}. | |||
===== | === Mods === | ||
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. | |||
== 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.<br> | |||
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 === | |||
{{Feature|important|This tutorial has been tested on '''Ubuntu'''.}} | |||
Set the | # Install SteamCMD - for the latest documentation, see {{Link|https://developer.valvesoftware.com/wiki/SteamCMD}} | ||
## Download and install it (link on the {{Link|https://developer.valvesoftware.com/wiki/SteamCMD|SteamCMD}} page) - it will auto-update to the latest version | |||
## Set the install path with the {{hl|force_install_dir}} command (otherwise the default location will be used, {{hl|home/<username>/.steam/steam/steamcmd}}) | |||
### You can name the folder ''arma-reforger, armaR, armarserver, armarexpserver'' and etc | |||
## Login as anonymous - type in {{hl|login anonymous}} | |||
# Download and install the server {{hl|app_update 1874900}} | |||
## ''1890870'' for experimental version | |||
# Quit SteamCMD {{hl|quit}} | |||
{{Feature|informative|To run {{armaR}}'s server, run {{hl|./ArmaReforgerServer}} in the installation directory.}} | |||
==== | ==== Example Script ==== | ||
; update_armar_ds.txt | |||
Based on the {{Link|https://developer.valvesoftware.com/wiki/SteamCMD|SteamCMD}} page's example | |||
<syntaxhighlight lang="bash"> | |||
// update_armar_ds.txt | |||
// | |||
@ShutdownOnFailedCommand 1 | |||
@NoPromptForPassword 1 | |||
force_install_dir ../armar_ds | |||
login anonymous | |||
app_update 1874900 validate | |||
quit | |||
</syntaxhighlight> | |||
= | ; Execution | ||
<syntaxhighlight lang="bash">steamcmd +runscript update_armar_ds.txt</syntaxhighlight> | |||
==== | ==== With Bash Scripts ==== | ||
# Install SteamCMD<syntaxhighlight lang="bash">sudo apt install steamcmd</syntaxhighlight> | |||
# create a directory lets say <code>armaR</code> somewhere, lets say <code>/home/<username>/armaR</code> | |||
# Create in it a steam shell script that will install reforger server <code>steamShell.txt</code> with something like <syntaxhighlight lang="bash"> | |||
@ShutdownOnFailedCommand 1 | |||
login anonymous | |||
// Stable ID: 1874900 EXP: 1890870 | |||
app_update 1874900 validate | |||
= | quit | ||
</syntaxhighlight> | |||
# then create bash script that will install/update game <code>steamInstall.sh</code> with: <syntaxhighlight lang="bash"> | |||
/usr/games/steamcmd +force_install_dir /home/<username>/armaR +runscript /home/<username>/armaR/steamShell.txt | |||
</syntaxhighlight> | |||
# after that, server startup script <code>start.sh</code> with: <syntaxhighlight lang="bash"> | |||
// Install or Update game | |||
./steamInstall.sh | |||
// Start server | |||
./ArmaReforgerServer -config /home/<username>/.config/ArmaReforgerServer/config.json -profile /home/<username>/.config/ArmaReforgerServer -maxFPS 60 | |||
</syntaxhighlight> | |||
# So the actual file tree will look something like this: <syntaxhighlight lang="bash"> | |||
/home/<username>/armaR | |||
steamShell.txt | |||
steamInstall.sh | |||
start.sh | |||
</syntaxhighlight> | |||
# Then create actual <code>config.json</code> at <code>/home/<username>/.config/ArmaReforgerServer/config.json</code>, create folders if they don't exist | |||
# Run <code>start.sh</code> to install the server and start it. | |||
Console logs etc can be found in above mentioned profile folder, addons will also install there by default, you can again change that. | |||
You can also change profile/config directories as desired.{{Feature|informative|You can then create new service for systemctl to run start.sh and the thing will run in the background and auto restart after crashes etc}} | |||
=== LinuxGSM === | |||
The {{Link|https://linuxgsm.com/servers/armarserver/|{{arma}} LinuxGSM Tool}} can also be used. | |||
# It can monitor the game server by checking that the proccess is running and querying it. Should the server go offline LinuxGSM can restart the server and send you an alert. You can use cronjobs to setup monitoring. | |||
# Update checks for any server updates and applies them. The server will update and restart only if required. '''This also needs to be set up on a schedule.''' | |||
= | {{Feature|informative|For server's experimental version, add <code>appid{{=}}"1890870"</code> to your <code>./lgsm/config-lgsm/armarserver/armarserver.cfg</code> and validate files by <code>./armarserver v</code>.}} | ||
=== Docker Setup === | |||
{{Feature|important|This Docker configuration is adapted to '''Ubuntu'''. Other distributions such as Fedora or Arch Linux may store their certificates at the following location: {{hl|/etc/pki/ca-trust/}} - be sure to edit the configuration accordingly.}} | |||
{{Feature|informative| | {{Feature|informative|A community Docker image is available on GitHub: https://github.com/acemod/docker-reforger}} | ||
A community Docker image is available on GitHub: https://github.com/acemod/docker-reforger | |||
}} | |||
# Install 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}}: | ||
### CPU: 4 cores | ### CPU: 4 cores | ||
### Memory: 6 GB | ### Memory: 6 GB | ||
# Download Ubuntu 18.04 image ''via'' batch or powershell cmd: {{ | # Download Ubuntu 18.04 image ''via'' batch or powershell cmd: {{hl|docker pull ubuntu:18.04}} | ||
# Run Ubuntu image | # Run Ubuntu image: | ||
## mount volume with server data | ## mount volume with server data | ||
## expose client connection UDP port | ## expose client connection UDP port | ||
## Example: {{ | ## Example: {{hl|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: {{ | # Connect to bash console: {{hl|docker exec -it ubuntu_test /bin/bash}} | ||
# Install necessary | # Install necessary software: | ||
## libcurl4 - required by server app | ## libcurl4 - required by server app | ||
## net-tools - for debug purposes (enables ifconfig etc) | ## net-tools - for debug purposes (enables ifconfig etc) | ||
Line 326: | Line 215: | ||
### apt-get install net-tools | ### apt-get install net-tools | ||
### apt-get install libssl1.1 | ### apt-get install libssl1.1 | ||
# Create | # Create logs directory, e.g: {{hl|mkdir /home/profile}} | ||
# Run server | # Run server: | ||
## server executable needs proper execution/access rights: | ## server executable needs proper execution/access rights: | ||
### cd server_root_folder | ### cd server_root_folder | ||
### chmod +x ArmaReforgerServer | ### chmod +x ArmaReforgerServer | ||
## Example: {{ | ## Example: {{hl|./ArmaReforgerServer -gproj ./addons/data/ArmaReforger.gproj -config Configs/ServerConfig/Campaign.json -backendlog -nothrow -profile /home/profile}} | ||
{{GameCategory|armaR|Support}} | {{GameCategory|armaR|Support}} |
Latest revision as of 14:04, 9 September 2024
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
- Set the install path with the force_install_dir command (otherwise the default location will be used, home
/<username> /.steam /steam /steamcmd) - You can name the folder arma-reforger, armaR, armarserver, armarexpserver and etc
- Login as anonymous - type in login anonymous
- Download and install the server app_update 1874900
- 1890870 for experimental version
- 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
With Bash Scripts
- Install SteamCMD
sudo apt install steamcmd
- create a directory lets say
armaR
somewhere, lets say/home/<username>/armaR
- Create in it a steam shell script that will install reforger server
steamShell.txt
with something like@ShutdownOnFailedCommand 1 login anonymous // Stable ID: 1874900 EXP: 1890870 app_update 1874900 validate quit
- then create bash script that will install/update game
steamInstall.sh
with:/usr/games/steamcmd +force_install_dir /home/<username>/armaR +runscript /home/<username>/armaR/steamShell.txt
- after that, server startup script
start.sh
with:// Install or Update game ./steamInstall.sh // Start server ./ArmaReforgerServer -config /home/<username>/.config/ArmaReforgerServer/config.json -profile /home/<username>/.config/ArmaReforgerServer -maxFPS 60
- So the actual file tree will look something like this:
/home/<username>/armaR steamShell.txt steamInstall.sh start.sh
- Then create actual
config.json
at/home/<username>/.config/ArmaReforgerServer/config.json
, create folders if they don't exist - Run
start.sh
to install the server and start it.
Console logs etc can be found in above mentioned profile folder, addons will also install there by default, you can again change that.
You can also change profile/config directories as desired.
LinuxGSM
The Arma LinuxGSM Tool can also be used.
- It can monitor the game server by checking that the proccess is running and querying it. Should the server go offline LinuxGSM can restart the server and send you an alert. You can use cronjobs to setup monitoring.
- Update checks for any server updates and applies them. The server will update and restart only if required. This also needs to be set up on a schedule.
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: