Cloud and Self-Hosting
how to change ip address of ubuntu server 24.04 to static ip
To configure a static IP address on Ubuntu Server 24.04, you'll need to modify the Netplan configuration file. Here's how to do it: First, identify...
By Amjid Ali · · Updated · 1 min read
Prefer to watch? This video walks through it step by step. Prefer to read? The full guide is below.
To configure a static IP address on Ubuntu Server 24.04, you’ll need to modify the Netplan configuration file. Here’s how to do it:
- First, identify your network interface name:
ip a
- Create or edit the Netplan configuration file: (there might be a different file name too, like 50-cloud-init.yaml) or whatever is avaialble, i will be using below
sudo nano /etc/netplan/00-installer-config.yaml
- Configure the file with your static IP information:
network:
version: 2
renderer: networkd
ethernets:
enp0s18: # Replace with your interface name
dhcp4: false
addresses:
- 10.11.12.7/24 # Your desired static IP/subnet mask
routes:
- to: default
via: 10.11.12.1 # Your gateway IP
nameservers:
addresses: [10.11.12.1, 1.1.1.1] # DNS servers
- Apply the configuration:
sudo netplan apply
- Verify the new IP address:
ip a
Make sure to replace:
enp0s18 with your actual interface name10.11.12.7/24with your desired IP address and subnet mask10.11.12.1with your gateway address- DNS servers as needed for your network
If you encounter any issues, you can check the configuration with:
sudo netplan --debug apply
Related videos
Video library- Cloud and Self-Hosting
Set a Static IP and Hostname on Ubuntu Server 24.04 (Netplan)
· 9:02 · 1.6K views
Watch on YouTube - Cloud and Self-Hosting
Ubuntu Server Auto Updates with Crontab | Automate System Updates on Ubuntu 24.04
· 6:17 · 302 views
Watch on YouTube - Cloud and Self-Hosting
How to Change the IP Address of a Proxmox Virtual Environment Node
· 2:57 · 20.8K views
Watch on YouTube
Keep reading
Cloud and Self-HostingInstalling Kubernetes Dashboard on a K3s High Availability Cluster (Ubuntu 24.04)The Kubernetes Dashboard is a browser-based UI that allows you to visualize, manage, and troubleshoot workloads and resources inside your Kubernetes clu... · 2 min read
Cloud and Self-HostingInstall a 3-Node HA Kubernetes (K3s) Cluster on Ubuntu Server 24.04 Step-by-Step (Proxmox/VM Friendly)Step-by-step guide to install a 3-node HA Kubernetes (K3s) cluster on Ubuntu Server 24.04 using Proxmox VMs. Includes setup, firewall rules, tokens, and verification. · 5 min read
Cloud and Self-HostingHow to Install and Configure n8n on Oracle Cloud Always Free VM (Ubuntu 24.04)n8n (short for nodemation) is an open-source workflow automation platform that allows you to connect applications and APIs, automate repetitive tasks, a... · 4 min read