Exclusive Metin2 game shield on FreeBSD: Automatic siege mode, VIP list, and whitelist from your dashboard. See how it works
Create a server

Guide

How to Set a Static IP on Ubuntu

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

  1. Check the interface and current config:

    ip -br a
    ls /etc/netplan/
  2. Edit the netplan YAML (example — match names/IPs to your panel):

    sudo nano /etc/netplan/50-cloud-init.yaml
  3. Example contents (replace eth0, address and gateway):

    network:
      version: 2
      ethernets:
        eth0:
          dhcp4: false
          addresses: [203.0.113.10/24]
          routes:
            - to: default
              via: 203.0.113.1
          nameservers:
            addresses: [1.1.1.1, 8.8.8.8]
  4. Apply and verify:

    sudo netplan try
    sudo netplan apply
    ip route
    ping -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.

Related guides