Cloud Platform
Initialization
Last updated 2026-11-05
Initialization
Initialization tells the guest its hostname, which SSH keys to accept and, for Windows, how to set the administrator password. The guest reads it from the metadata service the first time it boots.
What you can set
| Field | Meaning |
|---|---|
| Hostname | The name the guest gives itself. |
| SSH keys | A key of the project by name, or a literal public key. |
| Password | Delivered to the guest once. It is write-only: no API ever returns it. |
No free-text user data The platform decides what a guest is told. There is deliberately no field for arbitrary user data or scripts.
Keys are copied
An instance keeps its own copy of the keys it was made with. Deleting a key from the project does not remove it from instances that already have it.
Run it again
Rerun initialization gives the guest a new instance id. cloud-init and cloudbase-init treat that as a first boot at the next restart and apply hostname and keys again. Use it after you changed the initialization of a running instance.
Windows administrator password
A Windows guest generates its own administrator password and posts it, already encrypted with the first SSH key of the instance. The platform never sees it in clear.
- Get the password returns the encrypted copy. Only the holder of the matching private key can decrypt it. The key has to be an RSA key.
- Clear the password forgets the encrypted copy so the guest may generate a new one at its next first boot.
# the value returned by the API is base64 of the RSA (PKCS#1 v1.5) encrypted password
echo "$ENCRYPTED" | base64 -d | openssl pkeyutl -decrypt -inkey ~/.ssh/id_rsa -pkeyopt rsa_padding_mode:pkcs1The metadata service
Inside the guest the metadata service answers at 169.254.169.254 (IPv4) and fe80::254 (IPv6). It provides the initialization data and the network configuration.