On a cloud VPS the IP often comes via hypervisor DHCP. If you must pin it in the guest (labs, templates), netplan is the path on modern Ubuntu.
Steps
Check the interface and current config:
ip -br als /etc/netplan/Edit the netplan YAML (example — match names/IPs to your panel):
sudo nano /etc/netplan/50-cloud-init.yamlExample contents (replace eth0, address and gateway):
network:version: 2ethernets:eth0:dhcp4: falseaddresses: [203.0.113.10/24]routes:- to: defaultvia: 203.0.113.1nameservers:addresses: [1.1.1.1, 8.8.8.8]Apply and verify:
sudo netplan trysudo netplan applyip routeping -c 3 1.1.1.1
Tips
- On provider VPS the IP is already yours — do not change netplan unless you know the correct gateway.
- Keep VNC/IPMI console handy before netplan apply in case SSH drops.
ext step
Dedicated IPv4 on Xernode Cloud VPS.