Netplan: Disable Cloud-init configuration

Published at 20 Feb 2025

Cloud-init provides our device the network configuration at boot.

If we want to configure manually the network, we should disable the network configuration capabilites of Cloud-init so our configuration persist between reboots.

We need co create a configuration file at /etc/cloud/cloud.cfg.d with the instruction to disable it.

You can use the following command, or write it manually instead.

bash -c 'echo "network: {config: disabled}" > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg'