Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] RCON support #36

Merged
merged 4 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ ENV SERVER_PUBLIC_PORT=2001
ENV SERVER_A2S_ADDRESS="0.0.0.0"
ENV SERVER_A2S_PORT=17777

ENV RCON_ADDRESS="0.0.0.0"
ENV RCON_PORT=19999
ENV RCON_PASSWORD=""
ENV RCON_PERMISSION="admin"

ENV GAME_NAME="Arma Reforger Docker Server"
ENV GAME_PASSWORD=""
ENV GAME_PASSWORD_ADMIN=""
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,17 @@ Path to a JSON file that contains array of mod objects.
}
]
```
### RCON

RCON can be activated by defining the `RCON_PASSWORD` variable.

```sh
-e RCON_PASSWORD="ExamplePassword123"
```

The password:
* is required for RCON to start
* does not support spaces
* must be at least 3 characters long

Use `-e RCON_PERMISSION=""` to change [permission](https://community.bistudio.com/wiki/Arma_Reforger:Server_Config#permission) for all RCON clients.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
ports:
- "2001:2001/udp"
- "17777:17777/udp"
- "19999:19999/udp" # RCON
volumes:
- ./reforger/configs:/reforger/Configs
- ./reforger/profile:/home/profile
Expand Down
6 changes: 6 additions & 0 deletions docker_default.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
"address": "",
"port": 17777
},
"rcon": {
"address": "",
"port": 19999,
"password": "",
"permission": ""
},
"game": {
"name": "Arma Reforger Docker Server",
"password": "",
Expand Down
10 changes: 10 additions & 0 deletions launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ def bool_str(text):
else:
config["a2s"] = None

if env_defined("RCON_ADDRESS") and env_defined("RCON_PORT"):
config["rcon"] = {
BrettMayson marked this conversation as resolved.
Show resolved Hide resolved
"address": os.environ["RCON_ADDRESS"],
"port": int(os.environ["RCON_PORT"]),
"password": os.environ["RCON_PASSWORD"],
"permission": os.environ["RCON_PERMISSION"],
}
else:
config["rcon"] = None

if env_defined("GAME_NAME"):
config["game"]["name"] = os.environ["GAME_NAME"]
if env_defined("GAME_PASSWORD"):
Expand Down
Loading