{ "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", "meta": { "version": "PTDL_v2", "update_url": null }, "exported_at": "2026-09-26T00:00:00+00:00", "name": "runicgateway-rust-autowipe", "author": "ci@whitlocktech.com", "description": "Egg 18 \"Rust Autowipe\" with the Runic Gateway bridge: the rust-link sidecar runs beside the game and the plugin is placed for Oxide or Carbon, both from a published, checksum-verified bundle at install time. FRAMEWORK=vanilla installs no bridge. Built from RunicGateway/Rust-Link egg/; see docs/rust-link/INSTALL.md.", "features": null, "docker_images": { "ghcr.io/pterodactyl/games:rust": "ghcr.io/pterodactyl/games:rust" }, "file_denylist": [], "startup": "$( [ -x ./rust-link/with-sidecar.sh ] && printf %s ./rust-link/with-sidecar.sh ) \"./RustDedicated -batchmode +server.port {{SERVER_PORT}} +server.queryport {{QUERY_PORT}} +server.identity \"rust\" +rcon.ip 0.0.0.0 +rcon.port {{RCON_PORT}} +rcon.web true +server.hostname \\\"{{HOSTNAME}}\\\" +server.level \\\"{{LEVEL}}\\\" +server.description \\\"{{DESCRIPTION}}\\\" +server.url \\\"{{SERVER_URL}}\\\" +server.headerimage \\\"{{SERVER_IMG}}\\\" +server.maxplayers {{MAX_PLAYERS}} +rcon.password \\\"{{RCON_PASS}}\\\" +app.port {{APP_PORT}} +server.saveinterval {{SAVEINTERVAL}} $( [ -z ${MAP_URL} ] && printf %s \"+server.worldsize \\\"{{WORLD_SIZE}}\\\" +server.seed \\\"$( if [ -f seed.txt ] && [[ ${WORLD_SEED} == \"0\" ]]; then printf %s $(cat seed.txt); else printf %s ${WORLD_SEED}; fi )\\\"\"|| printf %s \"+server.levelurl {{MAP_URL}}\" ) {{ADDITIONAL_ARGS}}\"", "config": { "files": "{}", "startup": "{\n \"done\": \"Server startup complete\"\n}", "logs": "{}", "stop": "quit" }, "scripts": { "installation": { "script": "#!/bin/bash\n# Rust + the Runic Gateway bridge — the egg's install script.\n#\n# Egg 18 \"Rust Autowipe\"'s script, unchanged down to its wipe, plus two things\n# (docs/modules/rust/PLAN.md §34.2.6):\n#\n# 1. THE WIPE GUARD. `rm -rf ${REMOVE_FILES}` runs with rust-link/ moved out of\n# the server root, so no list an operator types — wildcards included — can\n# reach the bridge's store or its token.\n# 2. THE BRIDGE. The sidecar, its launcher and the plugin, from a published\n# bundle, each checked against the bundle's sha256 before anything is\n# placed. RUNICGATEWAY_BUNDLE pins a bundle; blank takes the current one\n# (D151). This runs at install and reinstall only — never at boot, so a\n# restart cannot change the protocol under a website that has not moved.\n#\n# Server Files: /mnt/server\n# Image to install with is 'ghcr.io/ptero-eggs/installers:debian' (jq, curl,\n# sha256sum and tar; no python3).\n\n##\n#\n# Variables\n# STEAM_USER, STEAM_PASS, STEAM_AUTH - Steam user setup. If a user has 2fa enabled it will most likely fail due to timeout. Leave blank for anon install.\n# WINDOWS_INSTALL - if it's a windows server you want to install set to 1\n# SRCDS_APPID - steam app id found here - https://developer.valvesoftware.com/wiki/Dedicated_Servers_List\n# SRCDS_BETAID - beta branch of a steam app. Leave blank to install normal branch\n# SRCDS_BETAPASS - password for a beta branch should one be required during private or closed testing phases.. Leave blank for no password.\n# INSTALL_FLAGS - Any additional SteamCMD flags to pass during install.. Keep in mind that steamcmd auto update process in the docker image might overwrite or ignore these when it performs update on server boot.\n# AUTO_UPDATE - Adding this variable to the egg allows disabling or enabling automated updates on boot. Boolean value. 0 to disable and 1 to enable.\n#\n ##\n\n## just in case someone removed the defaults.\nif [[ \"${STEAM_USER}\" == \"\" ]] || [[ \"${STEAM_PASS}\" == \"\" ]]; then\n echo -e \"steam user is not set.\\n\"\n echo -e \"Using anonymous user.\\n\"\n STEAM_USER=anonymous\n STEAM_PASS=\"\"\n STEAM_AUTH=\"\"\nelse\n echo -e \"user set to ${STEAM_USER}\"\nfi\n\n## download and install steamcmd\ncd /tmp\nmkdir -p /mnt/server/steamcmd\ncurl -sSL -o steamcmd.tar.gz https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz\ntar -xzvf steamcmd.tar.gz -C /mnt/server/steamcmd\nmkdir -p /mnt/server/steamapps # Fix steamcmd disk write error when this folder is missing\ncd /mnt/server/steamcmd\n\n# SteamCMD fails otherwise for some reason, even running as root.\n# This is changed at the end of the install process anyways.\nchown -R root:root /mnt\nexport HOME=/mnt/server\n\n## install game using steamcmd\n./steamcmd.sh +force_install_dir /mnt/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ \"${WINDOWS_INSTALL}\" == \"1\" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s \"-beta ${SRCDS_BETAID}\" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s \"-betapassword ${SRCDS_BETAPASS}\" ) ${INSTALL_FLAGS} validate +quit ## other flags may be needed depending on install. looking at you cs 1.6\n\n## set up 32 bit libraries\nmkdir -p /mnt/server/.steam/sdk32\ncp -v linux32/steamclient.so ../.steam/sdk32/steamclient.so\n\n## set up 64 bit libraries\nmkdir -p /mnt/server/.steam/sdk64\ncp -v linux64/steamclient.so ../.steam/sdk64/steamclient.so\n\n## ── The wipe, with rust-link/ held outside the server root ─────────────────\n# The store keeps all-time rollups across wipes (R12) and the token is what the\n# website holds; a swept store is the failure that looks like success. Moved to\n# /tmp — outside /mnt/server, so no path in REMOVE_FILES can name it — and put\n# back straight after, before anything else can fail.\nif [ \"${REGEN_SERVER}\" == \"1\" ]; then\n cd /mnt/server/\n RG_KEEP=/tmp/runicgateway-rust-link.keep\n rm -rf \"${RG_KEEP}\"\n if [ -d rust-link ]; then mv rust-link \"${RG_KEEP}\"; fi\n rm -rf ${REMOVE_FILES}\n if [ -d \"${RG_KEEP}\" ]; then rm -rf rust-link; mv \"${RG_KEEP}\" rust-link; fi\nfi\n\nif [ $WORLD_SEED == \"0\" ]; then\n if [ ! -f /mnt/server/seed.txt ]; then\n rm -sf /mnt/server/seed.txt\n fi\n\n cat /dev/urandom | tr -dc '1-9' | fold -w 5 | head -n 1 > /mnt/server/seed.txt\nfi\n\n## ── The Runic Gateway bridge ─────────────────────────────────────────────────\n# After the wipe, so REMOVE_FILES can never delete the plugin this just placed.\nrg_install() {\n set -euo pipefail\n # Overridable only for testing against a mock: the panel passes a container\n # just the variables an egg declares, and this one is not declared.\n local api=\"${RUNICGATEWAY_BUNDLE_API:-https://gitea.whitlocktech.com/api/v1/repos/RunicGateway/installer/contents/v2/rust}\"\n local work=/tmp/runicgateway\n local plugins\n case \"${FRAMEWORK:-vanilla}\" in\n oxide) plugins=/mnt/server/oxide/plugins ;;\n carbon) plugins=/mnt/server/carbon/plugins ;;\n *)\n # Not a failure (§34.4): failing would leave the operator without a game\n # server over a bridge they may not want yet. The startup skips the\n # launcher when it is absent, so the server boots exactly as egg 18's.\n echo \"Runic Gateway: FRAMEWORK=${FRAMEWORK:-vanilla} - the bridge needs Oxide or Carbon, so nothing of it was installed.\"\n return 0\n ;;\n esac\n\n rm -rf \"${work}\"; mkdir -p \"${work}\"\n local doc=\"current.json\"\n if [ -n \"${RUNICGATEWAY_BUNDLE:-}\" ]; then doc=\"bundle-${RUNICGATEWAY_BUNDLE}.json\"; fi\n echo \"Runic Gateway: resolving bundle ${doc}\"\n # The contents API, not /raw/: raw reads are CDN-cached for hours, which would\n # hand a reinstall right after a release the bundle from before it.\n curl -fsSL \"${api}/${doc}?ref=bundles\" | jq -r '.content' | base64 -d > \"${work}/bundle.json\" \\\n || { echo \"Runic Gateway: could not fetch ${doc} - is RUNICGATEWAY_BUNDLE a published bundle?\"; return 1; }\n jq -e '.schema == 2 and .game == \"rust\"' \"${work}/bundle.json\" >/dev/null \\\n || { echo \"Runic Gateway: ${doc} is not a schema-2 Rust bundle\"; return 1; }\n\n local tag protocol\n tag=\"$(jq -r '.bundle' \"${work}/bundle.json\")\"\n protocol=\"$(jq -r '.protocol' \"${work}/bundle.json\")\"\n echo \"Runic Gateway: bundle ${tag}, protocol ${protocol}\"\n\n # Everything is fetched and checked BEFORE anything is placed: a half-updated\n # pair is a sidecar and a plugin speaking two protocols.\n fetch() { # \n local name url sha\n name=\"$(jq -r \"$1.name\" \"${work}/bundle.json\")\"\n url=\"$(jq -r \"$1.url\" \"${work}/bundle.json\")\"\n sha=\"$(jq -r \"$1.sha256\" \"${work}/bundle.json\")\"\n curl -fsSL -o \"${work}/$2\" \"${url}\" || { echo \"Runic Gateway: could not download ${name}\"; return 1; }\n echo \"${sha} ${work}/$2\" | sha256sum -c --quiet - \\\n || { echo \"Runic Gateway: ${name} does not match the bundle's sha256 - refusing it\"; return 1; }\n }\n fetch '.sidecar.assets[\"linux-x86_64\"]' rust-link-sidecar\n fetch '.sidecar.launcher' with-sidecar.sh\n fetch '.payload.asset' plugin.tar.gz\n\n tar -xzf \"${work}/plugin.tar.gz\" -C \"${work}\"\n local manifest=\"${work}/runicgateway-rust-plugin/manifest.json\"\n [ -f \"${manifest}\" ] || { echo \"Runic Gateway: the plugin tarball has no manifest.json\"; return 1; }\n [ \"$(jq -r '.protocol' \"${manifest}\")\" = \"${protocol}\" ] \\\n || { echo \"Runic Gateway: the plugin declares protocol $(jq -r '.protocol' \"${manifest}\"), the bundle ${protocol} - refusing the pair\"; return 1; }\n\n mkdir -p /mnt/server/rust-link \"${plugins}\"\n install -m 755 \"${work}/rust-link-sidecar\" /mnt/server/rust-link/rust-link-sidecar\n install -m 755 \"${work}/with-sidecar.sh\" /mnt/server/rust-link/with-sidecar.sh\n install -m 644 \"${work}/runicgateway-rust-plugin/RunicGateway.cs\" \"${plugins}/RunicGateway.cs\"\n # What is installed, readable from the panel's file manager.\n jq --arg framework \"${FRAMEWORK}\" --arg installed \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\" \\\n '{ bundle, protocol, framework: $framework, installed: $installed,\n sidecar: { tag: .sidecar.tag }, plugin: { tag: .payload.tag, commit: .payload.commit } }' \\\n \"${work}/bundle.json\" > /mnt/server/rust-link/bundle.json\n echo \"Runic Gateway: installed sidecar $(jq -r '.sidecar.tag' \"${work}/bundle.json\") and plugin $(jq -r '.payload.tag' \"${work}/bundle.json\") (${FRAMEWORK})\"\n echo \"Runic Gateway: add this server under Admin -> Rust -> Servers; the console prints its URL and, on first boot, its token.\"\n}\n# In a subshell so `set -e` inside cannot leak into the rest of this script, and\n# so a failure fails the install with its reason rather than leaving a half pair.\n# NOT `( rg_install ) || …`: a subshell in a condition runs with errexit OFF, and\n# an unchecked failed step inside it would sail on to \"installed\".\n( rg_install )\nif [ $? -ne 0 ]; then\n echo \"Runic Gateway: the bridge was NOT installed (see above).\"\n exit 1\nfi\n\n## install end\necho \"-----------------------------------------\"\necho \"Installation completed...\"\necho \"-----------------------------------------\"\n", "container": "ghcr.io/ptero-eggs/installers:debian", "entrypoint": "bash" } }, "variables": [ { "name": "SRCDS_APPID", "description": "", "env_variable": "SRCDS_APPID", "default_value": "258550", "user_viewable": false, "user_editable": false, "rules": "required|string|max:20", "field_type": "text" }, { "name": "Max Players", "description": "The maximum amount of players allowed in the server at once.", "env_variable": "MAX_PLAYERS", "default_value": "40", "user_viewable": true, "user_editable": true, "rules": "required|integer", "field_type": "text" }, { "name": "Server Name", "description": "The name of your server in the public server list.", "env_variable": "HOSTNAME", "default_value": "A Rust Server", "user_viewable": true, "user_editable": true, "rules": "required|string|max:40", "field_type": "text" }, { "name": "Level", "description": "The world file for Rust to use.", "env_variable": "LEVEL", "default_value": "Procedural Map", "user_viewable": true, "user_editable": true, "rules": "required|string|max:20", "field_type": "text" }, { "name": "Description", "description": "The description under your server title. Commonly used for rules & info. Use \\n for newlines.", "env_variable": "DESCRIPTION", "default_value": "Powered by Pterodactyl", "user_viewable": true, "user_editable": true, "rules": "required|string", "field_type": "text" }, { "name": "URL", "description": "The URL for your server. This is what comes up when clicking the \"Visit Website\" button.", "env_variable": "SERVER_URL", "default_value": "http://pterodactyl.io", "user_viewable": true, "user_editable": true, "rules": "nullable|url", "field_type": "text" }, { "name": "World Size", "description": "The world size for a procedural map.", "env_variable": "WORLD_SIZE", "default_value": "3000", "user_viewable": true, "user_editable": true, "rules": "required|integer", "field_type": "text" }, { "name": "World Seed", "description": "The seed for a procedural map.", "env_variable": "WORLD_SEED", "default_value": "0", "user_viewable": true, "user_editable": true, "rules": "nullable|string", "field_type": "text" }, { "name": "Server Image", "description": "The header image for the top of your server listing.", "env_variable": "SERVER_IMG", "default_value": "", "user_viewable": true, "user_editable": true, "rules": "nullable|url", "field_type": "text" }, { "name": "RCON Port", "description": "Port for RCON connections.", "env_variable": "RCON_PORT", "default_value": "28016", "user_viewable": true, "user_editable": false, "rules": "required|integer", "field_type": "text" }, { "name": "RCON Password", "description": "RCON access password.", "env_variable": "RCON_PASS", "default_value": "CHANGEME", "user_viewable": true, "user_editable": true, "rules": "required|regex:/^[\\w.-]*$/|max:64", "field_type": "text" }, { "name": "Save Interval", "description": "Sets the server’s auto-save interval in seconds.", "env_variable": "SAVEINTERVAL", "default_value": "60", "user_viewable": true, "user_editable": true, "rules": "required|integer", "field_type": "text" }, { "name": "Additional Arguments", "description": "Add additional startup parameters to the server.", "env_variable": "ADDITIONAL_ARGS", "default_value": "", "user_viewable": true, "user_editable": true, "rules": "nullable|string", "field_type": "text" }, { "name": "Regen Server", "description": "If the server should have its files removed and regenerate the server seed on reinstall.", "env_variable": "REGEN_SERVER", "default_value": "0", "user_viewable": true, "user_editable": true, "rules": "required|boolean", "field_type": "text" }, { "name": "Files to remove", "description": "A space-separated list of files to remove when regenerating the server on reinstall.", "env_variable": "REMOVE_FILES", "default_value": "server/rust/player.deaths.*.db server/rust/player.identities.*.db server/rust/player.states.*.db server/rust/player.tokens.db proceduralmap.*.*.*.map server/rust/proceduralmap.*.*.*.sav oxide/data/Kits_Data.json oxide/data/NTeleportationHome.json oxide/data/ServerRewards/player_data.json oxide/data/PTTracker/playtime_data.json", "user_viewable": true, "user_editable": true, "rules": "required|string", "field_type": "text" }, { "name": "QUERY PORT", "description": "Port for QUERY connections.", "env_variable": "QUERY_PORT", "default_value": "28017", "user_viewable": true, "user_editable": true, "rules": "required|integer", "field_type": "text" }, { "name": "APP PORT", "description": "Port for Rust+ applications. -1 to disable.", "env_variable": "APP_PORT", "default_value": "28082", "user_viewable": true, "user_editable": true, "rules": "required|integer", "field_type": "text" }, { "name": "Custom Map URL", "description": "Overwrites the map with the one from the direct download URL. Invalid URLs will cause the server to crash.", "env_variable": "MAP_URL", "default_value": "", "user_viewable": true, "user_editable": true, "rules": "nullable|url", "field_type": "text" }, { "name": "Modding Framework", "description": "The modding framework to be used: carbon, oxide, vanilla.\nDefaults to \"vanilla\" for a non-modded server installation.", "env_variable": "FRAMEWORK", "default_value": "vanilla", "user_viewable": true, "user_editable": true, "rules": "required|string|in:vanilla,carbon,oxide", "field_type": "text" }, { "name": "Runic Gateway: server id", "description": "This server's id on the website: lowercase letters, digits and '-', up to 64. It is read ONCE, when the bridge plugin writes its first config; after that the config file holds it and the website locks it, so changing this later changes nothing. Type the same id at Admin -> Rust -> Servers.", "env_variable": "RUSTLINK_SERVER_ID", "default_value": "main", "user_viewable": true, "user_editable": true, "rules": "required|string|regex:/^[a-z0-9][a-z0-9-]{0,63}$/", "field_type": "text" }, { "name": "Runic Gateway: sidecar port", "description": "The port the website reaches this server's bridge on. It MUST be one of this server's allocations: the panel does not tell the server which ports it holds, and a port that is not allocated binds but is never reachable. The console prints the URL on every boot.", "env_variable": "RUSTLINK_WEB_PORT", "default_value": "", "user_viewable": true, "user_editable": true, "rules": "required|integer|between:1024,65535", "field_type": "text" }, { "name": "Runic Gateway: sidecar token", "description": "Leave blank: the bridge generates a token on its first boot, keeps it in rust-link/sidecar.toml and prints it to the console once. Set it only to choose your own. Anyone who can see this server's startup variables in the panel can read a token typed here.", "env_variable": "RUSTLINK_WEB_TOKEN", "default_value": "", "user_viewable": true, "user_editable": true, "rules": "nullable|string|max:128", "field_type": "text" }, { "name": "Runic Gateway: bundle", "description": "Pin the bridge to a published bundle (e.g. 2026.09.27). Blank takes the current one. Either way it is fetched only when the server is (re)installed, never on a restart, so a restart cannot change the protocol under your website.", "env_variable": "RUNICGATEWAY_BUNDLE", "default_value": "", "user_viewable": true, "user_editable": true, "rules": "nullable|string|regex:/^\\d{4}\\.\\d{2}\\.\\d{2}(\\.\\d+)?$/", "field_type": "text" }, { "name": "Runic Gateway: history days", "description": "How many days of raw events the bridge keeps before rolling them up. Blank keeps its default.", "env_variable": "RUSTLINK_RETAIN_DAYS", "default_value": "", "user_viewable": true, "user_editable": true, "rules": "nullable|integer|min:0", "field_type": "text" } ] }