{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2025-09-16T16:52:54+00:00",
"name": "tshock",
"author": "[email protected]",
"description": "The t-shock modded terraria server.\r\n\r\nhttps:\/\/tshock.co\/",
"tags": [],
"features": [],
"docker_images": {
"Dotnet 6": "ghcr.io\/parkervcp\/yolks:dotnet_6",
"Dotnet 9": "ghcr.io\/parkervcp\/yolks:dotnet_9"
},
"file_denylist": [],
"startup": ".\/TShock.Server -ip 0.0.0.0 -port {{SERVER_PORT}} -maxplayers {{MAX_PLAYERS}} -world {{WORLD_NAME}}.wld -autocreate {{WORLD_SIZE}}",
"config": {
"files": "{}",
"startup": "{\n \"done\": \"Type 'help' for a list of commands\"\n}",
"logs": "{}",
"stop": "exit"
},
"scripts": {
"installation": {
"script": "#!/bin/bash\r\n# TShock Installation Script\r\n\r\n# Get release info and determine architecture\r\necho \"Fetching release information from GitHub...\"\r\nLATEST_JSON=$(curl --silent \"https://api.github.com/repos/Pryaxis/TShock/releases/latest\")\r\nRELEASES=$(curl --silent \"https://api.github.com/repos/Pryaxis/TShock/releases\")\r\nMATCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"linux-x64\" || echo \"linux-arm64\")\r\n\r\necho \"System Architecture detected: ${MATCH}\"\r\necho \"Selected version choice: ${TSHOCK_VERSION_SELECTION}\"\r\n\r\n# Determine download link based on user selection\r\ncase \"${TSHOCK_VERSION_SELECTION}\" in\r\n prerelease)\r\n echo \"Finding latest pre-release version...\"\r\n PRERELEASE_JSON=$(echo $RELEASES | jq -r '[.[] | select(.prerelease==true)][0]')\r\n DOWNLOAD_LINK=$(echo $PRERELEASE_JSON | jq '.assets | .[] | .browser_download_url' | grep -i ${MATCH} | head -1)\r\n ;;\r\n custom)\r\n if [ -z \"${CUSTOM_TSHOCK_TAG}\" ]; then\r\n echo \"ERROR: 'Custom Tag' was selected but no tag was provided.\"\r\n exit 1\r\n fi\r\n echo \"Finding custom version tag: ${CUSTOM_TSHOCK_TAG}...\"\r\n DOWNLOAD_LINK=$(echo $RELEASES | jq -r --arg VERSION \"${CUSTOM_TSHOCK_TAG}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH} | head -1)\r\n ;;\r\n url)\r\n if [ -z \"${CUSTOM_DOWNLOAD_URL}\" ]; then\r\n echo \"ERROR: 'Custom URL' was selected but no URL was provided.\"\r\n exit 1\r\n fi\r\n echo \"Using custom download URL...\"\r\n DOWNLOAD_LINK=\"${CUSTOM_DOWNLOAD_URL}\"\r\n ;;\r\n *) # Default to latest stable\r\n echo \"Finding latest stable version...\"\r\n DOWNLOAD_LINK=$(echo $LATEST_JSON | jq '.assets | .[] | .browser_download_url' | grep -i ${MATCH} | head -1)\r\n ;;\r\nesac\r\n\r\nif [ -z \"$DOWNLOAD_LINK\" ]; then\r\n echo \"ERROR: Could not find a download link for the specified version. Please check the version/tag/URL and try again.\"\r\n exit 1\r\nfi\r\n\r\n# Setup server directory\r\nmkdir -p /mnt/server\r\ncd /mnt/server\r\n\r\n# Download and extract release\r\necho \"Downloading from: ${DOWNLOAD_LINK}\"\r\ncurl -sSL -o TShock.zip \"${DOWNLOAD_LINK}\"\r\n\r\necho \"Extracting files...\"\r\nunzip -o TShock.zip\r\ntar xvf TShock-*.tar\r\n\r\n# Cleanup\r\nrm TShock.zip TShock-*.tar\r\n\r\n# Make executable\r\nchmod +x TShock.Server\r\n\r\necho \"Install complete.\"",
"container": "ghcr.io\/parkervcp\/installers:debian",
"entrypoint": "\/bin\/bash"
}
},
"variables": [
{
"name": "Max Players",
"description": "The maximum number of players a server will hold.",
"env_variable": "MAX_PLAYERS",
"default_value": "8",
"user_viewable": true,
"user_editable": false,
"rules": "required|numeric|digits_between:1,3",
"field_type": "text"
},
{
"name": "TShock Version Selection",
"description": "Choose which version of TShock to install. 'Latest Release' is the most recent stable version. 'Latest Pre-Release' is the newest development build. 'Custom Tag' lets you specify an exact version tag from GitHub. 'Custom URL' allows you to provide a direct download link.",
"env_variable": "TSHOCK_VERSION_SELECTION",
"default_value": "latest",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:latest,prerelease,custom,url",
"field_type": "select",
"options": [
{
"name": "Latest Release",
"value": "latest"
},
{
"name": "Latest Pre-Release",
"value": "prerelease"
},
{
"name": "Custom Tag",
"value": "custom"
},
{
"name": "Custom URL",
"value": "url"
}
]
},
{
"name": "Custom Version Tag",
"description": "Specify the exact TShock version tag to install (e.g., v6.0.0-pre1). Only used if 'Custom Tag' is selected above.",
"env_variable": "CUSTOM_TSHOCK_TAG",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|max:30",
"field_type": "text"
},
{
"name": "Custom Download URL",
"description": "Provide a direct download URL for a TShock release (e.g., from a GitHub Actions artifact). Only used if 'Custom URL' is selected above.",
"env_variable": "CUSTOM_DOWNLOAD_URL",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string",
"field_type": "text"
},
{
"name": "World Name",
"description": "The name for the world file.",
"env_variable": "WORLD_NAME",
"default_value": "world",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:20",
"field_type": "text"
},
{
"name": "World Size",
"description": "Defines the worlds size. 3 sizes 1 (small), 2 (medium), 3 (large).",
"env_variable": "WORLD_SIZE",
"default_value": "1",
"user_viewable": true,
"user_editable": false,
"rules": "required|string|alpha_dash|max:20",
"field_type": "text"
}
]
}