Skip to content

Costs per customer with labels

If you run servers for several customers, teams or environments, a label on each resource lets Vaicoa split the bill along it. The labels live in Hetzner, so the split works in free mode too, and Vaicoa only reads them.

  1. In the Hetzner Console, open a resource, go to its labels and add a key and value, for example customer=acme. With the hcloud CLI: hcloud server add-label web-1 customer=acme.
  2. Use the same key on every resource that should be in the split, including volumes, load balancers, floating IPs and primary IPs, which have their own prices.
  3. Pull to refresh in the app. A connected project picks up new labels at its next sync, within five minutes.

cost-center is the usual key, and the label picker lists it first when you use it. Any key works.

  1. Open the Costs tab.
  2. Under By label, choose the key, for example customer.
  3. Each value gets a line with its amount and the number of resources. Resources without the key are under Unlabeled.

In free mode, the split is the monthly estimate at Hetzner’s list prices. On Pro and Team, it is the billed costs of the last 30 days, and each day counts under the labels the resource had that day. A label you change today applies from today; earlier days keep the old split. More about the Costs tab: Costs.

Dedicated servers and check targets have no Hetzner labels, and By label splits only Hetzner Cloud resources, so they are not in it. Give them their price in the portal, as an admin: Monitored Servers → Set price for a dedicated server, Uptime Checks → Add price for a check target. Their prices then appear on the Costs tab as ”… stated monthly prices, full month”, and you add them to a customer’s share yourself. The Labels link on the Uptime Checks page stores labels for a check target, but the Costs tab does not group by them yet.

Hetzner’s price list only has current prices. A server created before a price change keeps its old rate as long as it is not rescaled, and nothing in the API says so, so Vaicoa would show the new rate. When you know the real price, set two labels on the resource:

LabelValue
vaicoa.com/monthly-net-centsthe monthly price without VAT, in whole cents: 449 for 4.49 a month. For a volume, the price per GB
vaicoa.com/price-currencyEUR or USD, the currency your Hetzner account is billed in
Terminal window
hcloud server add-label legacy-1 \
vaicoa.com/monthly-net-cents=449 vaicoa.com/price-currency=EUR

Add --overwrite to change a label that is already set. The command-line tool hcloud-pricetag sets these labels for you; its label namespace is configurable and defaults to vaicoa.com.

  • Both labels are needed, and the currency must match the one Hetzner quotes for the project. Otherwise both are ignored and the list price applies. That also catches a server that moved to an account billed in the other currency.
  • The amount is a plain whole number, with no decimal point, sign or spaces. A value Vaicoa cannot read is ignored, never counted as zero. An explicit 0 is used as zero.
  • It works for servers, volumes, load balancers, floating IPs and primary IPs. Networks and firewalls are free at Hetzner and stay out of the total.
  • Both the estimate on your device and the billed costs use the price. Where the resource is listed under Top resources, it carries a custom price badge. Days already recorded keep the price they were recorded with, so the daily chart shows a step on the day the labels land.
  • A third key, vaicoa.com/hourly-net-millicents, is reserved for an hourly price in thousandths of a cent; the costs use only the monthly price.
  • The price keys are never offered under By label.

Anyone who can change the project in Hetzner can change these labels. That is why Vaicoa marks the price as custom price instead of presenting it as Hetzner’s.