diff --git a/dayz/README.md b/dayz/README.md index 9dfa13c1..1e9f692f 100644 --- a/dayz/README.md +++ b/dayz/README.md @@ -35,6 +35,14 @@ ___ 💻 💡 + + +
shaynendradika +
+
+ 💻 + 💡 + @@ -51,13 +59,13 @@ ___ ### Egg Capabilities - Able to download server updates on startup -- Able to download, update, and load Steam Workshop mods on startup (\*see [Installation/System Requirements](#installationsystem-requirements)) +- Able to download, update, and load Steam Workshop mods on startup (\*see [Installation/System Requirements: Game Ownership](#game-ownership)) - Also accepts server-side only mods. - Checks for mod updates against their Steam Workshop page's last update for quick and efficient update checks. - Automatically moves mod `.bikey`'s to the `/keys/` directory. - Note: These features only work with mods in the `@workshopID#` format. Manually uploaded mods are not automatically updated. - Multiple basic settings found within the `serverDZ.cfg` file can be easily set from the server's Startup tab - - Server name, passwords, disable third person, persistant time, and more... + - Server name, passwords, disable third person, persistent time, and more... - Max Players is configurable and able to be host enforced (\*see [Recommended Egg Modifications](#recommended-egg-modifications)) - Additional [DayZ startup parameters](https://community.bistudio.com/wiki/DayZ:Server_Configuration#Launch_Parameters) can be added to fine-tune performance - [WHMCS](https://www.whmcs.com/) compatible (\*see [Recommended Egg Modifications](#recommended-egg-modifications)) @@ -68,10 +76,11 @@ ___ Default server ports are listed below, but all ports can be changed freely. -| Port | Default (UDP) | -|---------|---------| -| **DayZ Game (Main)** | 2302 | -| Steam Query | 27016 | +| Port | Default | Protocol | Required | Notes | +|---------|---------|---------|---------|---------| +| **Game** | 2302 | UDP | **Yes** | Primary port in Panel | +| Steam Query | 27016 | UDP | Partially | Required for server listing | +| RCON | 2305 | UDP | No | Required to be defined, but not required to be assigned to the server | ___ @@ -90,7 +99,15 @@ ___ | Storage | 3072 MiB | 7168+ MiB (depends on how many mods are installed) | | Network | 0.512 Mbit/s/player | 1-5 Mbit/s/player | | Host OS | Most stable Linux OS branches should work | Using the latest kernel version for your installed OS can prevent some edge-case installation/boot issues. | -| Game Ownership | Not required to install game server. | Required for automatic Steam Workshop mod downloading to work. However, this is optional functionality, and mods can be manually uploaded to the server if desired. Hosts may feel free to change the "Disable Mod Downloads/Updates" variable to `1` if they would not like to offer it's functionality to clients. | + +#### Game Ownership: + +While not required, it is ***highly recommended*** that the Steam account used to install this server **owns** the DayZ **game** for the following reasons: +- Vanilla mission files will only update automatically with the server if the game is owned. + - They can still be manually updated by deleting the `mpmissions/` directory and reinstalling the server (this will not erase other files). +- Automatic Steam Workshop mod downloading requires ownership. + - This is optional functionality, and mods can be manually uploaded to the server if desired. + - Hosts may feel free to change the "[Host] Disable Mod Downloads/Updates" variable to `1` if they would not like to offer this functionality to clients. ___ @@ -113,10 +130,10 @@ ___ > [!CAUTION] > The following is ***highly discouraged*** for production environments or even private use. It should only be used if you *really* don't want to disable Steam Guard and don't plan on updating your server/mods often. Support will not be given to those with Steam Guard enabled. Additionally, using this method, you are at risk of rate limiting your account if something goes wrong. -1. Edit the Egg so the Input Rules of the "Steam Username" and "Steam Password" Variables are `nullable|string`. -2. Create a new server as normal, but set "Steam Username" to be `anonymous` and "Steam Password" to be blank. This will cause the installer to successfully install SteamCMD but fail to install the DayZ server; this is intentional. -3. Once the server is created, go to the Startup tab. Change "Steam Username" and "Steam Password" to be your real Steam account and password. Also, enable "[Repair] Validate Server Files" (this only needs to be enabled for the first boot). -4. Start the server. The console will eventually appear to freeze on the line: `Loading Steam API...OK`. You will likely receive a Steam Guard request for login at this time. Approve this request just to be safe, but this will not log you in. Next, obtain a valid Steam Guard code, enter it into the console, and press Enter to submit it. This should log you in. It is successful if you see: `Two-factor code:OK`. The server will then download for the first time. Note: It may glitch and not display installation progress; be patient while it downloads and verifies. +1. When creating your server, set the variables "[Host] Skip Game Server Install" and "[Repair] Validate Server Files" to `1`. +2. Proceed with installation as normal. +3. If the server has not automatically started after installation, start it. +4. The console will eventually appear to freeze on the line: `Loading Steam API...OK`. You will likely receive a Steam Guard request for login at this time. Approve this request just to be safe, but this will not log you in. Next, obtain a valid Steam Guard code, enter it into the console, and press Enter to submit it. This should log you in. It is successful if you see: `Two-factor code:OK`. The server will then download for the first time. Note: It may glitch and not display installation progress; be patient while it downloads and verifies. - If you have mods to install, you will have to repeat this process of obtaining and entering in a *new* Steam Guard code for *every* mod. -5. Stop the server after it starts. Open the file `serverDZ.cfg` and add `steamQueryPort = 2305;` to the end of the file. (If the file was empty when you opened it for whatever reason, grab the default contents [here](https://community.bistudio.com/wiki/DayZ:Server_Configuration#Main_Parameters)) -6. The server is now ready for a "normal" boot. However, it is recommended you disable the "Automatic Updates" Startup Variable until you need to update again. Otherwise, you will have to go through the process of entering in Steam Guard codes again every boot. +5. The server should properly start at this time. +6. Go to the Startup tab and disable "[Repair] Validate Server Files". Also, it is recommended you disable the "Automatic Updates" Startup Variable until you need to update again. Otherwise, you will have to go through the process of entering in Steam Guard codes again *every boot*. diff --git a/dayz/config/serverDZ.cfg b/dayz/config/serverDZ.cfg new file mode 100644 index 00000000..a5142519 --- /dev/null +++ b/dayz/config/serverDZ.cfg @@ -0,0 +1,44 @@ +hostname = "EXAMPLE NAME"; // Server name +password = ""; // Password to connect to the server +passwordAdmin = ""; // Password to become a server admin + +enableWhitelist = 0; // Enable/disable whitelist (value 0-1) + +maxPlayers = 60; // Maximum amount of players + +verifySignatures = 2; // Verifies .pbos against .bisign files. (only 2 is supported) +forceSameBuild = 1; // When enabled, the server will allow the connection only to clients with same the .exe revision as the server (value 0-1) + +disableVoN = 0; // Enable/disable voice over network (value 0-1) +vonCodecQuality = 20; // Voice over network codec quality, the higher the better (values 0-30) + +disable3rdPerson=0; // Toggles the 3rd person view for players (value 0-1) +disableCrosshair=0; // Toggles the cross-hair (value 0-1) + +disablePersonalLight = 1; // Disables personal light for all clients connected to server +lightingConfig = 0; // 0 for brighter night setup, 1 for darker night setup + +serverTime="SystemTime"; // Initial in-game time of the server. "SystemTime" means the local time of the machine. Another possibility is to set the time to some value in "YYYY/MM/DD/HH/MM" format, f.e. "2015/4/8/17/23" . +serverTimeAcceleration=12; // Accelerated Time (value 0-24)// This is a time multiplier for in-game time. In this case, the time would move 24 times faster than normal, so an entire day would pass in one hour. +serverNightTimeAcceleration=1; // Accelerated Nigh Time - The numerical value being a multiplier (0.1-64) and also multiplied by serverTimeAcceleration value. Thus, in case it is set to 4 and serverTimeAcceleration is set to 2, night time would move 8 times faster than normal. An entire night would pass in 3 hours. +serverTimePersistent=0; // Persistent Time (value 0-1)// The actual server time is saved to storage, so when active, the next server start will use the saved time value. + +guaranteedUpdates=1; // Communication protocol used with game server (use only number 1) + +loginQueueConcurrentPlayers=5; // The number of players concurrently processed during the login process. Should prevent massive performance drop during connection when a lot of people are connecting at the same time. +loginQueueMaxPlayers=500; // The maximum number of players that can wait in login queue + +instanceId = 1; // DayZ server instance id, to identify the number of instances per box and their storage folders with persistence files + +storageAutoFix = 1; // Checks if the persistence files are corrupted and replaces corrupted ones with empty ones (value 0-1) + + +class Missions +{ + class DayZ + { + template="dayzOffline.chernarusplus"; // Mission to load on server startup. . + // Vanilla mission: dayzOffline.chernarusplus + // DLC mission: dayzOffline.enoch + }; +}; \ No newline at end of file diff --git a/dayz/egg-day-z.json b/dayz/egg-day-z.json index 91c43ffe..ae99aa71 100644 --- a/dayz/egg-day-z.json +++ b/dayz/egg-day-z.json @@ -18,14 +18,14 @@ "file_denylist": [], "startup": ".\/{{SERVER_BINARY}} -port={{SERVER_PORT}} -profiles=profiles -bepath=.\/ -config=serverDZ.cfg -mod={{CLIENT_MODS}} -serverMod={{SERVERMODS}} {{STARTUP_PARAMS}}", "config": { - "files": "{\r\n \"serverDZ.cfg\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"hostname =\": \"hostname = \\\"{{env.SERVER_HOSTNAME}}\\\";\",\r\n \"password =\": \"password = \\\"{{env.SERVER_PASSWORD}}\\\";\",\r\n \"passwordAdmin =\": \"passwordAdmin = \\\"{{env.ADMIN_PASSWORD}}\\\";\",\r\n \"maxPlayers\": \"maxPlayers = {{env.MAX_PLAYERS}};\",\r\n \"verifySignatures\": \"verifySignatures = {{env.VERIFY_SIGNATURES}};\",\r\n \"forceSameBuild\": \"forceSameBuild = {{env.ENFORCE_BUILD}};\",\r\n \"disableVoN\": \"disableVoN = {{env.DISABLE_VON}};\",\r\n \"vonCodecQuality\": \"vonCodecQuality = {{env.VON_QUALITY}};\",\r\n \"disable3rdPerson\": \"disable3rdPerson = {{env.DISABLE_THIRD}};\",\r\n \"disableCrosshair\": \"disableCrosshair = {{env.DISABLE_CROSSHAIR}};\",\r\n \"disablePersonalLight\": \"disablePersonalLight = {{env.DISABLE_PERSONAL_LIGHT}};\",\r\n \"lightingConfig\": \"lightingConfig = {{env.LIGHTING_CONFIG}};\",\r\n \"serverTimeAcceleration\": \"serverTimeAcceleration = {{env.TIME_MULT}};\",\r\n \"serverNightTimeAcceleration\": \"serverNightTimeAcceleration = {{env.NIGHT_MULT}};\",\r\n \"serverTimePersistent\": \"serverTimePersistent = {{env.PERSISTENT_TIME}};\",\r\n \"steamQueryPort\": \"steamQueryPort = {{env.QUERY_PORT}};\"\r\n }\r\n },\r\n \"battleye\/beserver_x64.cfg\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"RConPort\": \"RConPort {{env.RCON_PORT}}\",\r\n \"RConPassword\": \"RConPassword {{env.RCON_PASSWORD}}\"\r\n }\r\n }\r\n}", + "files": "{\r\n \"serverDZ.cfg\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"hostname =\": \"hostname = \\\"{{server.environment.SERVER_HOSTNAME}}\\\";\",\r\n \"password =\": \"password = \\\"{{server.environment.SERVER_PASSWORD}}\\\";\",\r\n \"passwordAdmin =\": \"passwordAdmin = \\\"{{server.environment.ADMIN_PASSWORD}}\\\";\",\r\n \"maxPlayers\": \"maxPlayers = {{server.environment.MAX_PLAYERS}};\",\r\n \"verifySignatures\": \"verifySignatures = {{server.environment.VERIFY_SIGNATURES}};\",\r\n \"forceSameBuild\": \"forceSameBuild = {{server.environment.ENFORCE_BUILD}};\",\r\n \"disableVoN\": \"disableVoN = {{server.environment.DISABLE_VON}};\",\r\n \"vonCodecQuality\": \"vonCodecQuality = {{server.environment.VON_QUALITY}};\",\r\n \"disable3rdPerson\": \"disable3rdPerson = {{server.environment.DISABLE_THIRD}};\",\r\n \"disableCrosshair\": \"disableCrosshair = {{server.environment.DISABLE_CROSSHAIR}};\",\r\n \"disablePersonalLight\": \"disablePersonalLight = {{server.environment.DISABLE_PERSONAL_LIGHT}};\",\r\n \"lightingConfig\": \"lightingConfig = {{server.environment.LIGHTING_CONFIG}};\",\r\n \"serverTimeAcceleration\": \"serverTimeAcceleration = {{server.environment.TIME_MULT}};\",\r\n \"serverNightTimeAcceleration\": \"serverNightTimeAcceleration = {{server.environment.NIGHT_MULT}};\",\r\n \"serverTimePersistent\": \"serverTimePersistent = {{server.environment.PERSISTENT_TIME}};\",\r\n \"steamQueryPort\": \"steamQueryPort = {{server.environment.QUERY_PORT}};\"\r\n }\r\n },\r\n \"battleye\/beserver_x64.cfg\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"RConPort\": \"RConPort {{server.environment.RCON_PORT}}\",\r\n \"RConPassword\": \"RConPassword {{server.environment.RCON_PASSWORD}}\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \"Mission read.\"\r\n}", "logs": "{}", "stop": "^C" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n\r\n## File: DayZ Egg - egg-dayz.json\r\n## Author: David Wolfe (Red-Thirten)\r\n## Date: 2024\/06\/05\r\n## License: MIT License\r\n## Image to install with is 'ghcr.io\/parkervcp\/installers:debian'\r\n\r\n## Download and install SteamCMD\r\nexport HOME=\/mnt\/server\r\ncd \/tmp\r\nmkdir -p $HOME\/steamcmd $HOME\/steamapps\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C $HOME\/steamcmd\r\ncd $HOME\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\n\r\n# Install\/Verify game server using SteamCMD\r\n.\/steamcmd.sh +force_install_dir $HOME \"+login \\\"${STEAM_USER}\\\" \\\"${STEAM_PASS}\\\"\" +app_update ${STEAMCMD_APPID} $( [[ -z ${STEAMCMD_BETAID} ]] || printf %s \"-beta ${STEAMCMD_BETAID}\" ) $( [[ -z ${STEAMCMD_BETAPASS} ]] || printf %s \"-betapassword ${STEAMCMD_BETAPASS}\" ) ${INSTALL_FLAGS} validate +quit\r\n\r\n# Set up 32 and 64 bit libraries\r\nmkdir -p $HOME\/.steam\/sdk{32,64}\r\ncp -v linux32\/steamclient.so $HOME\/.steam\/sdk32\/steamclient.so\r\ncp -v linux64\/steamclient.so $HOME\/.steam\/sdk64\/steamclient.so\r\n\r\n## DayZ Setup\r\ncd $HOME\r\n\r\n# Check for successful installation\r\nif [ ! -f DayZServer ] || [ ! -f serverDZ.cfg ]; then\r\n echo -e \"\\n\\n[ERROR] SteamCMD failed to install the DayZ Dedicated Server!\"\r\n echo -e \"\\tTry reinstalling the server again.\\n\"\r\n exit 1\r\nfi\r\n\r\n# Add required steamQueryPort parameter to end of default serverDZ.cfg (if it's missing)\r\nif ! grep -q \"steamQueryPort\" serverDZ.cfg; then\r\n echo -e '\\nAdding required additional parameters to end of default \"serverDZ.cfg\"...'\r\ncat >> serverDZ.cfg << EOL\r\n\r\n\r\nsteamQueryPort = 2305;\r\nEOL\r\nfi\r\n\r\n# Check for BattlEye RCon configuration\r\necho -e '\\nCreating BattlEye RCon Configuration.'\r\ncat > $HOME\/battleye\/beserver_x64.cfg << EOF\r\nRConPort ${RCON_PORT}\r\nRConPassword ${RCON_PASSWORD}\r\nRestrictRCon 0\r\nEOF\r\n\r\necho -e \"\\nDayZ Dedicated Server successfully installed!\\n\"", + "script": "#!\/bin\/bash\r\n\r\n## File: Pelican DayZ Egg - egg-day-z.json\r\n## Author: David Wolfe (Red-Thirten)\r\n## Date: 2024\/07\/04\r\n## License: MIT License\r\n## Image to install with is 'ghcr.io\/parkervcp\/installers:debian'\r\n\r\nexport HOME=\/mnt\/server\r\nCONFIG_URL=\"https:\/\/raw.githubusercontent.com\/pelican-eggs\/games-steamcmd\/main\/dayz\/config\/serverDZ.cfg\"\r\nMISSIONS_GITHUB_PACKAGE=\"BohemiaInteractive\/DayZ-Central-Economy\"\r\n\r\n## Download and install SteamCMD\r\ncd \/tmp\r\nmkdir -p $HOME\/steamcmd $HOME\/steamapps\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C $HOME\/steamcmd\r\ncd $HOME\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\n\r\nif [ \"$SKIP_INSTALL\" -eq 1 ]; then\r\n # This is for the minority of hosts who want to install this server with Steam Guard enabled.\r\n # Please read the README for instructions on how to do this properly!\r\n echo -e '\"Skip Game Server Install\" variable is set to enabled!'\r\n echo -e \"\\tOnly SteamCMD will be installed...\"\r\n .\/steamcmd.sh +quit\r\nelse\r\n # Install\/Verify game server using SteamCMD\r\n .\/steamcmd.sh +force_install_dir $HOME \"+login \\\"${STEAM_USER}\\\" \\\"${STEAM_PASS}\\\"\" +app_update ${STEAMCMD_APPID} $( [[ -z ${STEAMCMD_BETAID} ]] || printf %s \"-beta ${STEAMCMD_BETAID}\" ) $( [[ -z ${STEAMCMD_BETAPASS} ]] || printf %s \"-betapassword ${STEAMCMD_BETAPASS}\" ) ${INSTALL_FLAGS} validate +quit\r\nfi\r\necho -e \"\"\r\n\r\n# Set up 32 and 64 bit libraries\r\nmkdir -p $HOME\/.steam\/sdk{32,64}\r\ncp -v linux32\/steamclient.so $HOME\/.steam\/sdk32\/steamclient.so\r\ncp -v linux64\/steamclient.so $HOME\/.steam\/sdk64\/steamclient.so\r\n\r\n## DayZ Setup\r\ncd $HOME\r\n\r\n# Check for successful server binary installation\r\nif [ ! -f DayZServer ] && [ \"$SKIP_INSTALL\" -ne 1 ]; then\r\n echo -e \"\\n\\n[ERROR] SteamCMD failed to install the DayZ Dedicated Server!\"\r\n echo -e \"\\tTry reinstalling the server again.\\n\"\r\n exit 1\r\nfi\r\n\r\n# Download default serverDZ.cfg if it is missing or empty (occurs when Steam account *owns* the DayZ game)\r\nif [ ! -f serverDZ.cfg ] || [ ! -s serverDZ.cfg ]; then\r\n echo -e \"'serverDZ.cfg' is missing or empty. Downloading default config file...\"\r\n curl -LO ${CONFIG_URL}\r\n if [ ! -f serverDZ.cfg ]; then\r\n echo -e \"\\n\\n[ERROR] Failed to download default server config file!\"\r\n exit 1\r\n fi\r\n chmod 644 serverDZ.cfg\r\nfi\r\n\r\n# Add required 'steamQueryPort' parameter to the end of serverDZ.cfg (if it's missing)\r\nif ! grep -q \"steamQueryPort\" serverDZ.cfg; then\r\n echo -e \"Adding additional required parameters to the end of 'serverDZ.cfg'...\"\r\n cat >> serverDZ.cfg << EOL\r\n\r\n\r\nsteamQueryPort = ${QUERY_PORT};\r\nEOL\r\nfi\r\n\r\n# Download vanilla mission files if they are missing (occurs when Steam account *does not own* the DayZ game)\r\nif { [ ! -d \"mpmissions\" ] || [ -z \"$(ls -A mpmissions 2>\/dev\/null)\" ]; } && [ \"$SKIP_INSTALL\" -ne 1 ]; then\r\n echo -e \"[WARNING] The Steam account used to install this server does not own the DayZ game!\"\r\n echo -e \"\\tVanilla mission files will have to be MANUALLY updated in the future if they update! (See Egg's README for instructions)\"\r\n echo -e \"\\tDownloading and installing vanilla mission files...\"\r\n mkdir -p $HOME\/mpmissions\r\n cd $HOME\/mpmissions\r\n LATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/${MISSIONS_GITHUB_PACKAGE}\/releases\/latest\")\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq -r .tarball_url)\r\n curl -Lo mpmissions.tar.gz ${DOWNLOAD_URL}\r\n if [ ! -f mpmissions.tar.gz ]; then\r\n echo -e \"\\n\\n[ERROR] Failed to download vanilla mission files!\"\r\n exit 1\r\n fi\r\n tar -xzvf mpmissions.tar.gz --strip-components=1 --wildcards '*\/dayzOffline.chernarusplus\/*' '*\/dayzOffline.enoch\/*'\r\n rm -f mpmissions.tar.gz\r\nfi\r\n\r\n# Check for BattlEye RCon configuration\r\nmkdir -p $HOME\/battleye\r\ncd $HOME\/battleye\r\nif [ ! -f beserver_x64.cfg ]; then\r\n echo -e \"Creating BattlEye RCon Configuration...\"\r\n cat > beserver_x64.cfg << EOF\r\nRConPort ${RCON_PORT}\r\nRConPassword ${RCON_PASSWORD}\r\nRestrictRCon 0\r\nEOF\r\nfi\r\n\r\necho -e \"\\nDayZ Dedicated Server successfully installed!\\n\"", "container": "ghcr.io\/parkervcp\/installers:debian", "entrypoint": "\/bin\/bash" } @@ -35,55 +35,66 @@ "name": "[Host] Steam Query Port", "description": "UDP port for Steam server list features. Helps the server be visible in the client server browser.", "env_variable": "QUERY_PORT", - "default_value": "2305", + "default_value": "27016", "user_viewable": true, "user_editable": false, "rules": "required|integer|between:1024,65536", - "sort": null, + "sort": 1, "field_type": "text" }, { - "name": "Steam Username", + "name": "[Host] Steam Username", "description": "Used for installation and updates. Account does not need to own DayZ, but MUST BE a VALID Steam account (anonymous login cannot be used). For security reasons it is recommended that you create a new Steam account just for your dedicated servers. *This info is not visible to the server owner.*", "env_variable": "STEAM_USER", "default_value": "", "user_viewable": false, "user_editable": false, "rules": "required|string|not_in:anonymous", - "sort": null, + "sort": 2, "field_type": "text" }, { - "name": "Steam Password", + "name": "[Host] Steam Password", "description": "Used for installation and updates. Steam Guard MUST be completely TURNED OFF for the server and mods to download efficiently. *This info is not visible to the server owner, BUT IS stored in PLAIN TEXT. It is NOT advised to use a personal account; best to use a dummy account.*", "env_variable": "STEAM_PASS", "default_value": "", "user_viewable": false, "user_editable": false, "rules": "required|string", - "sort": null, + "sort": 3, "field_type": "text" }, { - "name": "Disable Mod Downloads\/Updates", + "name": "[Host] Disable Mod Downloads\/Updates", "description": "If the Steam account does not own the base DayZ game, Steam Workshop mod downloads\/updates will not work. If so, this setting allows disabling of this feature to avoid errors. (1 ON | 0 OFF)", "env_variable": "DISABLE_MOD_UPDATES", "default_value": "0", "user_viewable": false, "user_editable": false, "rules": "boolean", - "sort": null, + "sort": 4, "field_type": "text" }, { - "name": "Number of SteamCMD Retry Attempts", + "name": "[Host] Number of SteamCMD Retry Attempts", "description": "How many times SteamCMD should retry downloading a server or mod after a recoverable error. (ie. A particularly large mod download times out)", "env_variable": "STEAMCMD_ATTEMPTS", "default_value": "3", "user_viewable": false, "user_editable": false, "rules": "required|integer", - "sort": null, + "sort": 5, + "field_type": "text" + }, + { + "name": "[Host] Skip Game Server Install", + "description": "Skips the installation of game server files via SteamCMD during the installation script. Should only be enabled if you are trying to install the server with a Steam account that has Steam Guard enabled (not recommended).", + "env_variable": "SKIP_INSTALL", + "default_value": "0", + "user_viewable": false, + "user_editable": false, + "rules": "boolean", + "sort": 6, "field_type": "text" }, { @@ -94,7 +105,7 @@ "user_viewable": true, "user_editable": true, "rules": "boolean", - "sort": null, + "sort": 7, "field_type": "text" }, { @@ -104,8 +115,8 @@ "default_value": "DayZ Server", "user_viewable": true, "user_editable": true, - "rules": "nullable|string", - "sort": null, + "rules": "required|string", + "sort": 8, "field_type": "text" }, { @@ -116,7 +127,7 @@ "user_viewable": true, "user_editable": true, "rules": "required|integer|gt:0", - "sort": null, + "sort": 9, "field_type": "text" }, { @@ -127,7 +138,7 @@ "user_viewable": true, "user_editable": true, "rules": "nullable|string", - "sort": null, + "sort": 10, "field_type": "text" }, { @@ -138,7 +149,7 @@ "user_viewable": true, "user_editable": true, "rules": "nullable|string", - "sort": null, + "sort": 11, "field_type": "text" }, { @@ -149,7 +160,7 @@ "user_viewable": true, "user_editable": false, "rules": "required|integer|between:1024,65536", - "sort": null, + "sort": 12, "field_type": "text" }, { @@ -160,7 +171,7 @@ "user_viewable": true, "user_editable": true, "rules": "required|string|max:20", - "sort": null, + "sort": 13, "field_type": "text" }, { @@ -171,7 +182,7 @@ "user_viewable": true, "user_editable": true, "rules": "nullable|string", - "sort": null, + "sort": 14, "field_type": "text" }, { @@ -182,7 +193,7 @@ "user_viewable": true, "user_editable": true, "rules": "nullable|string", - "sort": null, + "sort": 15, "field_type": "text" }, { @@ -193,7 +204,7 @@ "user_viewable": true, "user_editable": true, "rules": "required|string|in:0,2", - "sort": null, + "sort": 16, "field_type": "text" }, { @@ -204,7 +215,7 @@ "user_viewable": true, "user_editable": true, "rules": "boolean", - "sort": null, + "sort": 17, "field_type": "text" }, { @@ -215,7 +226,7 @@ "user_viewable": true, "user_editable": true, "rules": "boolean", - "sort": null, + "sort": 18, "field_type": "text" }, { @@ -226,7 +237,7 @@ "user_viewable": true, "user_editable": true, "rules": "required|integer|between:0,30", - "sort": null, + "sort": 19, "field_type": "text" }, { @@ -237,7 +248,7 @@ "user_viewable": true, "user_editable": true, "rules": "boolean", - "sort": null, + "sort": 20, "field_type": "text" }, { @@ -248,7 +259,7 @@ "user_viewable": true, "user_editable": true, "rules": "boolean", - "sort": null, + "sort": 21, "field_type": "text" }, { @@ -259,7 +270,7 @@ "user_viewable": true, "user_editable": true, "rules": "boolean", - "sort": null, + "sort": 22, "field_type": "text" }, { @@ -270,7 +281,7 @@ "user_viewable": true, "user_editable": true, "rules": "boolean", - "sort": null, + "sort": 23, "field_type": "text" }, { @@ -281,7 +292,7 @@ "user_viewable": true, "user_editable": true, "rules": "boolean", - "sort": null, + "sort": 24, "field_type": "text" }, { @@ -292,7 +303,7 @@ "user_viewable": true, "user_editable": true, "rules": "required|integer|between:0,24", - "sort": null, + "sort": 25, "field_type": "text" }, { @@ -303,7 +314,7 @@ "user_viewable": true, "user_editable": true, "rules": "required|numeric|between:0.1,64", - "sort": null, + "sort": 26, "field_type": "text" }, { @@ -314,7 +325,7 @@ "user_viewable": true, "user_editable": true, "rules": "boolean", - "sort": null, + "sort": 27, "field_type": "text" }, { @@ -325,7 +336,7 @@ "user_viewable": true, "user_editable": true, "rules": "boolean", - "sort": null, + "sort": 28, "field_type": "text" }, { @@ -336,7 +347,7 @@ "user_viewable": true, "user_editable": true, "rules": "nullable|string", - "sort": null, + "sort": 29, "field_type": "text" }, { @@ -347,7 +358,7 @@ "user_viewable": true, "user_editable": true, "rules": "nullable|string", - "sort": null, + "sort": 30, "field_type": "text" }, { @@ -358,7 +369,7 @@ "user_viewable": true, "user_editable": false, "rules": "required|string|in:DayZServer", - "sort": null, + "sort": 31, "field_type": "text" }, { @@ -369,7 +380,7 @@ "user_viewable": true, "user_editable": false, "rules": "required|integer|in:223350,1042420", - "sort": null, + "sort": 32, "field_type": "text" } ] diff --git a/dayz/egg-pterodactyl-day-z.json b/dayz/egg-pterodactyl-day-z.json index cc937805..588b7849 100644 --- a/dayz/egg-pterodactyl-day-z.json +++ b/dayz/egg-pterodactyl-day-z.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2024-06-13T12:52:57+07:00", + "exported_at": "2024-07-04T17:23:00-07:00", "name": "DayZ", "author": "red_thirten@yahoo.com", "description": "How long can you survive a post-apocalyptic world? A land overrun with an infected \"zombie\" population, where you compete with other survivors for limited resources. Will you team up with strangers and stay strong together? Or play as a lone wolf to avoid betrayal? This is DayZ \u2013 this is your story.", @@ -24,7 +24,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n\r\n## File: DayZ Egg - egg-dayz.json\r\n## Author: David Wolfe (Red-Thirten)\r\n## Date: 2024\/06\/05\r\n## License: MIT License\r\n## Image to install with is 'ghcr.io\/parkervcp\/installers:debian'\r\n\r\n## Download and install SteamCMD\r\nexport HOME=\/mnt\/server\r\ncd \/tmp\r\nmkdir -p $HOME\/steamcmd $HOME\/steamapps\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C $HOME\/steamcmd\r\ncd $HOME\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\n\r\n# Install\/Verify game server using SteamCMD\r\n.\/steamcmd.sh +force_install_dir $HOME \"+login \\\"${STEAM_USER}\\\" \\\"${STEAM_PASS}\\\"\" +app_update ${STEAMCMD_APPID} $( [[ -z ${STEAMCMD_BETAID} ]] || printf %s \"-beta ${STEAMCMD_BETAID}\" ) $( [[ -z ${STEAMCMD_BETAPASS} ]] || printf %s \"-betapassword ${STEAMCMD_BETAPASS}\" ) ${INSTALL_FLAGS} validate +quit\r\n\r\n# Set up 32 and 64 bit libraries\r\nmkdir -p $HOME\/.steam\/sdk{32,64}\r\ncp -v linux32\/steamclient.so $HOME\/.steam\/sdk32\/steamclient.so\r\ncp -v linux64\/steamclient.so $HOME\/.steam\/sdk64\/steamclient.so\r\n\r\n## DayZ Setup\r\ncd $HOME\r\n\r\n# Check for successful installation\r\nif [ ! -f DayZServer ] || [ ! -f serverDZ.cfg ]; then\r\n echo -e \"\\n\\n[ERROR] SteamCMD failed to install the DayZ Dedicated Server!\"\r\n echo -e \"\\tTry reinstalling the server again.\\n\"\r\n exit 1\r\nfi\r\n\r\n# Add required steamQueryPort parameter to end of default serverDZ.cfg (if it's missing)\r\nif ! grep -q \"steamQueryPort\" serverDZ.cfg; then\r\n echo -e '\\nAdding required additional parameters to end of default \"serverDZ.cfg\"...'\r\ncat >> serverDZ.cfg << EOL\r\n\r\n\r\nsteamQueryPort = 2305;\r\nEOL\r\nfi\r\n\r\n# Check for BattlEye RCon configuration\r\necho -e '\\nCreating BattlEye RCon Configuration.'\r\ncat > $HOME\/battleye\/beserver_x64.cfg << EOF\r\nRConPort ${RCON_PORT}\r\nRConPassword ${RCON_PASSWORD}\r\nRestrictRCon 0\r\nEOF\r\n\r\necho -e \"\\nDayZ Dedicated Server successfully installed!\\n\"", + "script": "#!\/bin\/bash\r\n\r\n## File: Pterodactyl DayZ Egg - egg-pterodactyl-day-z.json\r\n## Author: David Wolfe (Red-Thirten)\r\n## Date: 2024\/07\/04\r\n## License: MIT License\r\n## Image to install with is 'ghcr.io\/parkervcp\/installers:debian'\r\n\r\nexport HOME=\/mnt\/server\r\nCONFIG_URL=\"https:\/\/raw.githubusercontent.com\/pelican-eggs\/games-steamcmd\/main\/dayz\/config\/serverDZ.cfg\"\r\nMISSIONS_GITHUB_PACKAGE=\"BohemiaInteractive\/DayZ-Central-Economy\"\r\n\r\n## Download and install SteamCMD\r\ncd \/tmp\r\nmkdir -p $HOME\/steamcmd $HOME\/steamapps\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C $HOME\/steamcmd\r\ncd $HOME\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\n\r\nif [ \"$SKIP_INSTALL\" -eq 1 ]; then\r\n # This is for the minority of hosts who want to install this server with Steam Guard enabled.\r\n # Please read the README for instructions on how to do this properly!\r\n echo -e '\"Skip Game Server Install\" variable is set to enabled!'\r\n echo -e \"\\tOnly SteamCMD will be installed...\"\r\n .\/steamcmd.sh +quit\r\nelse\r\n # Install\/Verify game server using SteamCMD\r\n .\/steamcmd.sh +force_install_dir $HOME \"+login \\\"${STEAM_USER}\\\" \\\"${STEAM_PASS}\\\"\" +app_update ${STEAMCMD_APPID} $( [[ -z ${STEAMCMD_BETAID} ]] || printf %s \"-beta ${STEAMCMD_BETAID}\" ) $( [[ -z ${STEAMCMD_BETAPASS} ]] || printf %s \"-betapassword ${STEAMCMD_BETAPASS}\" ) ${INSTALL_FLAGS} validate +quit\r\nfi\r\necho -e \"\"\r\n\r\n# Set up 32 and 64 bit libraries\r\nmkdir -p $HOME\/.steam\/sdk{32,64}\r\ncp -v linux32\/steamclient.so $HOME\/.steam\/sdk32\/steamclient.so\r\ncp -v linux64\/steamclient.so $HOME\/.steam\/sdk64\/steamclient.so\r\n\r\n## DayZ Setup\r\ncd $HOME\r\n\r\n# Check for successful server binary installation\r\nif [ ! -f DayZServer ] && [ \"$SKIP_INSTALL\" -ne 1 ]; then\r\n echo -e \"\\n\\n[ERROR] SteamCMD failed to install the DayZ Dedicated Server!\"\r\n echo -e \"\\tTry reinstalling the server again.\\n\"\r\n exit 1\r\nfi\r\n\r\n# Download default serverDZ.cfg if it is missing or empty (occurs when Steam account *owns* the DayZ game)\r\nif [ ! -f serverDZ.cfg ] || [ ! -s serverDZ.cfg ]; then\r\n echo -e \"'serverDZ.cfg' is missing or empty. Downloading default config file...\"\r\n curl -LO ${CONFIG_URL}\r\n if [ ! -f serverDZ.cfg ]; then\r\n echo -e \"\\n\\n[ERROR] Failed to download default server config file!\"\r\n exit 1\r\n fi\r\n chmod 644 serverDZ.cfg\r\nfi\r\n\r\n# Add required 'steamQueryPort' parameter to the end of serverDZ.cfg (if it's missing)\r\nif ! grep -q \"steamQueryPort\" serverDZ.cfg; then\r\n echo -e \"Adding additional required parameters to the end of 'serverDZ.cfg'...\"\r\n cat >> serverDZ.cfg << EOL\r\n\r\n\r\nsteamQueryPort = ${QUERY_PORT};\r\nEOL\r\nfi\r\n\r\n# Download vanilla mission files if they are missing (occurs when Steam account *does not own* the DayZ game)\r\nif { [ ! -d \"mpmissions\" ] || [ -z \"$(ls -A mpmissions 2>\/dev\/null)\" ]; } && [ \"$SKIP_INSTALL\" -ne 1 ]; then\r\n echo -e \"[WARNING] The Steam account used to install this server does not own the DayZ game!\"\r\n echo -e \"\\tVanilla mission files will have to be MANUALLY updated in the future if they update! (See Egg's README for instructions)\"\r\n echo -e \"\\tDownloading and installing vanilla mission files...\"\r\n mkdir -p $HOME\/mpmissions\r\n cd $HOME\/mpmissions\r\n LATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/${MISSIONS_GITHUB_PACKAGE}\/releases\/latest\")\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq -r .tarball_url)\r\n curl -Lo mpmissions.tar.gz ${DOWNLOAD_URL}\r\n if [ ! -f mpmissions.tar.gz ]; then\r\n echo -e \"\\n\\n[ERROR] Failed to download vanilla mission files!\"\r\n exit 1\r\n fi\r\n tar -xzvf mpmissions.tar.gz --strip-components=1 --wildcards '*\/dayzOffline.chernarusplus\/*' '*\/dayzOffline.enoch\/*'\r\n rm -f mpmissions.tar.gz\r\nfi\r\n\r\n# Check for BattlEye RCon configuration\r\nmkdir -p $HOME\/battleye\r\ncd $HOME\/battleye\r\nif [ ! -f beserver_x64.cfg ]; then\r\n echo -e \"Creating BattlEye RCon Configuration...\"\r\n cat > beserver_x64.cfg << EOF\r\nRConPort ${RCON_PORT}\r\nRConPassword ${RCON_PASSWORD}\r\nRestrictRCon 0\r\nEOF\r\nfi\r\n\r\necho -e \"\\nDayZ Dedicated Server successfully installed!\\n\"", "container": "ghcr.io\/parkervcp\/installers:debian", "entrypoint": "\/bin\/bash" } @@ -34,14 +34,14 @@ "name": "[Host] Steam Query Port", "description": "UDP port for Steam server list features. Helps the server be visible in the client server browser.", "env_variable": "QUERY_PORT", - "default_value": "2305", + "default_value": "27016", "user_viewable": true, "user_editable": false, "rules": "required|integer|between:1024,65536", "field_type": "text" }, { - "name": "Steam Username", + "name": "[Host] Steam Username", "description": "Used for installation and updates. Account does not need to own DayZ, but MUST BE a VALID Steam account (anonymous login cannot be used). For security reasons it is recommended that you create a new Steam account just for your dedicated servers. *This info is not visible to the server owner.*", "env_variable": "STEAM_USER", "default_value": "", @@ -51,7 +51,7 @@ "field_type": "text" }, { - "name": "Steam Password", + "name": "[Host] Steam Password", "description": "Used for installation and updates. Steam Guard MUST be completely TURNED OFF for the server and mods to download efficiently. *This info is not visible to the server owner, BUT IS stored in PLAIN TEXT. It is NOT advised to use a personal account; best to use a dummy account.*", "env_variable": "STEAM_PASS", "default_value": "", @@ -61,7 +61,7 @@ "field_type": "text" }, { - "name": "Disable Mod Downloads\/Updates", + "name": "[Host] Disable Mod Downloads\/Updates", "description": "If the Steam account does not own the base DayZ game, Steam Workshop mod downloads\/updates will not work. If so, this setting allows disabling of this feature to avoid errors. (1 ON | 0 OFF)", "env_variable": "DISABLE_MOD_UPDATES", "default_value": "0", @@ -71,7 +71,7 @@ "field_type": "text" }, { - "name": "Number of SteamCMD Retry Attempts", + "name": "[Host] Number of SteamCMD Retry Attempts", "description": "How many times SteamCMD should retry downloading a server or mod after a recoverable error. (ie. A particularly large mod download times out)", "env_variable": "STEAMCMD_ATTEMPTS", "default_value": "3", @@ -80,6 +80,16 @@ "rules": "required|integer", "field_type": "text" }, + { + "name": "[Host] Skip Game Server Install", + "description": "Skips the installation of game server files via SteamCMD during the installation script. Should only be enabled if you are trying to install the server with a Steam account that has Steam Guard enabled (not recommended).", + "env_variable": "SKIP_INSTALL", + "default_value": "0", + "user_viewable": false, + "user_editable": false, + "rules": "boolean", + "field_type": "text" + }, { "name": "Automatic Updates", "description": "Quickly checks for any server or mod updates on startup, and updates if necessary.", @@ -97,7 +107,7 @@ "default_value": "DayZ Server", "user_viewable": true, "user_editable": true, - "rules": "nullable|string", + "rules": "required|string", "field_type": "text" }, {