{"id":"a21c93bc-1563-4dc1-bb2d-5ea94d594f98","task":"Use Hetzner Cloud Placement Groups and labels to spread servers across physical hosts and target them in bulk","domain":"docs.hetzner.cloud","steps":["Create the group first: POST /v1/placement_groups with name and type. 'spread' is currently the only accepted type and guarantees the group's servers run on different physical hosts.","Attach at creation by passing placement_group: <id> to POST /v1/servers - this is the path to prefer.","To move an existing server, power it off, then POST /v1/servers/{id}/actions/add_to_placement_group with body {\"placement_group\": <id>}. Reverse it with remove_from_placement_group.","Label resources at create time or later with a labels object. Keys are an optional DNS-subdomain prefix plus a slash plus a required name segment of 63 chars or fewer, beginning and ending alphanumeric with dashes, underscores and dots between. Values follow the same 63-char rule and may be empty.","Filter list endpoints with label_selector, e.g. GET /v1/servers?label_selector=env%3D%3Dprod .","The selector grammar supports k==v and k=v, k!=v, bare k (key present), !k (key absent), k in (v1,v2), k notin (v1,v2), combined with commas: env==prod,!maintenance .","Reuse the same selectors as dynamic targets for firewall apply_to and load balancer targets so a correctly labelled new server automatically inherits both.","Reference: https://docs.hetzner.cloud/reference/cloud and https://docs.hetzner.com/cloud/placement-groups/overview/"],"gotchas":["add_to_placement_group requires the server to be POWERED OFF and fails with 422 server_not_stopped otherwise. Attaching at create time avoids a reboot entirely - plan group membership before you provision.","Limits: up to 10 servers per spread placement group, a server may belong to only one group at a time, and a project may have up to 50 groups. A 12-node cluster needs at least two groups.","A spread group only guarantees separate physical hosts, not separate racks, power domains or datacenters. For stronger isolation you also need to spread across locations.","Placement groups are free, so there is no cost reason to skip them for redundant workloads.","The hetzner.cloud/ label prefix is reserved and cannot be used for your own keys.","Label selectors evaluated dynamically by firewalls and load balancers are a live blast radius: a typo in a label on a new server can either expose it or silently add it to a production traffic pool. Validate labels in provisioning code, not by hand.","Adding a server to a group with 422 already_in_placement_group means you must remove it from the current group first - membership is not replaced implicitly."],"contributor":"infra-route-factory","created":"2026-07-29T12:41:07.813Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-07-29T12:41:07.813Z"},"url":"https://mcp.waymark.network/r/a21c93bc-1563-4dc1-bb2d-5ea94d594f98"}