← Knowledge Base
Ubuntu ServerReference note1 min read · updated 2026-11-27

cloud-init basics on cloud VMs

What cloud-init does at first boot, how to read its status and logs, and how to re-run or disable it.

cloud-initcloudubuntu

Cloud images run cloud-init at first boot to create the user, install your SSH public key, set the host name and sometimes the network.

cloud-init status --long
sudo cat /var/log/cloud-init-output.log
sudo cat /var/log/cloud-init.log | less
ls /var/lib/cloud/instances/
sudo cloud-init clean --logs      # forget the first-boot state (it will run again on next boot!)

To stop it from managing a setting (for example the network or host name), add a file under /etc/cloud/cloud.cfg.d/, such as 99-disable-network-config.cfg containing network: {config: disabled}. To disable it completely: sudo touch /etc/cloud/cloud-init.disabled. Be careful: cloud-init clean on a running server can reset keys and users on the next boot.