Installing Ubuntu Server 18.04, I see the networking config in /etc/netplan has a .yml file that talks about CloudInit and networking configuration not persisting across instances.

I have read https://help.ubuntu.com/community/CloudInit but am unsure what the exact use case for CloudInit would be, and why it would be on by default. My server is not on AWS nor any cloud platform.

So I've disabled this with /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg as per the comment a the start of the config file, and assigned a simple static IP and that works fine.

But am I missing something?

  • very good question! Did you find out why it is on by default? Is it safe to turn it off if not on a cloud platform? – Ciprian Tomoiagă Nov 13 '19 at 12:55
  • 1
    @CiprianTomoiagă I disabled it and it's not caused any problems since then (although configuring netplan for static Ipv4 and ipv6 addresses was a bit tricky as yaml is so sensitive to indenting). – TommyPeanuts Nov 14 '19 at 8:03

If your server is not on cloud/aws - why do you need cloud-init? If you have installed cloud-init, then it will try by default configure network by putting 50-cloud-init.yaml info /etc/netplan (if 18.04). As you change default - then no more autogenerated netplan yamls. You may read more about cloud-init at https://cloudinit.readthedocs.io/en/latest/ Basically, cloud-init used for autoconfiguration instances at cloud, where you usually have no console access.

| improve this answer | |
  • Your answer seems to be describing DHCP. Is there a difference? – TommyPeanuts Sep 2 '18 at 18:53
  • I tried to descript how cloud-init configure a network. But it not limited to it. – MaximKostrikin Sep 27 '18 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.