{
  "manifest_version": "1.0.0",
  "template": {
    "id": "457125bc-4e8a-45c9-a3ed-4851313779fa",
    "slug": "terraria-dedicated-server",
    "name": "Terraria server",
    "description": "Self-host a persistent terraria TShock server using Docker Image",
    "url": "https://railway.com/deploy/terraria-dedicated-server",
    "upstream": {
      "repo_url": "https://github.com/XavTo/Terraria-Selfhost"
    }
  },
  "services": [
    {
      "name": "Terraria-Selfhost",
      "source": {
        "repo": "https://github.com/XavTo/Terraria-Selfhost"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "tcp_ports": [
        7777
      ],
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "MAXPLAYERS",
      "service": "Terraria-Selfhost",
      "description": "Maximum number of players allowed on the server.",
      "secret": false,
      "strategy": "default",
      "default": "8"
    },
    {
      "key": "WORLD_SIZE",
      "service": "Terraria-Selfhost",
      "description": "World size to use when the world does not exist yet. 1 = Small, 2 = Medium, 3 = Large\"",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "WORLD_FILENAME",
      "service": "Terraria-Selfhost",
      "description": "World file name.",
      "secret": false,
      "strategy": "default",
      "default": "world.wld"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "terraria-dedicated-server"
      }
    },
    "cli": "railway deploy --template terraria-dedicated-server",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "457125bc-4e8a-45c9-a3ed-4851313779fa",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "6b7bf197-59e2-4099-8a3f-5728f4d1e00d": {
                  "icon": "https://terraria.wiki.gg/images/App_icon_1.3_Update.png",
                  "name": "Terraria-Selfhost",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/XavTo/Terraria-Selfhost",
                    "rootDirectory": null
                  },
                  "variables": {
                    "MOTD": {
                      "isOptional": true,
                      "description": "Message of the Day shown to players on join.",
                      "defaultValue": ""
                    },
                    "PASSWORD": {
                      "isOptional": true,
                      "description": "Leave empty to allow public access.",
                      "defaultValue": ""
                    },
                    "MAXPLAYERS": {
                      "isOptional": false,
                      "description": "Maximum number of players allowed on the server.",
                      "defaultValue": "8"
                    },
                    "WORLD_SIZE": {
                      "isOptional": false,
                      "description": "World size to use when the world does not exist yet. 1 = Small, 2 = Medium, 3 = Large\"",
                      "defaultValue": "2"
                    },
                    "WORLD_FILENAME": {
                      "isOptional": false,
                      "description": "World file name.",
                      "defaultValue": "world.wld"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "7777": {}
                    }
                  },
                  "volumeMounts": {
                    "6b7bf197-59e2-4099-8a3f-5728f4d1e00d": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T22:04:48.900Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_5b66d5fa8881411b873d",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 100,
    "typical_build_seconds": 31,
    "typical_start_seconds": 10,
    "slowest_service": "Terraria-Selfhost"
  }
}
