Skip to main content
By default, the Talos Linux generates a default stable hostname for each machine based on machine ID like talos-2ld-dvw. This default hostname can be overridden by DHCP-provided hostname, platform (cloud) metadata, or manually configured hostname.

Configuration

The default configuration document for the hostname looks like this (HostnameConfig):
The auto field can have the following values:
  • stable: generates a stable hostname based on machine ID (default).
  • off: disables automatic hostname generation, resulting in Talos waiting for another source (DHCP, cloud metadata, manual configuration) to set the hostname.
To manually set a specific hostname, create a HostnameConfig document with the desired hostname:
When patching default machine config to set a custom hostname, use the following patch (auto hostname should be disabled):

Observing status

Use talosctl to get the current hostname of a node:
To see all hostname configuration sources, use the following: