diff --git a/Dockerfile b/Dockerfile index 556f496..f7613a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,15 +7,15 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update \ && \ apt-get install -y --no-install-recommends --no-install-suggests \ - python3 \ - lib32stdc++6 \ - lib32gcc-s1 \ - wget \ ca-certificates \ + lib32gcc-s1 \ + lib32stdc++6 \ libcurl4 \ - net-tools \ libssl1.1 \ + net-tools \ + python3 \ wamerican \ + wget \ && \ apt-get remove --purge -y \ && \ diff --git a/README.md b/README.md index 506798c..624fd9e 100644 --- a/README.md +++ b/README.md @@ -1,83 +1,57 @@ # Arma Reforger Dedicated Server -An Arma Reforger dedicated server. Updates to the latest version every time it is restarted. +A lightweight and automated solution for running an Arma Reforger dedicated server. This project ensures your server is always up-to-date with the latest version. -## Usage +## Quick Start -### Docker CLI +### Using Docker CLI + +Run the following command to create and start the server: ```sh - docker create \ - --name=reforger-server \ - -p 2001:2001/udp \ - -v path/to/configs:/reforger/Configs \ - -v path/to/profiles:/home/profile \ - -v path/to/workshop:/reforger/workshop \ - -e SERVER_PUBLIC_ADDRESS="public ip" \ - -e GAME_NAME="My Docker Reforger Server" \ - ghcr.io/acemod/arma-reforger:latest +docker create \ + --name=reforger-server \ + -p 2001:2001/udp \ + -v path/to/configs:/reforger/Configs \ + -v path/to/profiles:/home/profile \ + -v path/to/workshop:/reforger/workshop \ + -e SERVER_PUBLIC_ADDRESS="your.public.ip" \ + -e GAME_NAME="My Reforger Server" \ + ghcr.io/acemod/arma-reforger:latest +docker start reforger-server ``` -If an admin password is not provided, one will be generated and printed to the console. - -### Docker-compose - -Simply check-out / copy [the provided docker-compose.yml](docker-compose.yml) and adjust to your personal needs. - -## Parameters - -Check [the Dockerfile](Dockerfile#L32-L67), more docs will come later. - -### Configs - -By default the configs are generated from the ENV variables in the dockerfile. After the first run the file can be expanded with additional options manually, but the fields will always be overwritten by the ENV variables. - -Alternatively, change the `ARMA_CONFIG` variable to a file present in the `Configs` volume. It will be used without modification. - -### Experimental server +> **Note**: If you don't provide an admin password, one will be generated and displayed in the console. -To use the experimental server instead of the regular set `STEAM_APPID` variable to `1890870`. +### Using Docker Compose -### Mods +1. Clone the repository and navigate to the `docker-compose-examples` folder. +2. Choose a `docker-compose.yml` file that suits your needs and adjust it as necessary. +3. Start the server: -Workshop mods can be defined in two ways. You can use both or either of those. + ```bash + docker compose up -d + ``` -#### GAME_MODS_IDS_LIST +4. Stop the server: -A comma separated list of IDs, with an optional version. + ```bash + docker compose down + ``` -```sh --e GAME_MODS_IDS_LIST="5965770215E93269=1.0.6,5965550F24A0C152" -``` +## Learn More -#### GAME_MODS_JSON_FILE_PATH +For detailed configuration options, advanced usage, and troubleshooting, refer to the [documentation](docs/index.md). -Path to a JSON file that contains array of mod objects. +- **Environment Variables**: Customize your server with a wide range of options. +- **Mods Support**: Add mods using environment variables or JSON files. +- **Multiple Instances**: Run multiple servers on the same machine. +- **RCON**: Enable and configure remote server control. -```sh --v ${PWD}/mods_file.json:/mods_file.json --e GAME_MODS_JSON_FILE_PATH="/mods_file.json" -``` +## Contributing -```json -[ - { - "modId": "597706449575D90B", - "version": "1.1.1" - } -] -``` -### RCON - -RCON can be activated by defining the `RCON_PASSWORD` variable. - -```sh --e RCON_PASSWORD="ExamplePassword123" -``` +Contributions are welcome! Feel free to submit issues or pull requests to improve the project. -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. \ No newline at end of file +Get started today and enjoy a seamless Arma Reforger server experience! diff --git a/docker-compose.yml b/docker-compose.yml index 86bb9c8..2c28e4c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,3 +15,4 @@ services: environment: - SERVER_PUBLIC_ADDRESS=public-ip - GAME_NAME=My Docker Reforger Server + - RCON_PASSWORD=ChangeItOrElse! diff --git a/docs/advanced-usage/index.md b/docs/advanced-usage/index.md new file mode 100644 index 0000000..ebf9815 --- /dev/null +++ b/docs/advanced-usage/index.md @@ -0,0 +1,299 @@ +# Advanced Usage + +This section provides advanced guidance for running and managing your Arma Reforger Dedicated Server with Docker. + +--- + +## Should You Use Environment Variables, Environment Files, or Static Configuration Files? + +When configuring your Arma Reforger Dedicated Server with Docker, you have several options for managing your server's settings. Each approach has its strengths and is suited for different use cases. + +### Environment Variables + +Environment variables are ideal for simple and fast deployments. They allow you to quickly set up and modify server configurations without needing additional files. For example: + +```yaml +environment: + - SERVER_NAME=MyServer + - SERVER_PASSWORD=secret + - SERVER_PUBLIC_PORT=2001 +``` + +This approach is straightforward and works well for small-scale setups or temporary servers. + +### Environment Files + +Environment files (`.env`) provide a more robust and flexible way to manage configurations. They allow you to separate configuration data from your `docker-compose.yml` file, making it easier to maintain and version control. For example: + +`.env` file: + +```bash +# Create the .env file using a Linux command +echo -e "SERVER_NAME=MyServer\nSERVER_PASSWORD=secret\nSERVER_PUBLIC_PORT=2001" > .env +``` + +```env +# Example content of the .env file +SERVER_NAME=MyServer +SERVER_PASSWORD=secret +SERVER_PUBLIC_PORT=2001 +``` + +`docker-compose.yml`: + +```yaml +env_file: + - ./env_server1 +``` + +This method is recommended for most deployments, especially when combined with a `mods_file.json` for managing mods. + +### Static Configuration Files + +Static server configuration files, are the file not automaticcaly generated by the launch script using the docker environment. These files can then be modified and reused by setting the `ARMA_CONFIG` environment variable. This approach is particularly useful for creating backups, maintaining a history of changes, or sharing configurations across teams. + +#### Example: Creating and Using a Static Configuration File + +1. Start the server once to generate the default `docker_generated.json` file: + + ```bash + docker compose up + ``` + + You can also use the docker_default.json present in the repository as base. + +2. Locate the generated file in the `Configs` directory and rename it to something meaningful, such as `custom_config.json`: + + ```bash + mv docker_generated.json custom_config.json + ``` + +3. Modify the `custom_config.json` file as needed to suit your server's requirements. + +4. Set the `ARMA_CONFIG` environment variable to point to the renamed file: + + ```yaml + environment: + - ARMA_CONFIG=custom_config.json + ``` + +5. Restart the server to apply the changes: + + ```bash + docker compose down && docker compose up + ``` + +This method ensures that your server uses a consistent configuration file, which can be version-controlled and shared with others. + +#### Example: Generating and Versioning a Static Configuration File + +1. Start the server once to generate the default `docker_generated.json` file. +2. Rename the file to something meaningful, such as `backup_config.json`. +3. Add the file to your version control system (e.g., Git) to track changes over time. + + ```bash + mv docker_generated.json backup_config.json + git add backup_config.json + git commit -m "Initial server configuration backup" + ``` + +4. Use the renamed file by setting the `ARMA_CONFIG` environment variable: + + ```yaml + environment: + - ARMA_CONFIG=backup_config.json + ``` + +### Recommendations + +- **For Simple Deployments**: Use full environment variables for quick and easy setup. +- **For Robust and Flexible Deployments**: Use environment files for all configuration variables in conjunction with a `mods_file.json` for managing mods. +- **For Backup and Versioning**: Use static configuration files to create snapshots of your server's settings. + +> **Note**: While static configuration files are useful for backups, they reduce the flexibility of this Docker image. For dynamic and scalable setups, environment variables and files are the preferred approach. + +## Running Multiple Server Instances + +You can host multiple Arma Reforger servers on the same machine by creating separate services, each with distinct ports and persistent volumes. + +### Example: Docker Compose for Two Servers + +```yaml +--- +services: + arma-reforger-1: + image: ghcr.io/acemod/arma-reforger:latest + container_name: arma-reforger-1 + ports: + - "2001:2001/udp" + - "17777:17777/udp" + - "19999:19999/udp" + volumes: + - ./reforger/server1/configs:/reforger/Configs + - ./reforger/server1/profile:/home/profile + - ./reforger/shared/workshop:/reforger/workshop + env_file: + - ./env_server1 + + arma-reforger-2: + image: ghcr.io/acemod/arma-reforger:latest + container_name: arma-reforger-2 + ports: + - "3001:2001/udp" + - "27777:17777/udp" + - "29999:19999/udp" + volumes: + - ./reforger/server2/configs:/reforger/Configs + - ./reforger/server2/profile:/home/profile + - ./reforger/shared/workshop:/reforger/workshop + env_file: + - ./env_server2 +``` + +Each server instance uses its own configuration, profile, and workshop directories, along with unique ports. + +### Recommendations for Managing Multiple Instances + +- **Use Environment Files**: It is recommended to use `.env` files for each server instance. This keeps your `docker-compose.yml` file clean and easy to read, while allowing you to manage instance-specific configurations separately. + +- **Separate Compose Files**: Alternatively, you can create multiple `docker-compose.yml` files for each server instance. This allows you to run and manage each instance independently. For example: + +```bash +docker compose -f docker-compose-server1.yml up -d +docker compose -f docker-compose-server2.yml up -d +``` + +This approach provides flexibility and simplifies troubleshooting by isolating the configuration of each instance. + +### Public Server Port Configuration + +When hosting public servers, ensure that the `SERVER_PUBLIC_PORT` environment variable for each server is set to the corresponding exposed port. Additionally, all exposed ports must be unique for each server instance to avoid conflicts. + +For example: + +```yaml +environment: + - SERVER_PUBLIC_PORT=2001 +``` + +For the second server: + +```yaml +environment: + - SERVER_PUBLIC_PORT=3001 +``` + +This ensures that each server is correctly visible to the public and avoids port conflicts when running multiple instances. + +--- + +## Custom Configuration Files + +To use a custom configuration file: + +1. Start the server once to generate `docker_generated.json` in your configs directory. +2. Rename the file (e.g., `my_custom_config.json`) and modify it as needed. +3. Set `ARMA_CONFIG=my_custom_config.json` in your `.env` file or environment section. +4. Restart the server. + +--- + +## Using Mods + +You can load mods using either the `GAME_MODS_IDS_LIST` environment variable or a JSON file specified by `GAME_MODS_JSON_FILE_PATH`. + +### Why Choose One Over the Other? + +- **`GAME_MODS_IDS_LIST`**: + - Simple and quick for small mod lists. + - Suitable for setups with minimal complexity. + +- **`GAME_MODS_JSON_FILE_PATH`**: + - Ideal for managing long mod lists. + - Allows specifying additional metadata, such as mod versions or load order. + - Facilitates version control and collaboration by tracking changes to the JSON file. + +### Example: Using `GAME_MODS_IDS_LIST` + +```yaml +environment: + - GAME_MODS_IDS_LIST=59B657D731E2A11D,5D6EA74A94173EDF,5D6EBC81EB1842EF +``` + +### Example: Using `GAME_MODS_JSON_FILE_PATH` + +```yaml +environment: + - GAME_MODS_JSON_FILE_PATH=/mods_file.json +volumes: + - ./mods_file.json:/mods_file.json +``` + +The JSON file should contain an array of objects, each with at least a `modId` field. + +### Example: `mods_file.json` Content + +Here is an example of what the `mods_file.json` might look like: + +```json +[ + { + "modId": "59B657D731E2A11D", + "name": "Mod Name 1", + "version": "1.0.0" + }, + { + "modId": "5D6EA74A94173EDF", + "name": "Mod Name 2", + "version": "2.3.1" + }, + { + "modId": "5D6EBC81EB1842EF", + "name": "Mod Name 3", + "version": "0.9.5" + } +] +``` + +This file includes the `modId`, `name`, and `version` fields for each mod. The `modId` is required, while the other fields are optional but can help with organization and clarity. + +### Generating the JSON from Inside Arma Reforger + +To generate a JSON file for mods directly from the Arma Reforger game: + +1. Launch the game and navigate to the Workshop menu. +2. Subscribe to the desired mods. +3. Use the in-game export feature to save the mod list as a JSON file. This file will include all subscribed mods with their IDs and metadata. + +You can then use this JSON file with the `GAME_MODS_JSON_FILE_PATH` environment variable. + +### Why `mods_file.json` is Preferred for Advanced Mod Management + +Using a `mods_file.json` is ideal for: + +- **Long Mod Lists**: Managing a large number of mods is easier in a JSON file than in a single environment variable. +- **Complex Setups**: The JSON format allows you to specify additional metadata, such as mod versions or load order, which is not possible with `GAME_MODS_IDS_LIST`. +- **Version Control**: You can track changes to the JSON file in your version control system, ensuring consistency across deployments. +- **Collaboration**: Sharing a JSON file with teammates is more straightforward than sharing environment variables. + +This approach provides greater flexibility and organization for managing mods in your server setup. + +--- + +## Additional Server Parameters + +You can pass additional parameters to the server binary using the `ARMA_PARAMS` environment variable. This is useful for parameters that do not have specific environment variables assigned. For example: +For detailed information on all available server configuration options, refer to the [official Arma Reforger Server Config documentation](https://community.bistudio.com/wiki/Arma_Reforger:Server_Config). + +```yaml +environment: + - ARMA_PARAMS=-lobbyPlayerSynchronise=true -disableNavmeshStreaming=['Soldiers', 'BTRlike'] +``` + +--- + +## Useful Tips + +- Always use persistent volumes for `/reforger/Configs`, `/home/profile`, and `/reforger/workshop` to prevent data loss. +- Use strong passwords for admin and RCON access. +- Regularly back up your configuration and profile data. diff --git a/docs/configuration-guide/index.md b/docs/configuration-guide/index.md new file mode 100644 index 0000000..0ec51e9 --- /dev/null +++ b/docs/configuration-guide/index.md @@ -0,0 +1,92 @@ +# Configuration + +Learn how to configure your Arma Reforger Dedicated Server using environment variables and configuration files. + +--- + +## Environment Variables + +Here is the original markdown table, with the "Description" column placed back into the table, but with the table itself made more compact and readable. The columns have been resized to fit the content better. + +| Variable | Default Value | Description | +| :--- | :--- | :--- | +| **`ARMA_BINARY`** | `./ArmaReforgerServer` | Path to the server binary. | +| **`ARMA_CONFIG`** | `docker_generated` | Path to the server configuration file. | +| **`ARMA_MAX_FPS`** | `120` | Maximum server FPS. | +| **`ARMA_PARAMS`** | (empty) | Additional parameters to pass to the server binary. | +| **`ARMA_PROFILE`** | `/home/profile` | Path to the server profile directory. | +| **`ARMA_WORKSHOP_DIR`** | `/reforger/workshop` | Path to the workshop directory. | +| **`GAME_ADMINS`** | (empty) | Comma-separated list of admin identity IDs or Steam IDs. | +| **`GAME_MAX_PLAYERS`** | `32` | Maximum number of players allowed. | +| **`GAME_MODS_IDS_LIST`** | (empty) | Comma-separated list of mod IDs with optional versions. | +| **`GAME_MODS_JSON_FILE_PATH`** | (empty) | Path to a JSON file containing mod definitions. | +| **`GAME_NAME`** | `Arma Reforger Docker Server` | Name of the server. | +| **`GAME_PASSWORD`** | (empty) | Password to join the server. | +| **`GAME_PASSWORD_ADMIN`** | (empty) | Admin password for the server. Automatically generated if empty | +| **`GAME_PROPS_BATTLEYE`** | `true` | Whether BattlEye anti-cheat is enabled. | +| **`GAME_PROPS_DISABLE_THIRD_PERSON`** | `false` | Whether third-person view is disabled. | +| **`GAME_PROPS_FAST_VALIDATION`** | `true` | Whether fast validation is enabled. | +| **`GAME_PROPS_NETWORK_VIEW_DISTANCE`** | `1000` | Network view distance. | +| **`GAME_PROPS_SERVER_MAX_VIEW_DISTANCE`** | `2500` | Maximum view distance on the server. | +| **`GAME_PROPS_SERVER_MIN_GRASS_DISTANCE`** | `50` | Minimum grass rendering distance. | +| **`GAME_SCENARIO_ID`** | `{ECC61978EDCC2B5A}Missions/23_Campaign.conf` | Scenario to load on the server. | +| **`GAME_SUPPORTED_PLATFORMS`** | `PLATFORM_PC,PLATFORM_XBL,PLATFORM_PSN` | Platforms supported by the server. | +| **`GAME_VISIBLE`** | `true` | Whether the server is visible in the browser. | +| **`RCON_ADDRESS`** | `0.0.0.0` | Address for RCON. | +| **`RCON_PASSWORD`** | (empty) | Password for RCON (required to enable it). | +| **`RCON_PERMISSION`** | `admin` | Permission level for RCON clients. | +| **`RCON_PORT`** | `19999` | Port for RCON. | +| **`SERVER_A2S_ADDRESS`** | `0.0.0.0` | Address for A2S queries. | +| **`SERVER_A2S_PORT`** | `17777` | Port for A2S queries. | +| **`SERVER_BIND_ADDRESS`** | `0.0.0.0` | Address to bind the server to. | +| **`SERVER_BIND_PORT`** | `2001` | Port to bind the server to. | +| **`SERVER_PUBLIC_ADDRESS`** | (empty) | Public IP address of the server. | +| **`SERVER_PUBLIC_PORT`** | `2001` | Public port of the server. | +| **`SKIP_INSTALL`** | `false` | Whether to skip the installation of server files. | +| **`STEAM_APPID`** | `1874900` | Steam App ID. Use `1890870` for the experimental server. | +| **`STEAM_BRANCH`** | `public` | Steam branch to use (e.g., `public`, `beta`). | +| **`STEAM_BRANCH_PASSWORD`** | (empty) | Password for a private Steam branch. | +| **`STEAM_PASSWORD`** | (empty) | Steam password for the specified user. | +| **`STEAM_USER`** | (empty) | Steam username. Defaults to anonymous login. | + +For a complete and up-to-date list of environment variables, check the `Dockerfile` as the source of truth. + +--- + +## Custom Configuration File + +To use a custom configuration file: + +1. Start the server once to generate the default configuration file (`docker_generated.json`) in the `configs` directory. +2. Rename and modify this file as needed (e.g., `my_custom_config.json`). +3. Update the `ARMA_CONFIG` environment variable to point to the new file. +4. Restart the server to apply the changes. + +--- + +## Example `.env` File + +Here’s an example `.env` file for configuring your server: + +```env +ARMA_CONFIG=docker_generated.json +GAME_NAME=My Custom Server +GAME_PASSWORD= +GAME_PASSWORD_ADMIN=ChangeMeNow!123 +GAME_MAX_PLAYERS=64 +GAME_SCENARIO_ID={3DAD390C31623F04}Missions/24_OVT_Eden.conf +SKIP_INSTALL=false +``` + +--- + +## Volumes and Data Persistence + +To ensure server files and configurations persist across container restarts, map a host directory to `/reforger` in your Docker Compose or Docker run command: + +```yaml +volumes: + - ./reforger:/reforger +``` + +For more advanced configuration options, refer to the [Advanced Usage](../advanced-usage/index.md) section. diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md new file mode 100644 index 0000000..1898c45 --- /dev/null +++ b/docs/getting-started/index.md @@ -0,0 +1,52 @@ +# Getting Started + +This guide will walk you through deploying the Arma Reforger dedicated server using Docker. + +## Prerequisites + +- Docker installed and running on your system. +- Docker Compose (optional, but recommended). + +## Deployment + +### Docker CLI + +1. Create the container: + + ```bash + docker create \ + --name=reforger-server \ + -p 2001:2001/udp \ + -p 17777:17777/udp \ + ghcr.io/acemod/arma-reforger:latest + ``` + +2. Start the container: + + ```bash + docker start reforger-server + ``` + +### Docker Compose + +1. Create a `docker-compose.yml` file: + + ```yaml + --- + services: + arma-reforger: + image: ghcr.io/acemod/arma-reforger:latest + ports: + - "2001:2001/udp" + - "17777:17777/udp" + environment: + - GAME_NAME="My Reforger Server" + ``` + +2. Start the server: + + ```bash + docker compose up -d + ``` + +See the [Configuration Documentation](../configuration-guide/index.md) for available environment variables. diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..dfc8ada --- /dev/null +++ b/docs/index.md @@ -0,0 +1,8 @@ +# Documentation + +Welcome to the documentation for the Arma Reforger Dedicated Server. + +- [Getting Started](getting-started/index.md): Learn how to quickly deploy the server using Docker. +- [Configuration](configuration/index.md): Explore all available environment variables and configuration options. +- [Advanced Usage](advanced-usage/index.md): Discover advanced techniques like running multiple instances and using mods. +- [Troubleshooting](troubleshooting/index.md): Find solutions to common problems and issues. diff --git a/docs/troubleshooting/index.md b/docs/troubleshooting/index.md new file mode 100644 index 0000000..325069e --- /dev/null +++ b/docs/troubleshooting/index.md @@ -0,0 +1,67 @@ +# Troubleshooting + +This section provides solutions to common issues encountered when running the Arma Reforger Dedicated Server with Docker. + +--- + +## [Errno 2] No such file or directory: './ArmaReforgerServer' + +**Problem:** +The server fails to start because the `ArmaReforgerServer` binary is missing. This typically occurs if the server files have not been installed or if the installation directory is not persisted. + +**Solution:** + +1. Ensure that `SKIP_INSTALL` is set to `false` during the first run to download the server files. +2. Use a persistent Docker volume for `/reforger` to retain the server files across restarts. +3. If `SKIP_INSTALL=true` is set, verify that the binary exists in the mounted volume. + +--- + +## Docker Volume Issues + +**Problem:** +Server files are lost after stopping or removing the container. + +**Solution:** + +- Always map a persistent volume from the host to `/reforger` in your Docker or Docker Compose configuration. +- Example for Docker Compose: + + ```yaml + volumes: + - ./reforger:/reforger + ``` + +--- + +## RCON Not Working + +**Problem:** +RCON does not connect or fails to authenticate. + +**Solution:** + +1. Ensure `RCON_PASSWORD` is set and meets the requirements (at least 3 characters, no spaces). +2. Verify that the RCON port is correctly mapped and not blocked by a firewall. + +--- + +## Configuration Not Applied + +**Problem:** +Changes to environment variables do not reflect in the server. + +**Solution:** + +1. If you are using a custom configuration file (not `docker_generated.json`), ensure the `ARMA_CONFIG` environment variable is set to the path of your file. Double-check that the file contains the desired configuration settings. +2. Restart the container after making changes to environment variables or configuration files. +3. If the issue persists, verify that the configuration file is correctly formatted and accessible by the container. +4. Alternatively, edit the file directly in the mounted volume to ensure changes are applied. + +--- + +## Need More Help? + +- Refer to the [Documentation](../index.md) for setup and configuration examples. +- Consult the [Configuration Guide](../configuration-guide/index.md) for detailed information on environment variables. +- Explore the [Advanced Usage](../advanced-usage/index.md) section for complex scenarios. diff --git a/examples/docker-compose-multiple-servers-env-files.yml b/examples/docker-compose-multiple-servers-env-files.yml new file mode 100644 index 0000000..62f8d10 --- /dev/null +++ b/examples/docker-compose-multiple-servers-env-files.yml @@ -0,0 +1,34 @@ +--- +# Example: Multiple Servers with `.env` Files +services: + arma-reforger-server1: + image: ghcr.io/acemod/arma-reforger:latest + platform: linux/amd64 + container_name: arma-reforger-server1 + restart: unless-stopped + ports: + - 2001:2001/udp + - 17777:17777/udp + - 19999:19999/udp # RCON + volumes: + - ./reforger/server1/configs:/reforger/Configs + - ./reforger/server1/profile:/home/profile + - ./reforger/workshop:/reforger/workshop + env_file: + - .env_server1 + + arma-reforger-server2: + image: ghcr.io/acemod/arma-reforger:latest + platform: linux/amd64 + container_name: arma-reforger-server2 + restart: unless-stopped + ports: + - 3001:2001/udp + - 27777:17777/udp + - 29999:19999/udp # RCON + volumes: + - ./reforger/server2/configs:/reforger/Configs + - ./reforger/server2/profile:/home/profile + - ./reforger/workshop:/reforger/workshop + env_file: + - .env_server2 \ No newline at end of file diff --git a/examples/docker-compose-multiple-servers-env-variables.yml b/examples/docker-compose-multiple-servers-env-variables.yml new file mode 100644 index 0000000..ba9d9ba --- /dev/null +++ b/examples/docker-compose-multiple-servers-env-variables.yml @@ -0,0 +1,43 @@ +--- +# Example: Multiple Servers with Environment Variables +services: + arma-reforger-server1: + image: ghcr.io/acemod/arma-reforger:latest + platform: linux/amd64 + container_name: arma-reforger-server1 + restart: unless-stopped + ports: + - 2001:2001/udp + - 17777:17777/udp + - 19999:19999/udp # RCON + volumes: + - ./reforger/server1/configs:/reforger/Configs + - ./reforger/server1/profile:/home/profile + - ./reforger/shared/workshop:/reforger/workshop + environment: + - SERVER_PUBLIC_ADDRESS=your.public.ip + - GAME_NAME=Server 1 + - RCON_PASSWORD=ChangeMePlz123! + - MAX_PLAYERS=64 + - ADMIN_PASSWORD=NotASafePass! + + arma-reforger-server2: + image: ghcr.io/acemod/arma-reforger:latest + platform: linux/amd64 + container_name: arma-reforger-server2 + restart: unless-stopped + ports: + - 3001:2001/udp + - 27777:17777/udp + - 29999:19999/udp # RCON + volumes: + - ./reforger/server2/configs:/reforger/Configs + - ./reforger/server2/profile:/home/profile + - ./reforger/shared/workshop:/reforger/workshop + environment: + - SERVER_PUBLIC_ADDRESS=your.public.ip + - SERVER_PUBLIC_PORT=3001 + - GAME_NAME=Server 2 + - RCON_PASSWORD=DontUseThisOne! + - MAX_PLAYERS=64 + - ADMIN_PASSWORD=PickYourOwnPass! diff --git a/examples/docker-compose-single-server.yml b/examples/docker-compose-single-server.yml new file mode 100644 index 0000000..3009b40 --- /dev/null +++ b/examples/docker-compose-single-server.yml @@ -0,0 +1,21 @@ +--- +# Example: Single Server with Environment Variables +services: + arma-reforger: + image: ghcr.io/acemod/arma-reforger:latest + platform: linux/amd64 + container_name: arma-reforger + restart: unless-stopped + ports: + - 2001:2001/udp + - 17777:17777/udp + - 19999:19999/udp # RCON + volumes: + - ./reforger/configs:/reforger/Configs + - ./reforger/profile:/home/profile + - ./reforger/workshop:/reforger/workshop + environment: + - ARMA_CONFIG=docker_generated.json + - SERVER_PUBLIC_ADDRESS=your.public.ip + - GAME_NAME=My Custom Server + - RCON_PASSWORD=ChangeItOrElse! \ No newline at end of file diff --git a/examples/docker-compose-static-config.yml b/examples/docker-compose-static-config.yml new file mode 100644 index 0000000..e9f953f --- /dev/null +++ b/examples/docker-compose-static-config.yml @@ -0,0 +1,18 @@ +--- +# Example: Single Server with Config Variable Only +services: + arma-reforger: + image: ghcr.io/acemod/arma-reforger:latest + platform: linux/amd64 + container_name: arma-reforger + restart: unless-stopped + ports: + - 2001:2001/udp + - 17777:17777/udp + - 19999:19999/udp # RCON + volumes: + - ./reforger/configs:/reforger/Configs + - ./reforger/profile:/home/profile + - ./reforger/workshop:/reforger/workshop + environment: + - ARMA_CONFIG=my_custom_server.json \ No newline at end of file diff --git a/examples/env_example b/examples/env_example new file mode 100644 index 0000000..39b2c98 --- /dev/null +++ b/examples/env_example @@ -0,0 +1,42 @@ +# Example Environment Variables for Arma Reforger Server + +# Server Configuration +#ARMA_CONFIG=static_config.json +SERVER_BIND_ADDRESS=0.0.0.0 +SERVER_BIND_PORT=2001 +SERVER_PUBLIC_ADDRESS=your.public.ip +SERVER_PUBLIC_PORT=2001 +SERVER_A2S_ADDRESS=0.0.0.0 +SERVER_A2S_PORT=17777 + +# RCON Configuration +RCON_ADDRESS=0.0.0.0 +RCON_PORT=19999 +RCON_PASSWORD=ChangeMeNow!123 +RCON_PERMISSION=admin + +# Game Configuration +GAME_NAME=My Custom Reforger Server +GAME_PASSWORD= +GAME_PASSWORD_ADMIN= +GAME_ADMINS=["12345678-90ab-cdef-1234-567890abcdef","12585678-90ab-cdef-1234-567890abcdfg"] +GAME_SCENARIO_ID={ECC61978EDCC2B5A}Missions/23_Campaign.conf +GAME_MAX_PLAYERS=32 +GAME_VISIBLE=true +GAME_SUPPORTED_PLATFORMS=PLATFORM_PC,PLATFORM_XBL,PLATFORM_PSN + +# Game Properties +GAME_PROPS_BATTLEYE=true +GAME_PROPS_DISABLE_THIRD_PERSON=false +GAME_PROPS_FAST_VALIDATION=true +GAME_PROPS_SERVER_MAX_VIEW_DISTANCE=2500 +GAME_PROPS_SERVER_MIN_GRASS_DISTANCE=50 +GAME_PROPS_NETWORK_VIEW_DISTANCE=1000 + +# Mods Configuration +GAME_MODS_IDS_LIST=656CB5B501F13095,5AAAC70D754245DD +# Or +#GAME_MODS_JSON_FILE_PATH= + +# Installation Configuration +SKIP_INSTALL=false