Prerequisites
- A Windows-based server or PC with administrative access.
- An internet connection.
Step 1: Install SteamCMD
SteamCMD is the command-line version of the Steam client. It is used to install and update dedicated servers for various Steam games.
-
Download SteamCMD
- Download the SteamCMD installer from the SteamCMD official website.
- Extract the contents to a directory, e.g.,
C:\steamcmd.
Step 2: Create the Directory and config.json File
Before running the server, you need to create the necessary directory and the config.json file with the required configuration settings.
-
Create the Directory
"C:\steamcmd\steamapps\common\Arma Reforger Server" -
Create
config.json: and populate it with the following{ "publicAddress": "0.0.0.0", "publicPort": 2001, "bindAddress": "0.0.0.0", "bindPort": 2001, "a2s": { "address": "0.0.0.0", "port": 17777 }, "rcon": { "address": "0.0.0.0", "port": 19999, "password": "your_rcon_password", "permission": "monitor", "blacklist": [], "whitelist": [] }, "game": { "name": "YourServerName", "password": "your_game_password", "passwordAdmin": "your_admin_password", "admins": [], "scenarioId": "{ECC61978EDCC2B5A}Missions/23_Campaign.conf", "maxPlayers": 4, "visible": true, "crossPlatform": true, "supportedPlatforms": [ "PLATFORM_PSN", "PLATFORM_XBL", "PLATFORM_PC" ], "gameProperties": { "serverMaxViewDistance": 1600, "serverMinGrassDistance": 150, "networkViewDistance": 1500, "disableThirdPerson": false, "fastValidation": true, "battlEye": true, "VONDisableUI": false, "VONDisableDirectSpeechUI": false } } }Replace the placeholder values with your desired server settings. Details the various settings can be found here: https://community.bistudio.com/wiki/Arma_Reforger:Server_Config
Step 3: Install and Update ARMA Reforger Server
-
Create the Update Script:
Open Notepad and create a new file named
Start-server.batin theC:\steamcmddirectory and fill it with the following:@echo off echo Updating SteamCMD... :: Set the path to your SteamCMD installation set steamcmdPath="C:\steamcmd\steamcmd.exe" set steamcmdDir="C:\steamcmd" set configPath="C:\steamcmd\steamapps\common\Arma Reforger Server\config.json" :: Set paths for IP file set localIpFilePath="C:\Temp\publicIP.txt" set oneDriveIpFilePath="C:\Users\YourUserName\OneDrive\ARMA\publicIP.txt" :: Ensure Temp directory exists if not exist C:\Temp mkdir C:\Temp :: Update SteamCMD cd %steamcmdDir% %steamcmdPath% +login anonymous +quit echo Updating ARMA Reforger server... :: Update ARMA Reforger server %steamcmdPath% +force_install_dir "C:\steamcmd\steamapps\common\Arma Reforger Server" +login anonymous +app_update 1874900 validate +quit echo Fetching public IP address... :: Get public IPv4 address and write to local IP file powershell -Command "(Invoke-RestMethod -uri 'http://ipv4.icanhazip.com').Trim()" > %localIpFilePath% set /p publicIP=<%localIpFilePath% echo Public IP address is %publicIP% :: Attempt to write public IP address to OneDrive shared folder if exist %oneDriveIpFilePath% ( echo Writing public IP address to OneDrive shared folder... echo %publicIP% > %oneDriveIpFilePath% ) else ( echo OneDrive shared folder not available. Using local temp folder for now. ) echo Updating config.json with public IP address... :: Update the IP address in config.json powershell -Command "(Get-Content '%configPath%') -replace '\"publicAddress\": \".*\"', '\"publicAddress\": \"%publicIP%\"' | Set-Content '%configPath%'" powershell -Command "(Get-Content '%configPath%') -replace '\"address\": \".*\"', '\"address\": \"%publicIP%\"' | Set-Content '%configPath%'" echo Starting ARMA Reforger server... :: Start the ARMA Reforger server cd "C:\steamcmd\steamapps\common\Arma Reforger Server" ArmaReforgerServer.exe -config "./config.json" -loadSessionSave cmd /k
Explanation of ipFilePath
The line set ipFilePath="C:\Users\YourUserName\OneDrive\YourFolder\publicIP.txt" sets the variable ipFilePath to the path where the public IP address will be saved. Replace YourUserName and YourFolder with your actual username and desired folder name.
Writing the public IP address to a file on OneDrive can be useful for easily sharing the current IP address of the server with your friends. They can access the file from OneDrive and always have the latest IP address to connect to your server, ensuring a seamless gaming experience.
Explanation of -loadSessionSave
The -loadSessionSave parameter is used to load a previously saved game session. When you include this parameter in the launch command, it tells the server to load the game state from a saved session file instead of starting from scratch. By default, the server saves and loads the session data to:
C:\Users\YourUserName\OneDrive\Documents\My Games\ArmaReforger
Using OneDrive as a backup location ensures that your game progress is safely stored in the cloud. This provides the benefit of Automatic Backup so your session data is automatically backed up to the cloud, reducing the risk of data loss.
Run the Update Script
Double-click the Start-server.bat script in the C:\steamcmd directory to run it. The script will update SteamCMD, install or update the ARMA Reforger server, fetch the public IP address, update the config.json file, write the public IP address to a text file in OneDrive, and start the ARMA Reforger server.
Step 4: Verify and Update config.json
-
Check the
config.jsonFile:Open the
config.jsonfile located inC:\steamcmd\steamapps\common\Arma Reforger Server\config.json.Verify that the
publicAddressandaddressfields are updated with your current public IP address.
Troubleshooting
If you encounter any issues, here are some common troubleshooting steps:
- Port Forwarding
Ensure that the necessary ports are forwarded in your router settings.
See: https://community.bistudio.com/wiki/Arma_Reforger:Server_Config
Required ports (UDP): - 2001
- 17777
- 19999
- Firewall Settings
Make sure your firewall is not blocking the required ports. Your Windows PC may ask you to allow access the first time you run the script. Do so. - Check Server Logs
Review the server logs for any error messages that might provide more insight into the issue.
Stopping the server
CTRL+C command and when prompted press YConclusion
By following this step-by-step guide, you should have a fully functional ARMA Reforger server up and running. Enjoy the game with your friends.