Netplan YAML Generator

Write a valid /etc/netplan configuration for Ubuntu without hand-editing YAML. Pick a starting preset — wired DHCP, static IP or WPA2/WPA3 Wi-Fi — fill in your interface details (or paste/upload an existing netplan file and it will be imported into the form), and get a live config you can copy straight to the machine. The generator checks the mistakes that actually break netplan setups: Wi-Fi with the wrong renderer, addresses missing their /prefix, static IPs with no default route, duplicate interface names — and hands you the exact install commands, including netplan try, which rolls a bad config back automatically if you lose connectivity.

🔒 100% private — nothing is uploaded or stored. The YAML is generated entirely in your browser. If you upload an existing netplan file it is parsed locally and never sent to a server, so you can safely import configs that contain Wi-Fi passwords or internal IP layouts.

1 · Starting point

Pick a preset to fill the form with a working baseline. Choosing a preset replaces the current interfaces — everything can be edited afterwards.

2 · Interfaces

Find your real interface names with ip a (e.g. enp3s0, ens18, wlan0).

3 · Global settings

Which backend netplan pushes the config to. Mixed wired+Wi-Fi boxes should use NetworkManager.
Becomes /etc/netplan/<name>. Files are merged in alphabetical order — later names override earlier ones.

Import an existing config (optional)

Paste a netplan file (e.g. from cat /etc/netplan/50-cloud-init.yaml) or upload it — it is parsed in your browser and loaded into the form above. Bonds, bridges and custom routes beyond the default gateway are reported and left out.

Your netplan config

ready

Install it (three commands)

Run on the target machine. Step 3 is the safe way to apply: if the config breaks your connection, netplan rolls it back automatically after 10 seconds.

Useful day-to-day commands

How it works

Since Ubuntu 18.04, network configuration is driven by netplan: you write plain YAML files in /etc/netplan/ and run sudo netplan apply, which pushes the config to one of two backends (the renderer). systemd-networkd is a lightweight daemon aimed at wired links; NetworkManager is the full-featured manager — and the only one that can drive Wi-Fi. Every file must declare version: 2, and all files in the directory are merged, with later filenames overriding earlier ones (which is why cloud VMs' 50-cloud-init.yaml tends to win).

The difference between netplan apply and netplan try matters on servers: try applies the config, waits 10 seconds, and automatically reverts it if you lose connectivity — so a typo in a static IP can't lock you out of a machine over the network.

The mistakes that actually break netplan configs

  1. Boot stalls ~90 seconds on a headless server. Without optional: true, systemd-networkd waits for the interface to come up before continuing boot — and an unplugged cable never does. Tick optional on machines you manage remotely.
  2. "invalid YAML" from a tab character. YAML indentation must be spaces (netplan uses 2). Pasting from a word processor or an editor with tabs-on is the usual cause — this generator writes clean 2-space YAML, so import first and re-export.
  3. Wi-Fi that never connects. Netplan's Wi-Fi support only works with renderer: networkmanager. A wifis: block under systemd-networkd is silently ignored — the generator flags this as an error.
  4. Your settings keep getting overridden on a cloud VM. cloud-init writes /etc/netplan/50-cloud-init.yaml on every boot and it sorts after 01-*.yaml. Name your file 99-*.yaml, or remove the cloud-init file (sudo rm /etc/netplan/50-cloud-init.yaml) once you've taken over networking.
  5. Address without a prefix length. addresses: [192.168.1.10] is rejected by netplan generate — the CIDR suffix (/24) is mandatory. Size it with an IP/subnet calculator rather than guessing.
  6. The deprecated gateway4: key. Older guides use it, but modern netplan wants a route instead: routes: [{to: default, via: 192.168.1.1}] — which is what this generator writes.

Key reference

KeyWhat it does
dhcp4: trueGet an IPv4 address (and usually DNS) from a DHCP server. The default for most home and office networks.
dhcp6: auto / managedIPv6 from router advertisements (stateless) or full stateful DHCPv6. Leave out (or none) if you don't use IPv6.
addresses:Static addresses in CIDR form, e.g. [192.168.1.10/24]. Multiple entries allowed.
routes:Routing table entries. to: default + via: <gateway> is the default route (replaces the old gateway4).
nameservers:addresses: lists DNS servers used by this interface.
optional: trueDon't wait for this interface during boot — the fix for headless-server boot stalls.
mtu:Maximum transmission unit. 1500 is standard Ethernet; 9001 enables jumbo frames (switch must agree).
macaddress:Force a hardware address — useful for spoofing or when a driver reports the wrong MAC.
access-points:Wi-Fi only: maps each SSID to its settings. password: sets the WPA2/WPA3 PSK; omit it for an open network.

Luke Keam
Spot a bug or want a custom utility built? I'd love to hear from you. Get in touch
Luke Keam | techgeek.biz