π ~1 min read
Table of contents
Symptom & Impact
Manual netplan changes disappear after reboot and network returns to undesired DHCP settings. Static routes and DNS overrides fail, breaking production traffic policies.
Environment & Reproduction
Ubuntu 22.04 LTS cloud image with cloud-init enabled. Reproduce by editing /etc/netplan YAML directly and rebooting without disabling cloud-init network rendering.
Root Cause Analysis
cloud-init owns initial networking on many cloud images and regenerates netplan files from datasource metadata. Manual file edits are overwritten during boot stages.
Quick Triage
Identify whether netplan file is cloud-generated and inspect cloud-init status before applying persistent manual network changes.
Step-by-Step Diagnosis
Review cloud-init logs and network config sources to confirm overwrite mechanism and determine whether datasource metadata is reapplying unwanted values.

Solution – Primary Fix
Disable cloud-init network management, create admin-owned netplan file, and apply configuration. Preserve cloud-init for other modules if required.
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
Manage networking through cloud-init datasource metadata instead of disabling module, or bake desired static netplan into custom image templates.
Verification & Acceptance Criteria
Reboot retains intended netplan settings, interface addresses remain stable, and cloud-init no longer rewrites network files unexpectedly.
Rollback Plan
Remove disable config, restore original cloud-init netplan file from backup, and reboot to return datasource-managed networking behavior.
Prevention & Hardening
Define ownership model for networking early, document whether cloud-init or admin controls netplan, and enforce with image baseline policies.
Related Errors & Cross-Refs
Often connected to DHCP route changes after reboot, DNS drift from metadata servers, and accidental dual definitions in multiple netplan files.
Related tutorial: View the step-by-step tutorial for Ubuntu 22.04 LTS.
View all Ubuntu 22.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
See cloud-init networking docs, Ubuntu cloud image guidance, and netplan documentation for persistent configuration strategy.
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.