π ~1 min read
Table of contents
Symptom & Impact
Custom netplan changes revert after reboot, causing unstable network behavior.
Environment & Reproduction
Common on cloud images where cloud-init manages network configuration.
cloud-init status --long
ls -l /etc/netplan
sudo reboot
Root Cause Analysis
cloud-init datasource re-renders netplan files at boot and overrides manual edits.
Quick Triage
Confirm cloud-init ownership of networking and inspect generated files.
grep -R network: /etc/cloud/cloud.cfg /etc/cloud/cloud.cfg.d -n
ls -l /etc/netplan
cloud-init query --all | head -n 40
Step-by-Step Diagnosis
Track cloud-init boot stages and file write events.
sudo journalctl -u cloud-init -n 120
sudo cat /run/cloud-init/network-config.json
sudo cloud-init analyze blame

Solution – Primary Fix
Disable cloud-init network config and manage netplan directly.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
echo 'network: {config: disabled}' | sudo tee /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
sudo rm -f /etc/netplan/50-cloud-init.yaml
sudo netplan generate
sudo netplan apply

Solution – Alternative Approaches
Keep cloud-init in control and update its user-data network section instead.
sudoedit /var/lib/cloud/seed/nocloud-net/user-data
sudo cloud-init clean --logs
sudo reboot
Verification & Acceptance Criteria
Network config remains stable across reboot cycles.
sudo reboot
ls -l /etc/netplan
ip -br a
Rollback Plan
Remove disable file and restore cloud-init generated netplan if needed.
sudo rm -f /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
sudo cloud-init clean --logs
sudo reboot
Prevention & Hardening
Define ownership model for network configuration per image type and environment.
cloud-init status --long
ls /etc/cloud/cloud.cfg.d
Related Errors & Cross-Refs
Related to DHCP lease churn, route metric conflicts, and metadata service changes.
Related tutorial: View the step-by-step tutorial for Ubuntu 26.04 LTS.
View all Ubuntu 26.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu cloud-init networking docs and netplan integration guidance.
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.