{
  "manifest_version": "1.0.0",
  "template": {
    "id": "c65ede5c-6b7c-454d-9006-aac7e9378677",
    "slug": "minecraft-java-server",
    "name": "Minecraft Server | Paper Java Edition with Persistent World",
    "description": "Paper Minecraft Java server with a persistent world and safe redeploys",
    "url": "https://railway.com/deploy/minecraft-java-server",
    "upstream": {
      "image": "itzg/minecraft-server:2026.10.0-java25"
    }
  },
  "services": [
    {
      "name": "Minecraft",
      "source": {
        "image": "itzg/minecraft-server:2026.10.0-java25"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "tcp_ports": [
        25565
      ],
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "TZ",
      "service": "Minecraft",
      "description": "Time zone for logs and scheduled tasks, e.g. Europe/Berlin",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "EULA",
      "service": "Minecraft",
      "description": "Minecraft End User License Agreement. The server will not start without it; deploying this template means you accept https://aka.ms/MinecraftEULA",
      "secret": false,
      "strategy": "default",
      "default": "TRUE"
    },
    {
      "key": "MOTD",
      "service": "Minecraft",
      "description": "Message shown under the server name in the multiplayer list",
      "secret": false,
      "strategy": "default",
      "default": "A Minecraft server on Railway"
    },
    {
      "key": "TYPE",
      "service": "Minecraft",
      "description": "Server software. PAPER is a high-performance, plugin-compatible fork of vanilla. Other values: VANILLA, FABRIC, FORGE, NEOFORGE, PURPUR — see the itzg/minecraft-server docs",
      "secret": false,
      "strategy": "default",
      "default": "PAPER"
    },
    {
      "key": "MEMORY",
      "service": "Minecraft",
      "description": "Java heap size. The whole container uses roughly this plus ~0.7 GB and is billed for it all the time. 2G suits up to ~10 players; use 4G for more players or heavy plugins",
      "secret": false,
      "strategy": "default",
      "default": "2G"
    },
    {
      "key": "VERSION",
      "service": "Minecraft",
      "description": "Minecraft version, pinned so a redeploy never upgrades your world by surprise. Worlds can be upgraded but never downgraded — back up /data before raising it",
      "secret": false,
      "strategy": "default",
      "default": "26.3"
    },
    {
      "key": "DIFFICULTY",
      "service": "Minecraft",
      "description": "peaceful, easy, normal or hard",
      "secret": false,
      "strategy": "default",
      "default": "normal"
    },
    {
      "key": "MAX_PLAYERS",
      "service": "Minecraft",
      "description": "Maximum number of players online at once",
      "secret": false,
      "strategy": "default",
      "default": "20"
    },
    {
      "key": "ONLINE_MODE",
      "service": "Minecraft",
      "description": "Verify every player against Mojang's servers. Keep TRUE: with FALSE anyone can join under any name, including an operator's",
      "secret": false,
      "strategy": "default",
      "default": "TRUE"
    },
    {
      "key": "STOP_DURATION",
      "service": "Minecraft",
      "description": "Seconds the server is given to save the world and exit on shutdown",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "CONNECT_ADDRESS",
      "service": "Minecraft",
      "description": "The address players enter in Minecraft (Multiplayer → Add Server). Read-only: assigned by Railway's TCP proxy",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "USE_AIKAR_FLAGS",
      "service": "Minecraft",
      "description": "Aikar's garbage-collector tuning, recommended by Paper for smooth tick times",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ENABLE_ROLLING_LOGS",
      "service": "Minecraft",
      "description": "Rotate and compress logs so they do not fill the volume",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Minecraft",
      "description": "How long Railway waits between SIGTERM and killing the container. Railway's default is 0, which would cut the world save short on every redeploy; keep it above STOP_DURATION",
      "secret": false,
      "strategy": "default",
      "default": "90"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "minecraft-java-server"
      }
    },
    "cli": "railway deploy --template minecraft-java-server",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "c65ede5c-6b7c-454d-9006-aac7e9378677",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "bc2791a3-7236-48b2-a588-1977eb9d965f": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/minecraft.svg",
                  "name": "Minecraft",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 5
                  },
                  "source": {
                    "image": "itzg/minecraft-server:2026.10.0-java25"
                  },
                  "variables": {
                    "TZ": {
                      "isOptional": false,
                      "description": "Time zone for logs and scheduled tasks, e.g. Europe/Berlin",
                      "defaultValue": "UTC"
                    },
                    "OPS": {
                      "isOptional": true,
                      "description": "Comma-separated Minecraft usernames to make server operators (admins) on start, e.g. your own name",
                      "defaultValue": ""
                    },
                    "EULA": {
                      "isOptional": false,
                      "description": "Minecraft End User License Agreement. The server will not start without it; deploying this template means you accept https://aka.ms/MinecraftEULA",
                      "defaultValue": "TRUE"
                    },
                    "MOTD": {
                      "isOptional": false,
                      "description": "Message shown under the server name in the multiplayer list",
                      "defaultValue": "A Minecraft server on Railway"
                    },
                    "TYPE": {
                      "isOptional": false,
                      "description": "Server software. PAPER is a high-performance, plugin-compatible fork of vanilla. Other values: VANILLA, FABRIC, FORGE, NEOFORGE, PURPUR — see the itzg/minecraft-server docs",
                      "defaultValue": "PAPER"
                    },
                    "MEMORY": {
                      "isOptional": false,
                      "description": "Java heap size. The whole container uses roughly this plus ~0.7 GB and is billed for it all the time. 2G suits up to ~10 players; use 4G for more players or heavy plugins",
                      "defaultValue": "2G"
                    },
                    "VERSION": {
                      "isOptional": false,
                      "description": "Minecraft version, pinned so a redeploy never upgrades your world by surprise. Worlds can be upgraded but never downgraded — back up /data before raising it",
                      "defaultValue": "26.3"
                    },
                    "WHITELIST": {
                      "isOptional": true,
                      "description": "Comma-separated usernames allowed to join. Setting it turns the whitelist on; leave empty for an open server",
                      "defaultValue": ""
                    },
                    "DIFFICULTY": {
                      "isOptional": false,
                      "description": "peaceful, easy, normal or hard",
                      "defaultValue": "normal"
                    },
                    "MAX_PLAYERS": {
                      "isOptional": false,
                      "description": "Maximum number of players online at once",
                      "defaultValue": "20"
                    },
                    "ONLINE_MODE": {
                      "isOptional": false,
                      "description": "Verify every player against Mojang's servers. Keep TRUE: with FALSE anyone can join under any name, including an operator's",
                      "defaultValue": "TRUE"
                    },
                    "STOP_DURATION": {
                      "isOptional": false,
                      "description": "Seconds the server is given to save the world and exit on shutdown",
                      "defaultValue": "60"
                    },
                    "CONNECT_ADDRESS": {
                      "isOptional": false,
                      "description": "The address players enter in Minecraft (Multiplayer → Add Server). Read-only: assigned by Railway's TCP proxy",
                      "defaultValue": "${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    },
                    "USE_AIKAR_FLAGS": {
                      "isOptional": false,
                      "description": "Aikar's garbage-collector tuning, recommended by Paper for smooth tick times",
                      "defaultValue": "true"
                    },
                    "ENABLE_ROLLING_LOGS": {
                      "isOptional": false,
                      "description": "Rotate and compress logs so they do not fill the volume",
                      "defaultValue": "true"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "How long Railway waits between SIGTERM and killing the container. Railway's default is 0, which would cut the world save short on every redeploy; keep it above STOP_DURATION",
                      "defaultValue": "90"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "25565": {}
                    }
                  },
                  "volumeMounts": {
                    "bc2791a3-7236-48b2-a588-1977eb9d965f": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-10-19T22:14:48.327Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-19T20:11:50.558Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_8f5b0964d22f42eca531",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 28,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "Minecraft"
  }
}
