📖 ~1 min read
Table of contents
Symptom & Impact
Manual network changes disappear after reboot because cloud-init regenerates config unexpectedly.
Environment & Reproduction
Ubuntu 20.04 cloud instance with cloud-init enabled and netplan files under ‘/etc/netplan’.
Root Cause Analysis
cloud-init datasource policy rewrites network YAML during boot, overriding local edits.
Quick Triage
Check cloud-init status, inspect ‘/etc/cloud/cloud.cfg.d’, and identify generated netplan file ownership.
Step-by-Step Diagnosis
Review cloud-init logs, datasource metadata, and boot sequence to locate config regeneration point.

Solution – Primary Fix
Disable cloud-init network config for static hosts and maintain authoritative netplan file manually.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Define desired network in cloud-init user-data so regeneration remains intentional and versioned.
Verification & Acceptance Criteria
Network settings persist across multiple reboots and instance metadata refresh events.
Rollback Plan
Re-enable previous cloud-init network behavior and restore generated file baseline if required.
Prevention & Hardening
Document ownership of network config and avoid direct edits to auto-generated cloud-init files.
Related Errors & Cross-Refs
netplan config replaced on boot, lost static IP, and cloud-init stage networking warnings.
Related tutorial: View the step-by-step tutorial for Ubuntu 20.04 LTS.
View all Ubuntu 20.04 LTS tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
cloud-init network configuration docs, Ubuntu cloud images guide, and netplan integration references.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.