All free tools Generated in your browser

Ubuntu Netplan Generator

Describe your interfaces and get a ready-to-review /etc/netplan/01-netcfg.yaml file for Ubuntu 18.04 and later.

Build a Netplan file

YAML
Renderer and file name
Ubuntu Server uses systemd-networkd. Ubuntu Desktop normally uses NetworkManager.
Must end in .yaml. Netplan reads files from /etc/netplan in name order.

The YAML schema version is always 2, which is the only version Netplan supports.

Interfaces

A wrong network file can cut off your SSH session. Apply it with sudo netplan try, which rolls back automatically after 120 seconds, and keep a console, VNC, or recovery session open while you test.

We do not store your data. Every address, interface name, and nameserver you type is validated and rendered entirely in your browser and is never submitted to VPSLake.

From form to /etc/netplan in four steps

Collect the addressing details from your hosting panel or network plan before you start, then apply the file with a session you can recover.

  1. 1

    Pick the renderer and file name

    Ubuntu Server installations use networkd. Keep the default file name 01-netcfg.yaml unless an existing file in /etc/netplan already uses it.

  2. 2

    Describe each interface

    Add one block per device. Choose ethernet, VLAN, bridge, or bond, enter the interface name, then set DHCP or type one address/prefix per line. Gateways, nameservers, MTU, and the MAC override are optional.

  3. 3

    Generate and review the YAML

    Select the generate button, read the file in the output panel, and confirm that the interface names match what ip -br link reports on the server.

  4. 4

    Install and test it

    Copy the file to the server, then run sudo cp 01-netcfg.yaml /etc/netplan/, sudo chmod 600 /etc/netplan/01-netcfg.yaml, sudo netplan generate and sudo netplan try. Confirm at the prompt only when the connection still works, otherwise let the 120-second timer revert it. Finish with sudo netplan apply.

What Netplan writes and what it does not

Netplan is a YAML front end for the real network stack. On Ubuntu Server it converts /etc/netplan/*.yaml into systemd-networkd units, and on desktop installations it hands the same description to NetworkManager. Nothing in the YAML file takes effect until you run netplan generate and netplan apply.

Files are read in alphabetical order, so 01-netcfg.yaml is processed before a cloud image file such as 50-cloud-init.yaml. When two files describe the same interface, the later file wins, which is a common reason a hand-written file appears to be ignored.

This generator covers addressing, routing to a default gateway, DNS, MTU, MAC overrides, VLANs, bridges, and bonds. It deliberately leaves out wifi credentials, tunnels, per-route metrics, routing policy, and vendor-specific driver options, because those are easier to get wrong than right from a form.

What the generated file contains

Every file starts with a comment naming the tool and the intended path, then a single network: mapping with version: 2 and your chosen renderer. Interfaces are grouped into the section that matches their type.

  • ethernets:, vlans:, bridges: and bonds: sections, written only when used
  • DHCP flags and static addresses: lists with validated prefixes
  • Default routes in the modern routes: form instead of the deprecated gateway4 and gateway6 keys
  • nameservers: with resolver addresses and search domains
  • Optional mtu, macaddress, and optional: true
  • Two-space indentation and quoting only where YAML requires it

Test the file before you rely on it

The output is a reviewed starting point, not an audited configuration. Applying network changes over SSH can end your own session, and a typo in an interface name or gateway will leave the server unreachable. Use sudo netplan try so the previous configuration returns automatically after 120 seconds, keep a console or VNC session available, and take a copy of any existing files in /etc/netplan before you replace them.

Ubuntu Netplan Generator FAQ

Netplan has been the default network configuration layer since Ubuntu 18.04 LTS, so the generated file suits 18.04, 20.04, 22.04, 24.04 and later. Debian does not use Netplan by default; on Debian you would normally edit /etc/network/interfaces or use systemd-networkd directly.
The gateway4 and gateway6 keys are deprecated and produce a warning on current releases. The supported replacement is a default route entry, so the generator writes routes: with - to: default and via: the gateway address. The result is the same default route without the deprecation warning.
Interface names accept letters, digits, and the characters _ . : - up to 15 characters. Static addresses must include a prefix length, with 0 to 32 for IPv4 and 0 to 128 for IPv6. Gateways must be plain addresses without a prefix, the MAC override must be six colon-separated hexadecimal pairs, the MTU must be between 68 and 9000, and the VLAN id must be between 1 and 4094. Control characters are rejected everywhere.
If you used sudo netplan try, do nothing: the previous configuration is restored automatically after 120 seconds. If you already ran sudo netplan apply, open the provider console or VNC, restore the backup you took of /etc/netplan, or delete the new file, then run sudo netplan apply again.
Cloud images usually ship /etc/netplan/50-cloud-init.yaml, which is read after 01-netcfg.yaml and overrides matching interfaces. Either edit that file instead, give your file a higher number, or disable cloud-init networking by creating /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg containing network: {config: disabled}.
Netplan warns about world-readable files in /etc/netplan because they can contain secrets such as wifi passphrases. Setting sudo chmod 600 and root ownership removes the warning and keeps the habit correct for files that do hold credentials.
Wifi access points and passphrases, tunnels, modems, routing policy rules, per-route metrics and tables, DHCP overrides, and driver-specific parameters are not generated. Those settings are easier to get wrong from a form than from the Netplan reference, so the tool omits them rather than guessing.
No. Validation and YAML rendering run in your browser with JavaScript. Nothing you type is sent to a VPSLake server, stored, or logged, and the download is created locally from the text already shown on the page.