How to Set Static IP Address on Ubuntu Server 22.04

In this post, we will cover how to set static ip address on Ubuntu server 22.04.

Prerequisites

In Ubuntu server 22.04, networking is controlled by netplan utility , so we will use netplan to configure static ip address on Ubuntu server.

Setting up Static IP address on Ubuntu Server 22.04

Login to your Ubuntu server 22.04, look for the netplan configuration file. It is located under /etc/netplan directory.

Run below cat command to view the contents of ‘00-installer-config.yaml’

As per above output, it says that we have ens33 interface and it is getting ip from dhcp server. Alternate way to view interface name is via ip command.

save and close the file.

In the above file we have used following,

Note: Change the IP details and interface name as per your environment.

To view the default route, run

Perfect, above commands’ output confirms that static ip and route has been configured successfully.

Pradeep Kumar

11 thoughts on “how to set static ip address on ubuntu server 22.04”.

How do I use Netplan to set up a static IP address on WIFI?

change the network device “ens33” to something else, it will be listed when you run “ip a”; it;s probably wlan0 but that’s not guaranteed.

there will be a config file for the wifi interface. look for something like 00-installer-config-wifi.yaml

Hey! thanks I had problems before setting up the DNS and none config would work! This one did and you made this post really simple to follow!

I’ve been at the problem for a couple of weeks, with no fix in site; no spacing or tabbing change I make fixes it. Can anyone please advise me? Thanks.

try paste the YAML into here ‘https://www.yamllint.com/’

Copy paste not work here, you should try typing instead or if you paste, try to delete all the space before each line and tab key until the same format

The spacing must be done with the space key. If you try to make spaces in a yaml file with the tab key it will not work. Also you should let yamllint.com correct the file for you

Your article is quite nice and clear! but after followed, following error occurred when ping google.com: “temporary failure in name resolution”, meanwhile localhost can be visited. Is anyone facing this issue as well? I’ll quite appreciate it if can get some advise.

can we use default DHCP ip configuration along with another static ip in ubuntu 22.04 ? i already have ens33 then i added eth0 as static ip , netplan apply did not thrown any errors but unable to see my static ip , when i do ifconfig 🙁 even after reboot its not applying, any suggestions..

i successfully set up my static ip but I cant ping to 192.168.1.1 why

Leave a Comment Cancel reply

How-To Geek

How to set a static ip address in ubuntu.

4

Your changes have been saved

Email Is sent

Please verify your email address.

You’ve reached your account maximum for followed topics.

Quick Links

What is a static ip address, setting a static ip in ubuntu, set a static ip in ubuntu with the gui, connection convenience, key takeaways.

After gathering your connection name, subnet mask, and default gateway, you can set a static IP address in the terminal using the nmcli command. Or, in the GNOME desktop, open your connection settings and click the + icon, then enter the info for your static IP address there.

Your home network relies on IP addresses to route data between devices, and sometimes on reconnecting to the network a device's address can change. Here's how to give an Ubuntu Linux computer a permanent IP address that survives reboots.

Everything on your network home network, whether it's using a wired connection or Wi-Fi, has an IP address . IP stands for Internet Protocol. An IP address is a sequence of four numbers separated by three dots. Each IP address that is unique within that network.

IP addresses act as numeric labels. Your router uses these labels to send data between the correct devices. Usually, your router assigns IP addresses. It knows which IP addresses are in use and which are free. When a new device connects to the network, it requests an IP address and the router allocates one of the unused IP addresses. This is called DHCP, or dynamic host configuration protocol .

When a device is restarted or powered off and on, it may receive its old IP address once more, or it might be allocated a new IP address. This is normal for DHCP and it doesn't affect the normal running of your network. But if you have a server or some other computer that you need to be able to reach by its IP address, you'll run into problems if its IP address doesn't survive power downs or reboots.

Pinning a specific IP address to a computer is called allocating a static IP address . A static IP address, as its name suggests, isn't dynamic and it doesn't change even if the computer is power-cycled .

Nmcli is the command-line network manager tool , and can be used to change your IP address, configure network devices, and --- relevant to our purposes --- set up a static IP in Ubuntu.

We're demonstrating this technique on Ubuntu 22.04 LTS, but it ought to work on any Linux distribution, including Ubuntu 23.04. The nmcli tool was released in 2004, so it should be present on just about any standard distribution.

Let's take a look at the network connections that already exist on the computer. We're using the connection command with the show argument.

nmcli connection show

Using nmcli to list network connections

This displays some information about each connection. We only have a single connection configured.

The details of a single network connection displayed by nmcli

The output is wider than the terminal window. This is the information that we're shown.

Name

UUID

TYPE

DEVICE

netplan-enp0s3

1eef7e45-3b9d-3043-bee3-fc5925c90273

ethernet

enp0s3

  • Name : Our network connection is called "netplan-enp0s3."
  • UUID : The universally unique identifier Linux uses to reference this connection internally.
  • Type : This is an ethernet connection.
  • Device : This connection is using the "enp0s3" network interface. It's the only network card in this computer.

We can use the ip command to discover the IP address this computer is using.

The output of the ip addr command showing the ip address of the computer

In the output we can see the "enp0s3" entry, and its current IP address, 192.168.86.117. The "/24" is a shorthand way of saying that this network uses a 255.255.255.0 subnet mask . Take a note of this number, we'll need to use it later.

We need to choose the IP address we're going to set as our static IP address. Obviously, you can't use an IP address that is already in use by another device. One safe way to proceed is to use the current IP address assigned to the Ubuntu system. We know for certain that nothing else is using that IP address.

If we want to use a different IP address, try pinging it. We're going to test whether IP address 192.168.86.128 is in use. If everything else on your network uses DHCP and you get no response to the ping command, it should be safe to use.

ping 192.168.86.128

Using ping to determine if an IP address is in use

Even if another device had previously used that IP address, it'll be given a new IP address when it next boots up. Nothing responds to the ping requests, so we're clear to go ahead and configure 192.168.86.128 as our new static IP.

We also need to know the IP address of your default gateway , which will usually be your broadband router. We can find this using the ip command and the route option, which we can abbreviate to "r."

Using the ip command to find the IP address of the default gateway

The entry that starts with "default" is the route to the default gateway. Its IP address is 192.168.86.1. Now we can start to issue commands to set up our static IP address.

The first command is a long one.

sudo nmcli con add con-name "static-ip" ifname enp0s3 type ethernet ip4 192.168.86.128/24 gw4 192.168.86.1

Creating a new connection with the nmcli command

Taken in small chunks, it's not as bad as it looks. We're using sudo . The nmcli arguments are:

  • con : Short for "connection."
  • add : We're going to add a connection.
  • con-name "static-ip" : The name of our new connection will be "static-ip."
  • ifname enp0s3 : The connection will use network interface "enp0s3."
  • type ethernet : We're creating an ethernet connection.
  • ip4 192.168.86.128/24 : The IP address and subnet mask in classless inter-domain routing notation . This is where you need to use the number you took note of earlier.
  • gw4 192.168.86.1 : The IP address of the gateway we want this connection to use.

To make our connection a functioning connection, we need to provide a few more details. Our connection exists now, so we're not adding anything, we're modifying settings, so we use the mod argument. The setting we're changing is the IPv4 DNS settings. 8.8.8.8 is the IP address of Google's primary public DNS server , and 8.8.4.4 is Google's fallback DNS server.

Note that there is a "v" in "ipv4." In the previous command the syntax was "ip4" without a "v." The "v" needs to be used when you're modifying settings, but not when adding connections.

nmcli con mod "static-ip" ipv4.dns "8.8.8.8,8.8.4.4"

Using the nmcli command to set the DNS servers for a connection

To make our IP address static, we need to change the method which the IP address obtains its value. The default is "auto" which is the setting for DHCP. We need to set it to "manual."

nmcli con mod "static-ip" ipv4.method manual

Using the nmcli command to set an IP address to static

And now we can start or "bring up" our new connection.

nmcli con up "static-ip" ifname enp0s3

Using the nmcli command to start a network connection

We didn't get any error messages which is great. Lets use nmcli to look at our connections once more.

nmcli con show

The details of two network connections displayed by nmcli

Here's the output:

NAME

UUID

TYPE

DEVICE

static-ip

da681e18-ce9c-4456-967b-63a59c493374

ethernet

enp0s3

netplan-enp0s3

1eef7e45-3b9d-3043-bee3-fc5925c90273

ethernet

--

Our static-ip connection is active and using device "enp0s3." The existing connection "netplan-enp0s3" is no longer associated with a physical network interface because we've pinched "enp0s3" from it.

Click the icons at the far-right end of the system bar to show the system menu, then click on the "Wired Connected" menu option. If you're using a wireless connection, instead click the name of your Wi-Fi network.

The available connections are displayed. A dot indicates which is in use. Click the "Wired Settings" or "Wi-Fi Settings" menu option. The details of the active connection are displayed.

If you followed our previous instructions the new connection will be the active connection. We can see our new "static-ip" connection has the IP address, default gateway, and DNS servers that we set for it.

The system menu with the "Wired Connected" pane expanded

To create a new connection using the "Settings" application, click the " + " icon on the "Networks" page, above the list of wired connections.

The wired connection section in the Network tab of the Settings app

A dialog appears. We need to provide a name for our new static IP connection.

Giving a name to a new connection profile in the "New Profile" dialog

We're calling our new connection "static-2." Click the "IPv4" tab.

Supplying the IPv4 connection details to a new connection profile in the "New Profile" dialog

Select the "Manual" radio button, and complete the "Address", "Netmask", and "Gateway" fields. Also complete the DNS field, and then click the green "Apply" button. Note the comma between the DNS entries.

Our new connection is listed in the "Wired" connections pane.

A newly-added connection in the wired connection section of the Network tab of the Settings app

You can swap between the available connections by clicking directly on their names.

If you want to modify a connection after you create it, click the cog icon. In this case, we'll enter the settings for the "static-ip" connection.

The wired connection section in the Network tab of the Settings app

A dialog box opens. Click on the "IPv4" tab.

The IPv4 tab of the connection settings dialog

Because we set our new IP address to be static, the "Manual" radio button is selected. You could change this back to DHCP by selecting the "Automatic (DHCP)" radio button, and clicking the green "Apply" button.

Using the nmcli command or the GNOME desktop and apps, you can hop between network connections very easily and very quickly.

It's more convenient to have a selection of connection profiles and move between them as you need to, rather than to have one that you keep editing. If something goes horribly wrong with the connection you're editing or adding, you can always fall back on one of the existing connections.

Set static IP in Ubuntu using Terminal

Everything you need to know about setting static IP on an Ubuntu machine using the command line.

Dec 5, 2022 — Pratham Patel

Normally, the router's DHCP server handles assigning the IP address to every device on the network, including your computer.

The DHCP server may also give you a new IP address occasionally. This could cause a problem if you have a home lab or server setup that works on a fixed IP address.

You need to set a static IP address on your Ubuntu system to avoid problems.

Step 1: Identify the correct network interface

The first step is always to know the name of your network interface.

"But why?" you might ask. That is because since Ubuntu 20.04, the network interfaces are named using predictable network interface names . This means your one and only ethernet interface will not be named 'eth0'.

Ubuntu Server and Ubuntu Desktop use different renderers for 'netplan', they are 'systemd-networkd' and 'NetworkManager', respectively. So let's go over their differences.

Ubuntu Server

To see available network interfaces on Ubuntu Server, run the following command:

Doing so will show a similar result:

The output enumerates network interfaces with numbers.

From this, I can see that the ethernet interface is 'enp1s0'.

Ubuntu Desktop

The advantage (at least in my opinion) of having Ubuntu Desktop is having NetworkManager as the renderer for netplan .

It has a pretty CLI output :)

Run the following command to view the available network interfaces:

That will give you the device name, type, state and connection status.

Here is what it looks like on my computer:

This is more readable at first glance. I can make out that my ethernet interface is named 'enp1s0'.

set ip ubuntu server

Step 2: See current IP address

Now that you know which interface needs to be addressed, let us edit a file .

Before I change my IP address/set a static one, let us first see what my current IP address is .

Nice! But let's change it to '192.168.122.128' for demonstration purposes.

Step 3: See the gateway

A gateway is a device that connects different networks (basically what your all-in-one router is). To know the address of your gateway, run the following command:

The gateway address will be on the line that begins with "default via".

Below is the output of running the ip command on my computer:

On the line that starts with "default via", I can see that my gateway address '192.168.122.1'

Make a note of your gateway address.

Step 4: Set static IP address

Now that you have detail like interface name and gateway address, it is time to edit a config file.

Step 4-A: Disable cloud-init if present

The easiest way to know if cloud-init is present or not is to check if there is a package with that name.

Run the following command to check:

If you get an outupt, you have 'cloud-init' installed.

Now, to disable could-init, create a new file inside the /etc/cloud/cloud.cfg.d directory. The name does not matter, so I will call it '99-disable-cloud-init.cfg'.

Add the following line to it:

Please reboot your Ubuntu system now so that cloud-init does not interfere when we set our static IP address in the next step. :)

Back to Step 4

Once the 'cloud-init' related configuration is complete, we must now edit the netplan configuration to add our static IP address.

Go to the /etc/netplan directory. It is better if there is one file (easier to know which one to edit), but in some cases, there might also be more than one file with the extension '.yml' or '.yaml'.

When in doubt, grep for the name of your network interface. Use the following command if you are not comfortable with grep:

Since the name of network interface for my ethernet is 'enp1s0', I will run the following command:

running this command shows that the file I am looking for is '00-installer-config.yaml'. So let us take a look at it.

You might have noticed a line that says 'ethernet' and our network interface name under that. Under this is where we configure our 'enp1s0' network interface.

Since we do not want DHCP assigned IP address, let us change that field from true to no .

Add a field called addresses . Write the IP address you wish to assign your computer along with the network prefix. So I will write 192.168.122.128/24 in the addresses field.

Finally, we also need to specify DNS nameservers. For that, create a new field called nameservers and under that, create a field called addresses which contains the IP address for your DNS servers . I used Cloudflare's DNS servers but you can use whatever you want.

This is what my '00-installer-config.yaml' file looks like after editing it to my liking.

To apply the settings, run the following command:

This will take only a few seconds, and the IP address will be updated once it is done.

You can check the IP address using the hostname -I command.

Perfect! The IP address has now changed successfully.

set ip ubuntu server

I know that it feels complicated but this is the proper procedure when you are trying to assign static IP via the command line in Ubuntu.

Let me know if you are stuck at some point or encounter any technical issues.

Pratham Patel

Fell in love with Ubuntu the first time I tried it. Been distro-hopping since 2016.

On this page

set ip ubuntu server

Configure Static IP Address on Ubuntu 22.04|20.04|18.04

In today’s guide, we are going to see how to configure a static IP address on Ubuntu server 22.04|20.04|18.04. After installing Ubuntu 22.04|20.04|18.04 Server or Desktop, the default setting it to obtain an IP address automatically via DHCP server. This means that you will have to configure a Static IP address Manually.

configure static ip ubuntu

Method 1: Manually edit Network Configuration files

In this example, we’ll use vim editor and configure our server to use the IP address of 10.10.1.5 , netmask 255.255.255.0 , dns server 8.8.8.8 and default gateway being 10.10.1.1.

Open /etc/network/interfaces

Then add the following lines replacing with your IP information.

For the changes to take effect, restart your network daemon by

Don’t forget to replace eth0 with your network card name.

Check that you have an ip address on eth0 interface by typing

Method 2: Use Netplan YAML network configuration

On Ubuntu 22.04|20.04|18.04, you can use Netplan which is a YAML network configuration tool to set static IP address.

This configuration assumes your network interface is called eth0 . This may vary depending on your working environment.

Then configure like below.

When done making the changes, save the configuration file and apply your network settings.

To confirm your network settings, use the command:

If you don’t need IPv6, it’s possible to disable it like follows.

YOU CAN SUPPORT OUR WORK WITH A CUP OF COFFEE

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

RELATED ARTICLES MORE FROM AUTHOR

Create openstack instance with a fixed / static ip, how to install ifconfig on rhel 8 / centos 8 linux, ifconfig vs ip usage guide on linux, configure static ip address on centos 8|centos 7, leave a reply cancel reply, recent posts, automated testing in software development: ensuring quality and efficiency, how to get your business website off the ground , best practices to avoid business email compromise, top google analytics alternatives, the role of automation in modern deal flow management, cybersecurity measures to protect against fraudulent company trading, can ai predict and prevent criminal activity, the role of technology in modern academic appeals, more content, 10 application security trends you should consider in securing your application, install kde desktop on ubuntu 24.04 (noble numbat), installing cisco anyconnect on ubuntu / debian / fedora, install apache with mod_ssl/mod_http2 on centos 8|rhel 8, setup openldap multi-master replication on centos 8, install django web framework on debian 11/10/9, configure static ipv4 address in openshift 4.x coreos servers, how to install wine 9 on ubuntu 18.04 / linux mint..., how to install pgadmin 4 on debian 11|10|9, install and use dolt – git for sql database, best books to learn internet of things (iot) in 2024, best java programming books for 2024, best books to learn kafka and apache spark in 2024, best books to master azure cloud platform in 2024, best microsoft sql server books for 2024, best books to learn ruby programming in 2024, crisc certification exam preparation books for 2024, best books to learn spring boot development in 2024, best books to learn joomla web development in 2024, best kubernetes study books for 2024, best freebsd books to read in 2024, best comptia security+ (sy0-601) certification books 2024, best books to master r programming in 2024, best c/c++ programming books for beginners 2024, best books to learn mysql / mariadb databases in 2024, best ccna security (210-260) certification study 2024, best comptia cysa+ (cs0-002) certification study books 2024, which programming language to learn in 2024 top 10 choices, rust programming books to read in 2024, c# and .net programming books you can read in 2024, best books to learn redis and memcached caching in 2024, best cybersecurity books to read in 2024, best programming books for kids in 2024, the right way to learn operating systems – best books, top rated must read novel books for 2024, ssh mastery – best book to master openssh, putty, tunnels, best books to learn vmware esxi virtualization in 2024, here are the top apache and nginx reference books, best certified scrum master preparation books 2024, books to help you master apache solr in 2024, editor picks, install and run open edx tutor lms in docker containers, how to install openstack on debian 12 (bookworm), install flatcar container linux on vmware esxi / vcenter, deploy kubernetes cluster using vmware photon os, how to send wordpress notifications on email using gmail, install and use kubesphere on existing kubernetes cluster, install and configure traefik ingress controller on kubernetes, top smart plug power strips to buy in 2024, how to run ansible awx on kubernetes / openshift cluster, popular posts, how to install laravel on ubuntu 24.04, popular category, data security and encryption books to read in 2024, books for learning wordpress development in 2024.

How to Configure Static IP Address on Ubuntu 18.04

Updated on Mar 9, 2020

Ubuntu Static IP Address

In this tutorial, we’ll explain how to set up a static IP address on Ubuntu 18.04.

Generally, IP addresses are assigned dynamically by your router DHCP server. Setting a static IP address on your Ubuntu machine may be required in different situations, such as configuring port forwarding or running a media server on your network.

Configuring Static IP address using DHCP #

The easiest and the recommended way to assign a static IP address to a device on your LAN is by setting up a Static DHCP on your router. Static DHCP or DHCP reservation is a feature found on most routers which makes the DHCP server to automatically assign the same IP address to a specific network device, every time the device requests an address from the DHCP server. This works by assigning a static IP to the device’s unique MAC address. The steps for configuring a DHCP reservation vary from router to router, and it’s advisable to consult the vendor’s documentation.

Starting with 17.10 release, Netplan is the default network management tool on Ubuntu, replacing the configuration file /etc/network/interfaces that had previously been used to configure the network on Ubuntu.

Netplan uses configuration files in YAML syntax. To configure a network interface with Netplan, you need to create a YAML description for that interface, and Netplan will generate the required configuration files for your chosen renderer tool.

Netplan currently supports two renderers NetworkManager and Systemd-networkd. NetworkManager is mostly used on Desktop machines while the Systemd-networkd is used on servers without a GUI.

Configuring Static IP address on Ubuntu Server #

The newer versions of Ubuntu uses ‘Predictable Network Interface Names’ that, by default, start with en[letter][number] .

The first step is to identify the name of the ethernet interface you want to configure. To do so use the ip link command, as shown below:

The command will print a list of all the available network interfaces. In this case, the name of the interface is ens3 :

Netplan configuration files are stored in the /etc/netplan directory and have the extension .yaml . You’ll probably find one or two YAML files in this directory. The file may differ from setup to setup. Usually, the file is named either 01-netcfg.yaml , 50-cloud-init.yaml , or NN_interfaceName.yaml , but in your system it may be different.

Open the YAML configuration file with your text editor :

Before changing the configuration, let’s explain the code in a short.

Each Netplan Yaml file starts with the network key that has at least two required elements. The first required element is the version of the network configuration format, and the second one is the device type. The device type can be ethernets , bonds , bridges , or vlans .

The configuration above also includes the renderer type. Out of the box, if you installed Ubuntu in server mode, the renderer is configured to use networkd as the back end.

Under the device’s type (in this case ethernets ), you can specify one or more network interfaces. In this example, we have only one interface ens3 that is configured to obtain IP addressing from a DHCP server dhcp4: yes .

To assign a static IP address to ens3 interface, edit the file as follows:

  • Set DHCP to dhcp4: no .
  • Specify the static IP address 192.168.121.199/24 . Under addresses: you can add one or more IPv4 or IPv6 IP addresses that will be assigned to the network interface.
  • Specify the gateway gateway4: 192.168.121.1
  • Under nameservers , set the IP addresses of the nameservers addresses: [8.8.8.8, 1.1.1.1]

When editing Yaml files, make sure you follow the YAML code indent standards. If there are syntax errors in the configuration, the changes will not ne applied.

Once done save and close the file and apply the changes with:

Verify the changes by typing:

That’s it! You have assigned a static IP to your Ubuntu server.

Configuring Static IP address on Ubuntu Desktop #

Setting up a static IP address on Ubuntu Desktop computers requires no technical knowledge.

In the Activities screen, search for “network” and click on the Network icon. This will open the GNOME Network configuration settings. Click on the cog icon.

Ubuntu Network Settings

The Network interface settings dialog box will be opened:

Ubuntu Interface Settings

In “IPV4” Method" section, select “Manual” and enter your static IP address, Netmask and Gateway. Once done, click on the “Apply” button.

Ubuntu Set static IP Address

Now that you have set up a static IP Address, open your terminal either by using the Ctrl+Alt+T keyboard shortcut or by clicking on the terminal icon and verify the changes by typing:

The output will show the interface IP address:

Conclusion #

You have learned how to assign a static IP address on your Ubuntu 18.04 machine.

If you have any questions, please leave a comment below.

Related Tutorials

How to Configure Static IP Address on Ubuntu 20.04

How to install python 3.8 on ubuntu 18.04, how to install odoo 13 on ubuntu 18.04.

  • How to Change Root Password in Ubuntu Linux
  • How to Uninstall Software Packages on Ubuntu
  • How To Add Apt Repository In Ubuntu
  • How to Add User to Sudoers in Ubuntu

If you like our content, please consider buying us a coffee. Thank you for your support!

Sign up to our newsletter and get our latest tutorials and news straight to your mailbox.

We’ll never share your email address or spam you.

Related Articles

Sep 15, 2020

Ubuntu Static IP Address

Nov 5, 2019

Install Python 3.8 on Ubuntu 18.04

Oct 19, 2019

Deploy Odoo 13 on Ubuntu 18.04

It's FOSS

How to Assign Static IP Address on Ubuntu Linux

Dimitrios

Brief: In this tutorial, you’ll learn how to assign static IP address on Ubuntu and other Linux distributions. Both command line and GUI methods have been discussed.

IP addresses on Linux Systems in most cases are assigned by Dynamic Host Configuration Protocol (DHCP) servers. IP addresses assigned this way are dynamic which means that the IP address might change when you restart your Ubuntu system . It’s not necessary but it may happen.

Dynamic IP is not an issue for normal desktop Linux users in most cases . It could become an issue if you have employed some special kind of networking between your computers.

For example, you can share your keyboard and mouse between Ubuntu and Raspberry Pi . The configuration uses IP addresses of both system. If the IP address changes dynamically, then your setup won’t work.

Another use case is with servers or remotely administered desktops. It is easier to set static addresses on those systems for connection stability and consistency between the users and applications.

In this tutorial, I’ll show you how to set up static IP address on Ubuntu based Linux distributions. Let me show you the command line way first and then I’ll show the graphical way of doing it on desktop.

Method 1: Assign static IP in Ubuntu using command line

Static IP set up Ubuntu

Note for desktop users : Use static IP only when you need it. Automatic IP saves you a lot of headache in handling network configuration.

Step 1: Get the name of network interface and the default gateway

The first thing you need to know is the name of the network interface for which you have to set up the static IP.

You can either use ip command or the network manager CLI like this:

In my case, it shows my Ethernet (wired) network is called enp0s25:

Next, you should note the default gateway IP using the Linux command ip route :

As you can guess, the default gateway is 192.168.31.1 for me.

Step 2: Locate Netplan configuration

Ubuntu 18.04 LTS and later versions use Netplan for managing the network configuration. Netplan configuration are driven by .yaml files located in /etc/netplan directory.

By default, you should see a .yaml file named something like 01-network-manager-all.yaml, 50-cloud-init.yaml, 01-netcfg.yaml.

Whatever maybe the name, its content should look like this:

You need to edit this file for using static IP.

Step 3: Edit Netplan configuration for assigning static IP

Just for the sake of it, make a backup of your yaml file.

Please make sure to use the correct yaml file name in the commands from here onward.

Use nano editor with sudo to open the yaml file like this:

Please note that yaml files use spaces for indentation . If you use tab or incorrect indention, your changes won’t be saved.

You should edit the file and make it look like this by providing the actual details of your IP address, gateway, interface name etc.

In the above file, I have set the static IP to 192.168.31.16.

Save the file and apply the changes with this command:

You can verify it by displaying your ip address in the terminal with ‘ip a’ command.

If you don’t want to use the static IP address anymore, you can revert easily.

If you have backed up the original yaml file, you can delete the new one and use the backup one.

Otherwise, you can change the yaml file again and make it look like this:

Method 2: Switch to static IP address in Ubuntu graphically

If you are on desktop, using the graphical method is easier and faster.

Go to the settings and look for network settings. Click the gear symbol adjacent to your network connection.

Assign Static IP address in Ubuntu Linux

Next, you should go to the IPv4 tab. Under the IPv4 Method section, click on Manual.

In the Addresses section, enter the IP static IP address you want, netmask is usually 24 and you already know your gateway IP with the ip route command.

You may also change the DNS server if you want. You can keep Routes section to Automatic.

Assigning static IP in Ubuntu Linux

Once everything is done, click on Apply button. See, how easy it is to set a static IP address graphically.

If you haven’t read my previous article on how to change MAC Address , you may want to read in conjunction with this one.

More networking related articles will be rolling out, let me know your thoughts at the comments below and stay connected to our social media.

Dimitrios is an MSc Mechanical Engineer but a Linux enthusiast in heart. His machines are powered by Arch Linux but curiosity drives him to constantly test other distros. Challenge is part of his per

Exploring the Default Tiling Windows Feature in Ubuntu 24.04 (and Enhancing it)

Fixing applications icon missing from the launcher in ubuntu, reset forgotten root password in ubuntu, install multiple python versions on ubuntu with pyenv, 5 tiny tweaks that help me a great deal with ubuntu 24.04 on my laptop, become a better linux user.

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

It's FOSS

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Your link has expired.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.

Configuring Ubuntu 20.04 to use a Static IP Address

Emmet Avatar

This tutorial will show you how easy it is to configure Ubuntu 20.04 to use a static IP address.

Static IP address Ubuntu 20.04

IP addresses are a crucial part of how networking functions. Using this address, another device on the network can connect to you.

In a home network a router is what typically will assign this IP address to your Ubuntu 20.04 device.

A router implements something called the Dynamic Host Configuration Protocol (DHCP). This protocol is used for the router to hand out IP addresses to connected devices.

When your Ubuntu device first connects to the router, it will request an IP address. This IP address is typically assigned from a pool of IPs the router is willing to give out.

Some modern routers attempt to assign the same IP address every time it reconnects. Still, this behavior is something that is never guaranteed.

There are a couple of ways that you work around the dynamic allocation so that your Ubuntu 20.4 device will get assigned a static IP address.

If you are unsure if you are running 20.04, you can follow our guide on checking your Ubuntu version .

We have a specific guide for setting a static IP address on Ubuntu 18.04 if you find out you are using an older version.

Table of Contents

Using dhcp reservation to set a static ip address, requesting a static ip address, identifying the network interface name, using netplan to define a static ip address, setting a static ip address using the desktop interface.

The best possible way to set a static IP address to your Ubuntu 20.04 device is to use DHCP reservation.

DHCP reservation is a feature built-in to most routers and allows you to set a specific IP.

Basically, this feature ensures that the router keeps the IP address aside and only hands it to your device.

Assigning an IP address to Ubuntu 18.04 using DHCP Reservation Diagram

When you connect to the router, it passes on various bits of information includes the interface’s MAC address. The MAC address is a unique identifier specific to the connecting network interface.

When the router receives this information, it will check the MAC address against its DHCP reservation.

If there is a match, the router will assign the reserved IP address to your device.

As configuring DHCP reservations is super specific to individual routers, you will need to check out your model’s documentation.

If your router doesn’t have a DHCP reservation or do not have access to the router, there is an alternative.

You can adjust your Ubuntu 20.04 device’s network configuration so that it will request a static IP address.

By changing the interfaces configuration, the device will request a specific IP address when it connects to the router.

If the router has the IP address available in its pool, it will be assigned to your 20.04 Ubuntu device.

Ubuntu 18,04 Requesting a Static IP Address

This method of getting a static IP address has a few drawbacks when compared to using DHCP reservations.

The first of these problems is that the router will never guarantee that the IP is actually available. As there is no reservation in place, the IP can be assigned to another device.

Additionally, suppose the static IP address is not available when your Ubuntu 20.04 device connects. In that case, it will fail to connect to the router.

As your device asks for a specific IP, the router will not fall back to assigning an IP from the router’s pool.

The following two sections will show you how to set a static IP address on both Ubuntu Server and Ubuntu desktop.

Setting a Static IP Address on Ubuntu Server 20.04

We will show you how it is possible to set a static IP address on Ubuntu Server 20.04.

As Ubuntu Server utilizes the terminal, make sure you are comfortable with typing in some simple commands before proceeding.

Identifying the network interface name is a fairly straightforward process thanks to Ubuntu 20.04 utilizing “Predictable Network Interface Names”.

The predictable naming makes it far easier to work out what type of network interface you are utilizing.

We can tell that any interface that starts with the text “ en ” is an ethernet network interface .

If you are dealing with a wireless network interface , the name would be prefixed with the text “ wl “.

1. We can utilize the ip command to list the available network interfaces on your Ubuntu Server 20.04 machine.

Use the command below to list out the currently active network interfaces on your device.

2. By using the command, you should end up with a result as we have below.

This result shows you your network interface’s details, including their name.

You can see that our Ubuntu device currently has two active network interfaces.

The first network interface that is listed is the loopback device. This interface has the name “ lo ” and is used for your computer to communicate with itself.

The second network interface utilizes the name “ enp0s3 “. As this interface starts with “ en “, we can tell that it is our ethernet network interface.

This interface is the one that we want to set the static IP address for.

3. Before proceeding, make sure that you make a note of your network interface’s name.

From our example, the network name we want to set a static IP address for will be called “ enp0s3 “.

For the next section, you will need to know the interface name to set the static IP address on your Ubuntu Server 20.04 machine.

Built into Ubuntu Server 20.04 is a network management tool called Netplan .

We can use this tool’s to make the operating system request a specific IP address from the router when it connects.

1. As your Ubuntu Server installation might come with different configuration files, we need to list the files out of the config directory.

We can use the ls command to list the files in the “ /etc/netplan/ ” directory.

Using the list shown from this command, we can identify the configuration files we need to modify.

In our clean installation of Ubuntu Server 20.04, this file was called “ 01-netcfg.yaml “. However, on your installation, the config file may be utilizing a different name.

If the directory has no configuration files for some reason, you should be safe to continue with the tutorial as is.

2. We can begin editing the Netplan configuration file by utilizing the nano text editor .

Make sure you change the filename in the following command to the one you found in the previous step.

3. In this file, you should have text similar to what we have shown below.

Using this file, we can control the behavior of our network interfaces.

We will quickly explore what each of these settings does so you have an idea of what we are modifying.

network: – When modifying a network interface’s behaviour, the file must always start with “ network: “.

All settings that modify the network will be stored underneath this block.

version: – Netplan requires you to specify what version of its configuration markup that you are using.

Typically this value will be set to 2 . Only change this setting if you have an understanding of its ramifications.

renderer: – It is possible to specify which backend Netplan will use to handle network connections.

Two settings can be defined heree, either “ networkd ” or “ NetworkManager “.

ethernets: – This block is where we define settings that will modify our ethernet interfaces’ behavior.

If you are trying to modify a wireless connection, you should see the text “ wifi ” instead.

enp0s3: – Finally, you should see the name of your network interface. Settings defined under this block only affects that device.

You will likely see a different network interface name specified here and not our example name (“ enp0s3 “).

dhcp4: – This option allows us to control whether Netplan will automatically fetch an IP address from the router using the DHCP client.

By default, the DHCP client will be enabled with the setting set to “ yes “.

Later on in this guide, we will disable this option so that our Ubuntu 20.04 device will retrieve a static IP address.

4. Now that you understand the default configuration, we can now modify it to suit our needs.

Please note that indentation is crucial to the Netplan configuration file. Anything inside a block needs to have an extra two spaces added before it.

a. Our first task will be to disable the network interface from retrieving an IP address automatically from the router’s DHCP server.

Disabling the DHCP client is as simple as changing the value of this setting from “ yes ” to “ no “.

b. With the DHCP client disabled, we can now define a static IP address for our Ubuntu 20.04 device.

We need to add a new option, that being “ addresses: “. Using this option, we can specify the IP address you want to retrieve.

The IP addresses you specify here must be surrounded by square brackets ( [ ] . If you add multiple IPs, you must separate them using a comma ( , )

With our example below, we will be telling our device to try and use the IP address 192.168.0.123 .

c. Since we have disabled the DHCP client, we need to add an option so that we can specify the gateway address.

This option is “ gateway4: “. Using this, we can specify the IP we want to route through.

Typically this IP address will be the internal IP of a device such as your network router.

For our example, we will be using the IP address for our network router, “ 192.168.1.1 “.

d. Additionally, we need to define the IP address for our nameservers.

Since the “ nameservers ” block has several options,  so everything after this block will be on a new line.

e. Within this block, we need to define the nameservers that we want to connect to by using the “ addresses: ” option.

Inside the nameservers block, we need to define the DNS servers’ IP addresses that you want to connect to. This option will be started with “ addresses: “.

Like the static IP addresses, we need to wrap these in square brackets ( [ ] ). Additionally, for each additional nameserver, the IP must be separated by a comma ( , ).

To showcase how this works, we will be using Google DNS servers. In this case, the two IP addresses would be “ 8.8.4.4 ” and “ 8.8.8.8 “.

5. At the end of these steps, you should have a configuration file that looks like we have below.

The IP addresses and network interface names will likely differ from what we have here.

You can save your changes to the configuration file by pressing CTRL + X , followed by Y , then the ENTER key

6. With the configuration file modified, we need to get the Netplan tool to apply the changes.

Applying the changes is as simple as using the following command on your Ubuntu device.

7. Verifying that the Ubuntu 20.04 operating system is now utilizing a static IP address, we can use the ip command again.

If we use the command below, it is possible to list out the IP addresses that our network interfaces are attempting to utilize

From this command, you should end up finding a result for your ethernet device.

Using this result, you can see the value for inet for our enp0s3 network interface is now the static IP address that we wanted.

Setting a static IP address on Ubuntu 20.04 is a straightforward process on the desktop version of Ubuntu 20.04.

The interface for modifying network settings is incredibly easy to use. You can set a static IP in a couple of clicks.

1. First, we need to get to the settings screen to modify the network interface settings.

Start by clicking on the top right of the screen. This is where the sound, power, and network icons are located.

Opening the Actions Panel

2. In the menu that appears, you need to click the “ Settings ” option.

Open the Settings Screen

3. With the settings screen opened, click “ Network ” in the left-hand sidebar ( 1. ).

Within the Network settings page, you should see a list of network interfaces.

You should identify the interface you want to set a static IP address for and click the cog next to it.

Getting to the Network Settings

4. Now that we have the network interface settings loaded, we need to change to the IPv4 tab.

In the menu bar, find IPv4 and click it to change to that tab.

Change to IPv4 Tab

If your system is using an IPv6 address, then you need to switch to that tab instead.

5. We are now in the right place to configure a static IP address for our Ubuntu 20.04 system.

Before we can set the static IP address, we must change the DHCP mode from “ automatic ” to “ manual ” ( 1. )

Switching DHCP to manual mode, we will be able to specify the address ( 2. ), netmask ( 3. ), and gateway ( 4. ).

Address – This is the static IP address that you want your computer to assign to itself when it connects to the router.

Netmask – A netmask is used to split an IP address down into subnets. For our example, we will use the netmask “ 255.255.255.0 “.

Gateway – The gateway needs to be set to the router’s IP address you are connecting through. The gateway is the device that typically assigns your device its IP address and gives you access to the rest of the network.

With all three values set, you need to save them. You can save the settings by clicking the “ Apply ” ( 5. ) button located in the top right of the window.

Once you have set all three of these values, click the “ Apply ” button ( 5. ) in the window’s top right corner.

Setting the static IP Address on Ubuntu 20.04

7. We now need to restart your device to ensure that it is getting the correct IP address.

Once your Ubuntu device finishes restarting, we can verify everything is working by using the terminal. You can open the terminal quickly by pressing CTRL + ALT + T .

8. Run the following command on your Ubuntu device to show your network interfaces’ status.

If setting the static IP address has worked correctly, you should see it listed as inet YOURSTATICIPADDRESS

At this stage, you should now have your Ubuntu 20.04 installation set up with a static IP address.

While DHCP reservation will always be the best option for setting a static IP, it is still possible to configure Ubuntu to request one.

If you run into issues with setting a static IP, feel free to leave a comment below.

You can also check out our other Ubuntu tutorials that help you configure the operating system to your needs.

Receive our Raspberry Pi projects, coding tutorials, Linux guides and more!

Thank you for subscribing

Recommended

Home Assistant Roborock

Great guide, thank you, it worked!

One improvement would be to stress the importance of the correct number of spaces used in the YAML configuration for indentations; using multiples of 4 spaces (and not to use tabs), such as this example illustrated with hyphens:

This has had me banging my head against a brick wall in the past for hours; more talk about it in these guides for would really help those just learning.

Also a little explanation as to why some IP addresses are in square brackets and some are not would be helpful too, I’ve also wasted hours on this in the past too.

Many thanks, Scott

yamllint works wonders 😉

Saved me hours of headbanging in Ansible.

YAML files are literally defined by their physical structure (line indentation).

A YAML file represents nested, or hierarchical attributes. The literal indentation levels tell us (and the computer) how to interpret that nested structure. That is why the indentation must align perfectly. A standard four spaces per indentation level is preferred for human reading, especially for deeply nested structures.

The square brackets around the IP addresses denote a LIST of values in a YAML file (notice the preceding labels are both “plural” , as in “addresses:” – they are asking for one or more values in a LIST format).

I hope that helps to clarify things in this example.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Setting a Static IP in Ubuntu – Linux IP Address Tutorial

Zaira Hira

In most network configurations, the router DHCP server assigns the IP address dynamically by default. If you want to ensure that your system IP stays the same every time, you can force it to use a static IP.

That's what we will learn in this article. We will explore two ways to set a static IP in Ubuntu.

Static IP addresses find their use in the following situations:

  • Configuring port forwarding.
  • Configuring your system as a server such as an FTP server, web server, or a media server.

Pre-requisites:

To follow this tutorial you will need the following:

  • Ubuntu installation, preferably with a GUI.
  • sudo rights as we will be modifying system configuration files.

How to Set a Static IP Using the Command Line

In this section, we will explore all the steps in detail needed to configure a static IP.

Step 1: Launch the terminal

You can launch the terminal using the shortcut Ctrl+ Shift+t .

Step 2: Note information about the current network

We will need our current network details such as the current assigned IP, subnet mask, and the network adapter name so that we can apply the necessary changes in the configurations.

Use the command below to find details of the available adapters and the respective IP information.

The output will look something like this:

image-14

For my network, the current adapter is eth0 . It could be different for your system

  • Note the current network adapter name

As my current adapter is eth0 , the below details are relevant.

It is worth noting that the current IP 172.23.199.129 is dynamically assigned. It has 20 bits reserved for the netmask. The broadcast address is 172.23.207.255 .

  • Note the subnet

We can find the subnet mask details using the command below:

Select the output against your adapter and read it carefully.

image-15

Based on the class and subnet mask, the usable host IP range for my network is: 172.23.192.1 - 172.23.207.254 .

Subnetting is a vast topic. For more info on subnetting and your usable IP ranges, check out this article .

Step 3: Make configuration changes

Netplan is the default network management tool for the latest Ubuntu versions. Configuration files for Netplan are written using YAML and end with the extension .yaml .

Note: Be careful about spaces in the configuration file as they are part of the syntax. Without proper indentation, the file won't be read properly.

  • Go to the netplan directory located at /etc/netplan .

ls into the /etc/netplan directory.

If you do not see any files, you can create one. The name could be anything, but by convention, it should start with a number like 01- and end with .yaml . The number sets the priority if you have more than one configuration file.

I'll create a file named 01-network-manager-all.yaml .

Let's add these lines to the file. We'll build the file step by step.

The top-level node in a Netplan configuration file is a network: mapping that contains version: 2 (means that it is using network definition version 2).

Next, we'll add a renderer, that controls the overall network. The renderer is systemd-networkd by default, but we'll set it to NetworkManager .

Now, our file looks like this:

Next, we'll add ethernets and refer to the network adapter name we looked for earlier in step#2. Other device types supported are modems: , wifis: , or bridges: .

As we are setting a static IP and we do not want to dynamically assign an IP to this network adapter, we'll set dhcp4 to no .

Now we'll specify the specific static IP we noted in step #2 depending on our subnet and the usable IP range. It was 172.23.207.254 .

Next, we'll specify the gateway, which is the router or network device that assigns the IP addresses. Mine is on 192.168.1.1 .

Next, we'll define nameservers . This is where you define a DNS server or a second DNS server. Here the first value is   8.8.8.8 which is Google's primary DNS server and the second value is 8.8.8.4 which is Google's secondary DNS server. These values can vary depending on your requirements.

Step 4: Apply and test the changes

We can test the changes first before permanently applying them using this command:

If there are no errors, it will ask if you want to apply these settings.

Now, finally, test the changes with the command ip a and you'll see that the static IP has been applied.

image-17

How to Set a Static IP Using the GUI

It is very easy to set a static IP through the Ubuntu GUI/ Desktop. Here are the steps:

  • Search for settings .
  • Click on either Network or Wi-Fi tab, depending on the interface you would like to modify.
  • To open the interface settings, click on the gear icon next to the interface name.
  • Select “Manual” in the IPV4 tab and enter your static IP address, Netmask and Gateway.
  • Click on the Apply button.

image-16

  • Verify by using the command ip a

image-18

In this article, we covered two methods to set the static IP in Ubuntu. I hope you found the article useful.

What’s your favorite thing you learned from this tutorial? Let me know on Twitter !

You can read my other posts here .

I am a DevOps Consultant and writer at FreeCodeCamp. I aim to provide easy and to-the-point content for Techies!

If you read this far, thank the author to show them you care. Say Thanks

Learn to code for free. freeCodeCamp's open source curriculum has helped more than 40,000 people get jobs as developers. Get started

Post thumbnail

How to set a static IP on Ubuntu Server 20.04

Previous versions of Ubuntu Server used a file under /etc/network to configure static IP addresses, but this has been changed in later versions of Ubuntu. When installing Ubuntu Server, a tool called NetPlan will probably configure your address with DHCP during the cloud-init step. To set a static IP we will need to keep using NetPlan to change from using DHCP, fortunately it is still easy to do.

First we need to find out the name of the ethernet device we want to set a static IP for, we can list them by typing ip add . This is what it could look like after I've stripped some of the lines for readability.

Here we only have two interfaces, and the first one is the loopback which we can ignore. That means the one we want to set a static IP address for is ens18 . If you do have more interfaces you need to find out which one is the correct one. You can check the MAC address or inet if that is the currently used IP address.

Next step is to add the configuration to the file /etc/netplan/01-netcfg.yaml with sudo privileges. If it doesn't already exist you can create it. Change the values to match your needs and make sure the indentation is correct since this is a yaml file.

If you're not running your own DNS server (which I recommend you do if you are tech savvy enough reading this) you can enter your router's, ISP's or even better 9.9.9.9 .

In case you are wondering, the /24 at the end of the address is called "CIDR notation" and is specifying what subnet we are using. Unless you know what you want you can keep it at /24 . It means the addresses in this subnet range from 192.168.1.0 to 192.168.1.255.

When you are done with the configuration you can apply the settings with netplan apply and you should be good to go.

LinuxOPsys

Configure Static IP Address on Ubuntu 20.04 (Server CLI and Desktop)

set ip ubuntu server

In your IT environment, sometimes you may be compelled to configure a static IP instead of relying on the DHCP protocol. A perfect example is when you are setting up a Ubuntu server to act as a file or a web server for your organization. A static IP, as the name suggests, ensures that the IP address of your system remains unchanged. With DHCP, the IP address changes once the lease time for the IP address expires and this is undesirable for servers.

In this guide, we will explore two ways of manually assigning a static IP on Ubuntu 20.04. We will demonstrate how you can configure a static IP on an instance of Ubuntu server and Ubuntu desktop.

Assign a static IP on Ubuntu server 20.04

From Ubuntu 17.10 and later versions, networking is controlled by the Netplan feature. The configuration files for Netplan are located in the /etc/netplan directory and are written in YAML. Inside this directory, you will find YAML configuration files labeled either 50-cloud-init.yaml , or 00-installer-config.yaml .

However, If you are running a cloud instance of Ubuntu, chances are that it is managed by cloud-init which auto-assigns it an IP address by leveraging the DHCP protocol. Before we proceed further, you need to disable cloud-init. To achieve this, open the subiquity-disable-cloudinit-networking.cfg cloud-init configuration file in the /etc/cloud/cloud.cfg.d/ directory

Set the ' network ' directive to ' disabled '.

Save the changes and quit. Next, head over to the Netplan configuration file. In my case, I have the 00-installer-config.yaml file.

set ip ubuntu server

From the configuration file, we can see the ' network' directive that has 2 elements. The first one is the ' ethernets ' which specifies the network interface and the second one is the version of the renderer which is ' systemd-networkd ' for non-GUI instances and NetworkManager for Ubuntu desktop ( With GUI )

Default Netplan configuration file

We are going to set the ' dhcp4 ' value to ' no ' to disable the DHCP protocol and specify the interface's Static IP as follows.

To assign a static IP address to  ens3  interface, modify the file as follows:

  • Specify the static IP address of the server. in the   addresses : section, specify an IPv4 address to be assigned to the network interface.
  • Next, Specify the gateway.
  • Under  nameservers , specify the DNS or IP addresses of the nameservers. Here, we have specified Google's DNS which is 8.8.8.8 and the Router's IP.

Set Static IP on Ubuntu 20.04

Save the YAML file and exit. To apply the changes made, run the command:

You can use the ifconfig or ip command to verify that your network interface is set to use the static IP configured moments ago.

Netplan apply

Additionally, you can use the IP route show command to display the new routes on your system.

Show IP routes on a Linux system

Perfect! We have successfully configured a static IP on the Ubuntu server. Let's now switch gears and see how you can replicate the same on Ubuntu Desktop 20.04

Configure Static IP on Ubuntu 20.04 Desktop

If you are running a Desktop GUI, then configuring a static IP should be quite easy. Click on the ' Network icon ' at the top right corner of your screen and select the 'Wired Settings ' option.

Select Wired settings option

This opens the 'Network ' configuration page. In the 'Wired ' section, click on the gear wheel icon.

Network settings page

This displays a summary of your current IP configuration. By default, the system obtains its IP configuration via the DHCP protocol. We will change from using DHCP to Manual.

Ubuntu Desktop IP configuration

So, click on the ' IPv4 ' tab which directs you to this section. As anticipated, DHCP is turned on.

IPv4 configuration on Ubuntu 20.04

Switch from ' Automatic (DHCP) ' to ' Manual '. Then specify the static IPv4 address including the netmask, gateway, and DNS servers. To save the changes, click on the ' Apply ' button.

Configure static IP Ubuntu 20.04

Head back to the ' Network' section and restart the networking service by toggling off and on.

Restart NetworkManager on Ubuntu 20.04

Once again, click on the gear wheel icon and confirm that the static IP settings have reflected.

Confirm static IP settings

And it's as simple as that. We have successfully configured a static IP on Ubuntu Desktop.

Ubuntu, like most other systems, comes configured with DHCP to obtain an IP from the DHCP server, or router. In this guide, we have covered how you can apply static IP settings on command-line and using the GUI. Before setting a static IP, it's always recommended to reserve the IP that you want to assign to your server on the router. Equally important is to ensure that no other client system is using that IP address to avoid an IP conflict.

If this resource helped you, let us know your care by a Thanks Tweet. Tweet a thanks

Like

Sorry about that.

Nmap to Scan Open Ports – Examples + Screenshots

How to List Network Interfaces in Linux

How to Get IP address in Linux

How to Permanently add Static Route in Linux

Ping IPv6 Address from Windows and Linux CLI

How to Check Ports in Use in Linux (Listening Ports)

Tshark Examples with Cheat Sheet

Leave a Reply

Leave a comment cancel reply.

How to set a static ip address in Ubuntu Server 20.04

  • 16 Jun 2023
  • Louis Sanchez

When you install Ubuntu server, its network setting defaults to dynamic IP addressing, that is, the network management daemon in Ubuntu searches for a DHCP server on the connected network and configures the network with the IP address assigned by DHCP. Even when you start an instance in the cloud, the network is configured with dynamic addressing using the DHCP server setup by the cloud service provider. In this chapter, you will learn how to configure the network interface with static IP assignment.

Follow these steps to connect to the network with a static IP:

Step 1 : Open /etc/netplan/50-cloud-init.yaml and find the following lines:

set ip ubuntu server

Step 2 : Change the preceding lines to add an IP address, net mask, and default gateway (replace samples with the respective values):

set ip ubuntu server

Step 3 : Then run sudo netplan apply

set ip ubuntu server

Step 4 : Try to ping a remote host to test the network connection

  • Ubuntu Server 20.04

set ip ubuntu server

Tecmint: Linux Howtos, Tutorials & Guides

How to Configure Static IP Address on Ubuntu 20.04

Usually, when a client system connects to a network via WiFi or an ethernet cable, it automatically picks an IP address from the router. This is made possible through the DHCP server which auto-assigns IP addresses to clients from a pool of addresses.

The drawback with DHCP is that once the DHCP lease time has lapsed, the IP address of a system changes to a different one, and this leads to a disconnection in case the system was used for a particular service such as a file server. For this reason, you may want to set a static IP address so that it never changes even when the lease time is up.

In this guide, you will learn how to configure a static IP address on Ubuntu 20.04 server and desktop.

Network Configuration

Ubuntu uses the NetworkManager daemon for managing network configuration. You can configure a static IP either graphically or on the command line.

For this guide, we will focus on setting a static IP address using both the GUI and on the command line, and here is the IP configuration:

This information will be different for you, so replace the values accordingly according to your subnet.

On this page

  • Set Static IP Address on Ubuntu 20.04 Desktop
  • Set Static IP Address on Ubuntu 20.04 Server

How to Set Static IP Address On Ubuntu Desktop

To get started, Launch ‘ Settings ’ from the application menu as shown.

Ubuntu Settings

On the window that appears, click on the ‘ Network ’ tab at the left sidebar and then hit the gear icon on the network interface that you wish to configure. In my case, I’m configuring my wired interface.

Ubuntu Network

In the new window that appears, your interface’s network settings will be displayed as shown. By default, the IP address is set to use DHCP to automatically pick an IP address from the Router or any other DHCP server.

In our case, the current IP address assigned is 192.168.2.104 .

Ubuntu Network Configuration

Now select the IPv4 tab to start setting the static IP address. As you can see, the IP addressing is set to Automatic (DHCP) by default.

Ubuntu Network Method

Click on the ‘ Manual ’ option and new address fields will be displayed. Fill out your preferred static IP address, netmask, and default gateway.

Set Manual Network

The DNS is also set to automatic. To manually configure the DNS, click on the toggle to turn off Automatic DNS. Then provide your preferred DNS entries separated by a comma as shown.

Set Network DNS

Once all is done, click on the ‘ Apply ’ button at the top right corner of the window. For the changes to apply, restart the network interface by clicking on the toggle to disable it and enable it again.

Enable Network Connection

Once again, click on the gear icon to reveal the new IP configuration as shown.

Verify Network Configuration

You can also confirm the IP address on the terminal by running the ifconfig or ip addr command .

Check IP Address

To confirm the DNS servers, run the command:

Check DNS Servers

How to Set Static IP Address on Ubuntu Server Using Netplan

We have seen how we can configure a static IP address graphically on Ubuntu 20.04 desktop. The other option is configuring a static IP address on the terminal using Netplan .

Developed by Canonical, Netplan is a command-line utility used to configure networking on modern Ubuntu distributions. Netplan makes use of YAML files to configure network interfaces. You can configure an interface to acquire an IP dynamically using DHCP protocol or set a static IP.

Open your terminal and head over to the /etc/netplan directory. You will find a YAML configuration file which you will use to configure the IP address.

In my case the YAML file is 01-network-manager-all.yaml with the default settings as shown.

Netplan YAML File

For the Ubuntu server, the YAML file is 00-installer-config.yaml and these are the default settings.

Default Network Settings

To configure a static IP, copy and paste the configuration below. Be mindful of the spacing in the YAML file.

Next, save the file and run the netplan command below to save the changes.

You can thereafter confirm the IP address of your network interface using the ifconfig command .

Check Ubuntu Server IP Address

This wraps up today’s article. We hope you are now in a position to configure a static IP address on your Ubuntu 20.04 desktop & server system.

Hey TecMint readers ,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE , RHCSA , LFCS , Learn Linux , and Awk , each worth $20 !

Learn more about the contest and stand a chance to win by sharing your thoughts below !

set ip ubuntu server

Previous article:

Next article:

Photo of author

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Related Posts

Configure Network Ethernet Connection Using nmcli Tool

How to Configure Network IP Connections Using ‘nmcli’ in Linux

Linux IP Address

A Beginner’s Guide to Configuring IPv4 and IPv6 Addresses in Linux

Differences Between IPv4 and IPv6

What’s Wrong with IPv4 and Why We Are Moving to IPv6

Linux Network Information Tool

What IP – A Network Information Tool for Linux

Configure Network Interface in CentOS 7

How to Configure Network Static IP Address on RHEL/CentOS 8/7

Create NIC Teaming in CentOS

How to Create NIC Teaming or Bonding in CentOS 8 / RHEL 8

21 Comments

DHCP is that once the DHCP lease time has lapsed, the IP address of a system changes to a different one, and this leads to a disconnection in case the system was used for a particular service such as a file server.

For this reason, you may want to set a static IP address so that it never changes even when the lease time is up.

Thanks for documenting this. However, after a reboot, I am left with the old IP address (DHCP). Guess there is another process that overrules the yaml file, but what??

Hey Pieter, that’s awkward. Ideally, the IP should not change since it’s a static IP. Did you try out both procedures. I’m just curious.

I had a static IP in the yaml file and this does not get an update if you adjust its IP via.

netplan ip a prior to gui adjustments gui DHCP => ip DHCP Gui static ip b => ip a It seems that netplan is not updated via GUI adjustments Enjoy the coffee ‘)

Could this lead to a clash of IP addresses between two computers on the same network? Another computer (computer B) which gets its IP address dynamically comes online when the computer with the static IP (computer A) is offline.

The dhcp server could assign the IP to computer B. Subsequently, when computer A comes online and tries to join the network there would be an IP conflict and both computers could end up not being able to connect to network resources or perform other network operations.

In some routers, this can be managed by restricting the range of IP addresses that the router can dynamically assign. Many routers don’t have that option.

To avoid the potential of such conflicts, I assign static IP addresses on the dhcp server to computers on the network based on the MAC addresses of their NICs.

I would appreciate your thoughts on how to prevent IP conflicts when the network is made of some devices that have static in and others have dynamic IP addresses assigned to them. This scenario is more common today where network devices like smart phones, tablets, smart TVs, and media streaming devices connecting to the network.

Managing IP addresses by MAC addresses is a pain and it would be very helpful if there is an easier way to prevent IP conflicts.

Your concern is very valid. To avoid a conflict in IP address assignment in a network, as you have just described, consider reserving the IP assigned to the server on the router. Say for example, if you want to assign Server A an IP of 172.16.0.100, simply login into your router and reserve the IP address. This prevents the IP from being made available to client PCs & other network devices via the DHCP protocol.

Ideally, before the static assignment, proper mapping of your network is advised so as to know which device is using which IP address. You can use nifty tools like Nmap to scan your network to get to know which IP addresses are in use to avoid assigning a duplicate IP statically on the server.

I hope this answers your question.

Wonderful post. Very simple and to the point. Thank you!!!! Keep it up!!!

Thank you very much Jaidev Shah. Keep it Tecmint.

Hi, why when we use the desktop method, the interfaces file does not get updated ? Where does the desktop tool write the information ?

That’s actually a very interesting question and I did not think about it before. I just configured a static IP on one of my Ubuntu boxes and used grep from /etc/ folder recursively to search for that IP. The IP address was written in:

/etc/NetworkManager/system-connections/Wired\ connection\ 1

So if you need to look where the desktop tool has written your settings, you can look at:

/etc/NetworkManager/system-connections/

Hey Marin, thanks for your contribution. I hadn’t actually seen it from that angle. Quite interesting I must say.

Great article just wondering about this part: “Remember to replace “enp0s3” with the name of your network adapter??? what do u mean by this? do you mean we should not change this name enp0s3 or changed with our network adapter? Cheers

Means, you should change “enp0s3” with your network adapter name for example, eth0 or eth1..

Sorry for my english, I would put a secondary IP in the same interface, like old versions (eth0 192.168.1.100… eth0:1 10.10.0.100) I know how to do it in the old versions, but in version 15.10, they have changed the commands. Can you help me?

Hello Nikon,

As the answer of this question is too long for the comment section, I would recommend you to submit your question to our Linuxsay discussion forum, where we will gladly provide more details:

http://linuxsay.com/

Where do the Nameserver numbers obtained? Elaborate on “Make sure to use your own settings depending on the network to which you are connected to.”

Can you please expand on this? IMPORTANT NOTE: For the purpose of this tutorial, I will be using the following settings:

IP Address: 192.168.0.100 Netmask: 255.255.255.0 Gateway: 192.168.0.1 Nameserver: 8.8.8.8 Nameserver: 8.8.4.4 Make sure to use your own settings depending on the network to which you are connected to. Where do you obtain the Nameserver numbers?

This depends on few things:

If your machine is connected to a router, you should see the settings in there.

If you are plugging your ISP’s internet cable directly to your computer (i.e no router, modem etc), you should use your ISP’s settings.

I want 1st IP by DHCP and 2nd static but, in Ubuntu 15.10 mi interface isn’t eth0 it is eno1 and if I put eno1:1 don’t works.

Actually the init script does exactly that – it calls systemctl. You can see it in the screenshot:

“restarting networking (via systemctl): networking service”

Both scripts do the same.

Why not use systemd to restart networking directly?

`systemctl restart network`

Got Something to Say? Join the Discussion... Cancel reply

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.

Save my name, email, and website in this browser for the next time I comment.

TechRepublic

Account information.

set ip ubuntu server

Share with Your Friends

How to configure a static IP address in Ubuntu Server 18.04

Your email has been sent

Image of Jack Wallen

From the office of, “If it’s not broken don’t fix it” comes this: In Ubuntu Server , there’s a brand new method of setting IP addresses. Gone are the days of manually editing the flat text /etc/network/interfaces file. In its place is netplan. That’s right, Ubuntu fans, the method you’ve known for years is now a thing of the past. Instead of a very simple text file, Ubuntu Server requires editing a .yaml file (complete with proper adherence to correct code indent for each line of the block), in order to configure your IP addressing.

Before you panic, it’s not all that challenging. In fact, it’s really just a matter of understanding the layout of these .yaml files and how networking is now restarted. I’m going to show you just that, such that you can configure a static IP address in Ubuntu Server 18.04 as easily as you could in 16.04.

The new method

Open up a terminal window on your Ubuntu 18.04 server (or log in via secure shell). Change into the /etc/netplan directory with the command cd /etc/netplan . Issue the command ls and you should see a file named 50-cloud-init.yaml . If you don’t also see a file named 01-netcfg.yaml , create it with the command sudo touch 01-netcfg.yaml . Before we edit that file, we need to know the name of our networking interface. Issue the command ip a and you should see your system network interface listed by name ( Figure A ).

set ip ubuntu server

Now we’re going to create a new netplan configuration file. If you don’t see the 01-netcfg.yaml file, create one with the command sudo nano 01-netcfg.yaml . Our file is going to look like that which you see in Figure B .

set ip ubuntu server

What’s crucial about the layout of this file is not using the exact same spacing as my example, but that you’re consistent. If you’re not consistent with your indents, the file will not work. What you see in that sample file is all you need to configure that static IP address. Do notice, you aren’t setting the address is the same fashion as you did with Ubuntu 16.04. With the old method, you set IP address and netmask like so:

address = 192.168.1.206 netmask = 255.255.255.0

With netplan, these are set with a single line:

addresses : [192.168.1.206/24]

Restarting/testing networking

With the new method, you must restart networking using netplan. So once you’ve configured your interface, issue the command:

sudo netplan apply

The above command will restart networking and apply the new configuration. You shouldn’t see any output. If networking fails to function properly, you can issue the command:

sudo netplan --debug apply

The output of the command ( Figure C ) should give you some indication as to what’s going wrong.

set ip ubuntu server

That’s all there is to it

There ya go. That’s all there is to configuring a static IP address in Ubuntu Server 18.04. Remember, you’ll have to do this for each interface you have on your server. Make sure to name the files something like 01-netcfg.yaml and 02-netcfg-yaml. It’s not terribly difficult, once you’re used to not working with that old-school interfaces file.

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays

  • How to install Ubuntu Server 18.04
  • How to enable remote desktop connections in Ubuntu 18.04
  • How to enable an automatic purge of temp files in Ubuntu 18.04
  • How to connect Ubuntu 18.04 to your Google account
  • Ubuntu 18.04 LTS: The Linux for AI, clouds, and containers

Image of Jack Wallen

Create a TechRepublic Account

Get the web's best business technology news, tutorials, reviews, trends, and analysis—in your inbox. Let's start with the basics.

* - indicates required fields

Sign in to TechRepublic

Lost your password? Request a new password

Reset Password

Please enter your email adress. You will receive an email message with instructions on how to reset your password.

Check your email for a password reset link. If you didn't receive an email don't forgot to check your spam folder, otherwise contact support .

Welcome. Tell us a little bit about you.

This will help us provide you with customized content.

Want to receive more TechRepublic news?

You're all set.

Thanks for signing up! Keep an eye out for a confirmation email from our team. To ensure any newsletters you subscribed to hit your inbox, make sure to add [email protected] to your contacts list.

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

How to setup a static IP on Ubuntu Server 18.04

I've seen some people saying the file to set static ip is still /etc/network/interfaces

And I've seen other people saying that in 18.04 it's now on /etc/netplan (which people seem unhappy about)

I've tried putting this:

In my /etc/netplan/50-cloud-init.yaml and doing sudo netplan apply but that just kills the servers connection to the internet.

Pablo Bianchi's user avatar

  • 1 Is it a desktop or a server? –  user68186 Commented Apr 29, 2018 at 5:10
  • 1 Is this a fresh 18.04 install or upgrade from another version? –  WinEunuuchs2Unix Commented Apr 29, 2018 at 5:16
  • Sorry I should've said this in the text, its a fresh install of 18.04 server. –  final20 Commented Apr 29, 2018 at 5:25
  • The most simple solution for me was, to specify a static IPv4 address right during installation (together with subnet, gateway, etc.). Simply fill out some wizard fields, no messing with configuration files. –  Uwe Keim Commented Oct 9, 2018 at 10:01
  • You can also do this on routers. Steps are self-explanatory in the router config. –  EODCraft Staff Commented Jan 12, 2019 at 10:25

11 Answers 11

All the answers telling you to directly edit /etc/netplan/50-cloud-init.yaml are wrong since CloudInit is used and will generate that file. In Ubuntu 18.04.2 it is clearly written inside the file :

So you should not edit that file but the one under /etc/cloud/cloud.cfg.d/ if you still want to use CloudInit.

Another way is to completely disable CloudInit first by creating an empty file /etc/cloud/cloud-init.disabled (see https://cloudinit.readthedocs.io/en/latest/topics/boot.html ) and then the other answers are OK. Under Ubuntu 18.04.2 I had to use dpkg-reconfigure cloud-init to let it take into account the file /etc/cloud/cloud-init.disabled . I think this is a little bit weird.

I suggest you to rename the file (not the right name since 50-cloud-init.yaml let us think it still uses CloudInit).

Then you may end up with a file name /etc/netplan/01-netcfg.yaml which contains the configuration below. Note the use of the networkd renderer instead of NetworkManager because the configuration is on a server.

Ludovic Kuty's user avatar

  • 4 It works great. This should be the best answer. 50-cloud-init.yaml as stated shouldn't be modified. –  Relic Commented Jun 26, 2019 at 13:11
  • 3 If still using CloudInit, you need to do a sudo cloud-init clean -r to get the change to take, as per veperr's answer (at least for me on Ubuntu Server 18.04.3). –  Stuart Rossiter Commented Aug 8, 2019 at 11:59
  • 1 ...plus the renderer line is no longer valid it seems (and is missing in the base version of the file that you edit). –  Stuart Rossiter Commented Aug 27, 2019 at 10:26
  • Simply adding a custom file under /etc/netplan/##-*.yaml works as well. Such as: "/etc/netplan/99-custom-network.yaml". This also follows the netplan.io/examples instructions. In "conf.d" type config areas you should always opt for a custom/new file if possible instead of editing installed package files. It's why we have these "numbered file" areas. These default #'ed files can frequently get overwritten. And YES: If you have a "50-cloud-init.yaml", it should NOT be used. It is system generated as noted in comments. Why people keep posting this as an answer is anyone's guess? –  B. Shea Commented Dec 13, 2021 at 15:59
  • 1 Yep. But, you can add it directly to /etc/netplan . Any new files under this area will persist through reboots. I gave you +1 for 1: saying not to edit cloud-init, and 2: Creating a new file in a numbered area (& not editing ANY preexisting/system ones). Note: You do not even necessarily need to disable anything so long as you are updating the same network interface. A higher numbered yaml will override all previous repeated directives (or should). So "50-" will be read in AFTER "01-". If you renamed your file "99-" you wouldn't have to disable "50-" - if that makes sense. See my answer –  B. Shea Commented Dec 13, 2021 at 16:34

This is set a static IP instruction in Ubuntu-Server 18.04 and 20.04

Then replace your configuration, for example, the following lines:, apply changes:.

In case you run into some issues execute:

  • /24 is equivalent with 255.255.255.0
  • ens160 is your ethernet name, you can get it using $ ifconfig
  • Ubuntu 16.04 and 14.04 network-interface configuration have a different method.
  • The file is in YAML format : Use spaces, no tabs.

Benyamin Jafari's user avatar

  • not able to ping after assigning static IP address –  gjois Commented Mar 3, 2019 at 14:55
  • OK....I'm able to ping after doing service networking restart –  gjois Commented Mar 3, 2019 at 15:42
  • 7 I wouldn't do that since that file is generated by CloudInit –  Ludovic Kuty Commented Mar 13, 2019 at 7:48
  • only works if your ethernet is "ens160", check your ethernet "ls /sys/class/net/" and replace "ens160" with it. –  sailfish009 Commented Mar 17, 2020 at 3:40
  • @sailfish009 I mentioned it before in the NOTE section in my answer. –  Benyamin Jafari Commented Mar 17, 2020 at 6:11

I've found another way using cloud-init.

  • Edit the file /etc/cloud/cloud.cfg.d/50-curtin-networking.cfg - the contents seem to be the same as they would be in /etc/netplan.

clean, reboot and re-initialize cloud-init with this command:

That's it! Your system will reboot, cloud-init will re-initialize and pickup the change in /etc/cloud/cloud.cfg.d/50-curtin-networking.cfg and apply them to /etc/netplan/50-cloud-init.yaml and all will be well. Verify with ifconfig .

zx485's user avatar

  • 1 2 things. -> 1. Better to create your own "99-myconfig.cfg" file under /etc/cloud/cloud.cfg.d/ so it's read in last and will overwrite any previous configs and will not be overwritten by possible system updates. 2. ifconfig is defunct . Use ip command now. For example ip addr will show same thing as ifconfig use to. –  B. Shea Commented Dec 7, 2021 at 16:11

Ubuntu 18.04 uses now Netplan to configure the network interfaces, so the configuration must be done in the file /etc/netplan/50-cloud-init.yaml , the documentation advises not to mess anymore with the old file /etc/network/interfaces . I have used this configuration with my Ubuntu Server virtual machine and it works so far, just make sure the info is correct; the optional: true setting supposedly speeds up the booting time by not verifying if the interface is connected or not, this is default, also there is no need to declare values not used, for example DHCP, if they are absent they are taken as disabled, also the default renderer in Ubuntu Server is networkd so there is no need to declare it. Taking the information from your post, it should be like this:

Once you save the file, run sudo netplan --debug apply the debug flag will output more info and can help to detect any errors. Check the ethernet cable, if in virtual review the VM configuration. If using a WLAN I have read that it is a bit more tricky to setup but I haven't yet set up a machine connected to WiFi with this server version.

If you want more info about Netplan there is a website, it has some basic configuration examples.

https://netplan.io/

badger_8007's user avatar

  • 1 Wrong. DO NOT EDIT 50-cloud-init.yaml , or any existing system generated files! –  B. Shea Commented Dec 13, 2021 at 16:40

Config file is in YAML format : Don't use TAB when configuring the file. It only works with SPACE .

HubbleT's user avatar

Writing a new answer as so many are just wrong.

Do not edit 50-cloud-init.yaml , 00-installer-config.yaml or ANY system generated files/package files.

From https://netplan.io/examples/ :

"To configure netplan, save configuration files under /etc/netplan/ with a .yaml extension (e.g. /etc/netplan/config.yaml) .."

The installer/ system did that. Now you need to override it.

Also consult man netplan-generate for the rules governing how the network configurations are read from /etc/netplan/*.yaml (and elsewhere).

To correctly update the netplan area to use a static IP over the default DHCP:

Edit/Create a new file (the prepended number+dash and .yaml extension are important):

sudo nano /etc/netplan/99-custom-network.yaml

Add your properly formatted YAML to this file. A static IP example:

(Note: My network device is ens160 - not eth0 - adjust as needed.) Save. Then do a sudo netplan apply . Make sure your network interface looks right and is working ( ip ad / ping ). Then do a reboot. Retest.

This follows the netplan.io instructions as well as the general rule of not editing any existing/installed files when possible. In /etc/netplan/ and similar conf.d/ type config areas you should always opt for a high numbered custom/new file (if possible) instead of editing any installed package files.

It's why they have numbered files in these configuration areas (in /etc/netplan/ and others). The higher the number on the file equates to when it is read in.

Therefore, something with "99-" prepended on it will generally be read in last and OVERRIDE anything that repeated before it. Therefore, if a network interface is set to DHCP in "00-installer-config.yaml", and/or "50-cloud.init.yaml", the settings for the same interface in a "99-*.yaml" file will override everything else read in previously.

Generally these installed YAML files will NOT get overwritten, but that isn't valid logic to not follow the conf.d "standard" of using custom files to override and avoid editing any installed files. It doesn't take any extra time. Drop a file in netplan. Done. So, there's no excuse as I have witnessed in comments of "well, it's worked so far..".

So, editing the default netplan *.yaml(s) will technically (usually) "work", but you should avoid using them when possible.

B. Shea's user avatar

Network configuration in 18.04 is managed via netplan and configured with cloud-init. To change your network configuration edit the 50-curtin-networking.cfg file in /etc/cloud/cloud.cfg.d/ . If this file does not exist then create it.

Find your interface name

Edit / create the cloud-init network configuration file

To set a static IP address, use the addresses key, which takes a list of (IPv4 or IPv6), addresses along with the subnet prefix length (e.g. /24). Gateway and DNS information can be provided as well:

You can find more configuration options at https://netplan.io/examples

Reload the cloud-init configuration. This will reboot your server.

Ryan's user avatar

This is the setting what make it work.

restart the server

change eth0 to your adapter, find out your adapter using ifconfig.

Digerate's user avatar

  • 1 Wrong. DO NOT EDIT 50-cloud-init.yaml, or any existing system generated files! –  B. Shea Commented Dec 13, 2021 at 16:41

To find available ethernet interfaces use ip link show

Then edit the 50-cloud-init.yaml file using $sudo nano /etc/netplan/50-cloud-init.yaml

Add the configuration for available interfaces like eth0: and eth1:

Then use command $sudo netplan apply to apply the changes.

Anand Prakash Singh's user avatar

Then edit the 50-cloud-init.yaml file using $sudo vim /etc/netplan/50-cloud-init.yaml

$ sudo netplan apply

Community's user avatar

  • 1 I wouldn't do that since that file is generated by CloudInit. –  Ludovic Kuty Commented Mar 13, 2019 at 7:47
  • 1 Why oh why is every guide to setting a static IP on 18.04 telling me to edit a yaml file that says it is a dynamically created file that will not persist? Another cruel joke from the Ubuntu developers that think it is ok to just break things by default... –  Bigtexun Commented Mar 20, 2019 at 18:13
  • 1 Wrong. DO NOT EDIT 50-cloud-init.yaml, or any existing system generated files! –  B. Shea Commented Dec 13, 2021 at 16:42
  • @B.Shea I have 20+ servers running for 4 years with regular upgrades and maintenance. Never once, 50-cloud-init.yaml has been reset or overwritten. For what I have noticed, cloud-init (as the name says) is run once, at server creation and then it won't be automatically reissued again. –  Dario Fumagalli Commented Mar 2, 2022 at 3:34
  • 1 @DarioFumagalli Only 4 years? You're using broken logic: Just because nothing "broke" doesn't mean you are doing it the proper way. You should NEVER edit system installed config files if there is a way to avoid it. And there is clearly a way to avoid it in this case.. –  B. Shea Commented Mar 2, 2022 at 13:07

This worked for me:

[172.23.4.2/24, ] is the additional thing I did on the yaml file.

Reference: https://serverspace.io/support/help/how-to-configure-static-ip-address-on-ubuntu-18-04/

BeastOfCaerbannog's user avatar

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged networking server ip 18.04 ..

  • Featured on Meta
  • Upcoming initiatives on Stack Overflow and across the Stack Exchange network...
  • We spent a sprint addressing your requests — here’s how it went

Hot Network Questions

  • Can computer components be damaged if they stay off for a long time?
  • Does the damage from Thunderwave occur before or after the target is moved
  • These two Qatar flights with slightly different times and different flight number must actually be the same flight, right?
  • Why does black have a higher win rate in Exchange French?
  • What enforcement exists for medical informed consent?
  • Why bother with planetary battlefields?
  • Story Identification : student gets perfect score, fake helicopter plans, Bob Dylan song
  • Has the Journal of Fluid Mechanics really published more than 800 volumes?
  • How can one count how many pixels a GIF image has via command line?
  • Reproducing Ruth Vollmer's acrylic Steiner surface
  • Difference Artifacts of Quantization and Spur
  • Did Joe Biden refer to himself as a black woman?
  • Testnet deploying contracts
  • How do I know that my saddle fits me
  • Would moving the equator to the Tropic of Cancer increase Earth's arable land?
  • How can I watch a timelapse movie on the Nikon D7100?
  • Should I apologise to a professor after a gift authorship attempt, which they refused?
  • Move the equation to left side inside split environment
  • What caused the builder to change plans midstream on this 1905 library in New England?
  • Is it possible to understand in simple terms what a Symplectic Structure is?
  • Is this a Hadamard matrix?
  • When, if ever, is bribery legal?
  • Short story about a traveler who receives shelter, but after some dialogue, the traveler turns out to be a ghost or maybe Odin
  • Which "other travel websites" does Booking.com fetch reviews from?

set ip ubuntu server

Install and Configure Samba Server on Ubuntu Ubuntu 24.04

Configure the Samba server on Ubuntu 24.04 LTS Linux using this tutorial’s steps for seamless file sharing and print services to SMB/CIFS clients.

Samba is a free & open-source implementation of SMB protocol for integrating servers and desktops running Linux or Unix in environments with Microsoft’s Active Directory directory service. The software can be used as a controller for the domain or as a regular member.

Using SAMBA software, users can easily access the files, printers, and other shared resources on a company network or intranet, among other things. The best thing in almost all Linux distributions is that SAMBA is present in their repositories to install easily.

Samba uses the frequently used client/server protocols SMB (Server Message Block) or CIFS (Common Internet File System), which is nowadays an open variant of SMB. If applications are compatible with SMB or CIFS, they can communicate with the Samba Server.

Samba’s SMB/CIFS client is called “smbclient”. Some desktop variants of Linux have the Samba Client pre-installed, whereas others need to be installed manually. The source code can be found at samba.org .

Step 1: Refresh Package List

Open your Ubuntu 24.04 command terminal, run the system update command to rebuild the repository package list, and install the latest security updates.

Step 2: Installing Samba server on Ubuntu 24.04

The default repository of Ubuntu 24.04 offers the packages required to install the Samba server without any additional repository.

To check the service status of the Samba server, use this command:

To enable the service and start it automatically with system boot, here is the command:

Check Samba Server Service status on Ubuntu 24.04

Step 3: Add your user to the Samba group

Let’s add our current System user to the SambaShare group so it can access all files and folders shared under it.

Set the password for sharing: This will differ from your system password.

Note : $USER means your current user. If you want to set a different user, change $USER to the particular user name. Also, the file or folder you want to share must be accessible to that user.

Alternatively , if you want to add some other users to the SAMBA group, use:

sudo usermod -aG sambashare your-user

To set a password:

sudo smbpasswd -a your-user

Step 4: Create a directory to Share

Now, we create a custom directory that will hold the files we want to share over the network using the Samba protocol. Here we are creating a directory called “ linuxshare ” under our ubuntu user HOME . However, if want to share some existing directory then that is possible as well which we learn how in the next step.

Give ownership of the created folder to your current user:

For example, if our Ubuntu user is “ linuxshout ” then to have the rights of the created folder, the command will be like this:

Step 5: Edit the Samba Configuration:

To tell the Samba server what folder or directory we want to share over the network using SMB protocol, we need to define the same in the the Samba server’s configuration file. This file controls the settings and shares available on your Samba server.

Step 6: Add a New Samba Share:

Scroll to the bottom of the configuration file and add a new section for your share. Here’s an example configuration for a shared directory:

The given configuration is for the directory we have created, i.e., “linuxshare”. In the given configuration, you have to change the “ linuxshare ” with your directory name and “ path = ” with where the directory is located and @ ubuntu with your current system user added in the Samba group in Step 3 of this article.

Similarly, if you want to use some existing folder on your Ubuntu 24.04 to share over SAMBA, you can use the same configuration above by changing the path and directory name. For example, if we want to share the existing “ Pictures” folder of our system , then the configuration will be like this:

SAMAB Share folder configuration

Save the file by pressing Ctrl+X , hitting Y , and then Entering the keys.

Restart the SAMBA server to apply the added configuration.

Step 7: Access the shared folder.

We use Debian and Windows 11 to access the remotely shared folder on Ubuntu 24.04. You can use macOS if you want.

On Debian, Ubuntu, CentOS, and other Linux with Gnome

⇒ Go to File Manager and then click on the Other locations.

⇒ There, go to the Connect Server box and type your Ubuntu 24.04 Samba IP address in the following format:

In the above URL format, replace the IP address with your SAMBA server IP and Shared-folder-name with a folder that you have shared.

add the IP address of sSMB server

When we connect, the server asks us to enter the credentials or user and password added to the SAMBA group.

Enter the User credentials of SAMBA server

After connecting, you will have access to your shared folder and a shortcut for the same on the Debian or any other Linux you are using.

Share SAMBA folder access on Debian

On Windows 10 or 11:

If you are using a Windows system and want to mount the folder shared on Ubuntu 24.04 with the help of SAMBA, then follow these steps.

⇒ Go to This PC and right-click somewhere on the blank area to select “ Add a network location ” from the context menu.

Add a network Location

⇒ Now , enter the IP address and shared folder name in the following format:

Replace the server IP address  with your Ubuntu IP, where you have configured the SAMBA and the shared folder name.

Samba server share address

⇒ Soon , the system will ask you to enter the Username and password to access the SAMBA share folders. Enter that and hit the OK button.

Connect Samba from Windows

⇒ Finally , Ubuntu’s shared folder is mounted remotely or locally on your Windows 10 or 11 via SMB protocol.

Install SAMBA on Ubuntu 24.04 Linux

How to use Linux command to access SAMBA Share

You may be not using a GUI based operating system and in that case the command line is the only option to access the shared SAMBA directory. So, to access it, first install the Samba client and CIFS-utils.

On Debian or Ubuntu systems:

On RHEL/Oracle/Rocky/Fedora/AlmaLinux:

To connect the SAMBA Shared folder, here is the command syntax:

Replace Ip-address with the Server address where you have installed the SAMBA and LinuxShare with your shared directory and username with the user added in the SAMBA group.

Linux command to access SAMBA Share

How to mount Samba directory on Ubuntu

Now, let’s also learn the steps to mount the Shared Samba directory on Ubuntu, so that we don’t need to run the Smbclient command to connect it.

Create a Credentail file:

Let’s store our Samab credentials in a file. Create a file, for example /etc/samba/credentials, and add your username and password:

Add the following lines to this file and replace the values with your user and password used for Samba:

Save the file- Ctrl+X , Y and hit the Enter key and then secure it:

Create the Mount Point or directory:

Now, mount the share using this credentials file. Here is the command syntax to used:

Replace “ //server/share ” and “ /mnt/shared ” with your actual share path and mount point.

To access the mounted folder and its files use:

Whereas to list the files:

Other Articles:

  • Installing Minecraft Bedrock Server on Ubuntu 24.04 or 22.04 Linux

How to Install Kubuntu or KDE Plasma on Ubuntu 24.04 Server

  • Install MySQL server in Ubuntu 24.04 LTS Linux
  • Installing Node.js and NPM on Ubuntu 24.04 LTS Linux

How to Add User to Group on Ubuntu 24.04

How to Add User to Group on Ubuntu 24.04

How to Change Ubuntu 24.04 Hostname Permanently

How to Change Ubuntu 24.04 Hostname Permanently

How to install VirtualBox Guest Additions on Ubuntu 24.04 VM

How to install VirtualBox Guest Additions on Ubuntu 24.04 VM

How to Install and Configure a TFTP Server on Ubuntu 24.04

How to Install and Configure a TFTP Server on Ubuntu 24.04

How to install MySQL server in Ubuntu 24.04 LTS Linux

How to install MySQL server in Ubuntu 24.04 LTS Linux

Leave a Comment Cancel reply

Save my name, email, and website in this browser for the next time I comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed .

Memorial Day

KNOWNHOST BLOG

How to fix “dns server not responding” error.

We’ve all encountered DNS errors before. Sometimes they appear as minor errors when attempting to search for a specific web page.

Other times, they appear to web developers, designers, and WordPress site owners as more serious problems.

While DNS Server Errors are common, they can cause a drop in net site traffic and impact site performance if left too long.

Our experts at Knownhost have many ways to solve DNS issues. The most common ones will be listed below.

A glowing orange server block.

What Is The “DNS Server Not Responding” Error?

Before understanding how to fix this error, it’s important to understand what a DNS server error is.

A DNS (Domain Name System) is responsible for translating domain names into corresponding IP addresses. Think of it like a phonebook for the internet, converting domain names into machine-readable IP addresses.

When a DNS server error occurs, it means that the DNS server cannot fulfill the requested domain name resolution.

This can result in various issues, like the inability to access websites, email problems, or difficulties connecting to online services.

For a more in-depth look at DNS Server Systems, why not take a look at our expert guide ?

Common DNS Error Causes

Common DNS error causes include:

  • DNS Server Issues: Problems with the DNS server itself — like server downtime, misconfiguration, or overload — can result in DNS errors. If the DNS server is not functioning properly, it may be unable to resolve domain names.
  • Network Connectivity Issues: Issues with the network connection, like a weak or intermittent connection, can disrupt the communication between the device and the DNS server, leading to DNS errors. This typically occurs during network outages, hardware failures, or interference.
  • DNS Cache Issues: DNS cache stores previously resolved domain name and IP address mappings to improve efficiency. However, if the cache becomes outdated, corrupted, or contains incorrect entries, it can result in DNS errors.
  • Incorrect DNS Server Settings: If the DNS server addresses are misconfigured on the device or network settings, it can lead to DNS errors. This may occur due to errors when manually entering addresses or when using incorrect DNS server addresses.
  • Firewall/antivirus Software Restrictions: Firewall or antivirus software can sometimes impose restrictions on DNS requests, blocking or interfering with the communication between a device and the DNS server. Adjusting the firewall or antivirus settings may be necessary to resolve DNS errors.
  • Misconfigured Network Adapters: Network adapters on devices may have incorrect configuration settings, like incorrect IP settings or DNS server addresses. These misconfigurations can cause DNS errors when trying to connect to websites or other online services.

For more information on DNS Server Errors, why not check out our guide on DNS records , as well as all the other guides on Knownhost’s knowledge base.

Dedicated Hosting with KnownHost

If time and efficiency is an important factor in the daily running of a website, it may be preferable to pay for a dedicated hosting service.

KnownHost offers fullymanaged dedicated servers with customizable configurations. Their servers are built-to-order and provide reliable performance for demanding workloads.

With KnownHost’s dedicated servers, you can effectively address DNS issues and ensure smooth and efficient domain name resolution for your websites and applications.

GET STARTED NOW

How To Fix The ‘DNS Server Not Responding’ Error

Below are several possible solutions to the ‘DNS Server Not Responding’ Error:

  • Try Using a Different Browser: Sometimes, the issue may be specific to the browser you are using. Try accessing websites using a different browser to see if the DNS error persists.
  • Try Using a Different Device: If possible, try accessing the websites on a different device, like a smartphone or tablet, to check if the DNS error is device specific.
  • Try Restarting Your Computer: A simple restart can help resolve temporary network issues and refresh the DNS settings on your computer.
  • Try Troubleshooting Network Problems: Use the built-in network troubleshooter on your operating system to detect and fix any network-related problems automatically.
  • Mac: Go to System Preferences > Network > Assist me.
  • Windows: Open Control Panel > Network and Internet > Network and Sharing Center > Troubleshoot problems.
  • Linux: Use command-line tools like ifconfig, ping, or network manager GUI (varying based on the Linux distribution).
  • Try Using Your Computer in Safe Mode: Boot your computer into safe mode to check if any third-party applications or services are causing conflicts with the DNS resolution. If the error does not occur in safe mode, it indicates that a third-party program may be responsible.
  • Mac: Restart your Mac and hold down the Shift key until you see the Apple logo and progress bar.
  • Windows: Press the Windows key + R, type “msconfig,” go to the “Boot” tab, check “Safe boot,” and click “Apply” and “OK.” Restart your computer.
  • Linux: Restart your computer and, at the boot menu, select “Advanced options” or “Recovery mode”. Then choose the option for “Safe Mode” or “Safe Graphics Mode.”
  • Try Disabling Your Antivirus Software and Firewall: Temporarily disable your antivirus software and firewall to check if they are blocking DNS requests. If the error disappears after disabling them, adjust the settings or whitelist the necessary programs to allow DNS communication.
  • Mac: On Mac, go to System Preferences > Security & Privacy > Firewall or Privacy tab to disable the firewall. To disable antivirus, you may need to access the antivirus software’s settings and disable real-time protection, or temporarily quit the antivirus application.
  • Linux: The process for disabling the firewall and antivirus can vary depending on the Linux distribution and the specific firewall/antivirus software being used. Generally, you can disable the firewall using the terminal with commands such as “sudo ufw disable” or “sudo systemctl stop firewalld”. To disable antivirus, you’ll need to refer to the documentation or settings of the specific antivirus software installed on your Linux system.
  • Windows: On Windows, you can disable the built-in Windows Firewall by going to Control Panel > System and Security > Windows Defender Firewall > Turn Windows Defender Firewall on or off. To disable third-party antivirus software, locate the antivirus program’s icon in the system tray or open the antivirus software’s interface and look for options to disable real-time protection or temporarily turn off the antivirus program. The exact steps may vary depending on the antivirus software you are using.
  • Try Disabling Your VPN If Using One: If you are using a VPN (Virtual Private Network), temporarily disable it to see if it is causing the DNS error. Some VPN configurations can interfere with DNS resolution.
  • Try Disabling Secondary Connections: Disable any secondary network connections, such as Ethernet adapters or virtual network adapters that are not in use to avoid potential conflicts.
  • Mac: On Mac, go to System Preferences > Network. Select the secondary connection (such as Ethernet or Wi-Fi) from the list and click the “-” button to remove it.
  • Linux: Use the terminal and the appropriate commands based on your Linux distribution. For example, you can use the “ifconfig” or “ip” command to disable secondary connections. For instance, “sudo ifconfig eth1 down” will disable the “eth1” Ethernet interface.
  • Windows: Open the Control Panel and go to Network and Sharing Center. Click on “Change adapter settings” to view the network connections. Right-click on the secondary connection, such as Ethernet or Wi-Fi, and select “Disable” from the context menu.
  • Try Restarting Your Router: Power cycle your router by unplugging it from the power source, waiting for a few seconds, and then plugging it back in. This can help resolve temporary router issues.
  • Try Updating Your Network Adapter Drivers : Outdated or incompatible network adapter drivers can cause DNS errors. Visit the manufacturer’s website for your network adapter and download the latest drivers.
  • Linux: The process for updating network adapter drivers on Linux can vary depending on the distribution and the specific network adapter. It is often recommended to use the package manager of your Linux distribution to update drivers. For example, on Ubuntu, you can use the “apt” command or “Software Updater” to update drivers and packages.
  • Mac: On a Mac, network adapter drivers are usually updated as part of the macOS system updates. Keep your macOS up to date by going to the Apple menu > System Preferences > Software Update and installing any available updates. This will include updates for network adapter drivers.
  • Windows: To update network adapter drivers on Windows, you can use the Device Manager. Right-click on the Start button, select Device Manager and expand the Network adapters category. Right-click on the network adapter you want to update and select “Update driver.” Choose to search automatically for updated driver software or manually download the latest driver from the manufacturer’s website and select “Browse my computer for drivers” to install it.
  • For more information about clearing your DNS cache, browse our knowledgebase on How To Clear Your DNS Cache .
  • Try Resetting Your IP Address: Open the command prompt (Windows) or terminal (Mac/Linux) and enter the appropriate command to release and renew your IP address. For Windows, use the commands “ipconfig /release” followed by “ipconfig /renew.” For Mac/Linux, use “sudo ipconfig set en0 BOOTP” and then “sudo ipconfig set en0 DHCP.”
  • Try Disabling IPv6: If you are using IPv6, temporarily disable it and rely on IPv4 for DNS resolution. This can be done through the network adapter settings on your computer.
  • Mac: On Mac, go to System Preferences > Network. Select your network connection (e.g., Wi-Fi or Ethernet) and click on the “Advanced” button. Go to the “TCP/IP” tab and set the “Configure IPv6” option to “Off.”
  • Windows: Open the Control Panel and go to Network and Sharing Center. Click on the network connection you want to modify, then click on “Properties.” Scroll down and uncheck the “Internet Protocol Version 6 (TCP/IPv6)” option, and click “OK” to disable IPv6.
  • Linux: The process for disabling IPv6 on Linux can vary depending on the distribution. One common method is to modify the network configuration file. Open the terminal and edit the network configuration file, such as “/etc/sysctl.conf” or “/etc/default/grub,” and add or modify a line to disable IPv6. For example, you can add the line “net.ipv6.conf.all.disable_ipv6 = 1” and then restart the network service or reboot the system for the changes to take effect.
  • Try Changing Your Default DNS Server: Manually configure your network adapter settings to use a different DNS server. Public DNS servers like Google DNS (8.8.8.8 and 8.8.4.4) or Cloudflare DNS (1.1.1.1 and 1.0.0.1) are popular options.
  • Mac: System Preferences > Network > Advanced > DNS > Add desired DNS server.
  • Windows: Control Panel > Network and Sharing Center > Properties > TCP/IPv4 or TCP/IPv6 > Use the following DNS server addresses > Enter desired DNS server.
  • Linux: Edit network configuration file (e.g., /etc/resolv.conf) > Add or modify “nameserver” directive with the desired DNS server’s IP address.
  • Try Disabling the Peer-to-Peer Feature (Windows only): In Windows settings, navigate to “Update & Security” > “Delivery Optimization” and disable the “Allow downloads from other PCs” option.

Budget Dedicated Servers with Knownhost

KnownHost’s Budget Dedicated Servers offer an affordable solution for companies on a budget.

With legacy hardware at discounted prices, these servers are perfect for personal projects, development servers, or test benches.

Get the resources you need without breaking the bank and ensure reliable performance for your business at a fraction of the cost.

Frequently Asked Questions (FAQs)

Q: Is It Safe to Reset DNS?

A: Resetting DNS is safe and often helps resolve common network issues. It clears the DNS cache and resets any misconfigurations. However, make sure you have a backup of any custom DNS settings, and be aware that resetting DNS may temporarily interrupt internet connectivity until the DNS cache rebuilds.

Q: How Do I Check If My DNS Is Working Properly?

A: To check if your DNS is working properly, you can perform a DNS lookup. Use the “nslookup” command in the command prompt or terminal on Windows and enter a domain name. If you receive a valid IP address in the response, your DNS is functioning correctly.

Equally, you can use any DNS testing website if you’re struggling with any command prompts. Q: How Do I Unblock a DNS Server?

A: If you are experiencing issues with a blocked DNS server, there are a few steps you can take to resolve the problem. First, check your firewall settings to make sure that port 53 — which is used for DNS — is not blocked. Additionally, verify that your network configuration does not have any restrictions or filters that could be blocking the DNS server.

If necessary, consult your network administrator or internet service provider for assistance in unblocking the DNS server. Finally, try restarting your router and devices to refresh the network connections, as this can often help resolve connectivity issues.

Related posts:

  • How to View a Hosts File Location & Edit
  • How to Fix ECONNREFUSED Server Error in FileZilla
  • How to Password Protect a Website
  • How Google, Yahoo & Apple Changed Their Email Authentication Requirements

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications You must be signed in to change notification settings

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: After update to 29: Some headers are not set correctly on your instance #45184

@jiriks74

jiriks74 commented May 4, 2024 • edited Loading

This issue respects the following points: , not a question or a configuration/webserver/proxy issue. already reported on OR . up to date. See for supported versions. .

After update to 29 I get some errors which I've already solved in my Traefik configuration:

I checked and the headers are set. I've specifically checked the setting that it says is not set:

: headers: accessControlMaxAge: 100 sslRedirect: true stsSeconds: 63072000 stsIncludeSubdomains: true stsPreload: true forceSTSHeader: true customFrameOptionsValue: "SAMEORIGIN" contentTypeNosniff: true browserXssFilter: true referrerPolicy: "no-referrer" featurePolicy: "camera 'none'; geolocation 'none'; microphone 'none'; payment 'none'; usb 'none'; vr 'none';" customResponseHeaders: X-Robots-Tag: "noindex, nofollow"

No errors about headers which are set correctly

Community Docker image

29

Debian/Ubuntu

PHP 8.2

Apache (supported)

MariaDB

Upgraded to a MAJOR version (ex. 22 to 23)

Encryption is Disabled

system": { "debug": "false", "htaccess.RewriteBase": "\/", "memcache.local": "\\OC\\Memcache\\APCu", "memcache.distributed": "\\OC\\Memcache\\Redis", "filelocking.enabled": true, "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 6379, "timeout": 0, "password": "***REMOVED SENSITIVE VALUE***" }, "apps_paths": [ { "path": "\/var\/www\/html\/apps", "url": "\/apps", "writable": false }, { "path": "\/var\/www\/html\/custom_apps", "url": "\/custom_apps", "writable": true } ], "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "nextcloud.example.com", "onlyoffice.example.com", "192.168.0.2", "192.168.0.3" ], "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "onlyoffice": { "jwt_secret": "***REMOVED SENSITIVE VALUE***", "jwt_header": "AuthorizationJwt", "allow_local_remote_servers": true, "editors_check_interval": 0 }, "default_phone_region": "cs", "default_language": "cs", "default_locale": "cs_CZ", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "465", "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "29.0.0.19", "overwrite.cli.url": "https:\/\/nextcloud.example.com", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "3306", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "theme": "", "loglevel": 0, "maintenance": false, "overwriteprotocol": "https", "mail_smtpmode": "smtp", "mail_sendmailmode": "smtp", "has_rebuilt_cache": true, "ncd_admin_settings": { "ncd_aria2_rpc_host": "", "focusVisibleAdded": "", "ncd_aria2_rpc_token": "" }, "app_install_overwrite": [ "news", "tasks" ], "mail_smtpsecure": "ssl", "mail_smtpauth": 1, "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "maintenance_window_start": 2 } } the previous linked documentation to learn more about the errors and how to fix them. Results ======= - news - INVALID_HASH - css/custom.css Raw output ========== Array ( [news] => Array ( [INVALID_HASH] => Array ( [css/custom.css] => Array ( [expected] => 32ba88040d81aa40a3f24717e6d3e95e13df33f93c653858d6d3aae7e495befa0e4664e2fd18339f894f13ddb256bfaa952e7f3f179ad20f669f6b065d1f4ff6 [current] => b6c331110816789d9b5283b19c2c678a0b66417ab11bdb5f3f33aa172e54b7216ed2d87c63da436276e4adad79ec40bc1a8224af8ce4fde0f9ef8b1b69bae375 ) ) ) )

  • 👍 3 reactions

@jiriks74

joshtrichards commented May 5, 2024

Do each of your configured resolve to your proxy/TLS terminator ? That is, if you run from within your Nextcloud Docker container does it hit your proxy (and therefore see those headers)? That's the most common culprit since most of the tests are running from the server itself rather than you're browser these days.

Sorry, something went wrong.

@joshtrichards

jiriks74 commented May 5, 2024 • edited Loading

For whatever reason running directly from the container resolves to the container IP rather than the public one.

@mikesteele81

mikesteele81 commented May 7, 2024

I have the same problem. With Nextcloud 28 I made sure that the self-test would hit the reverse proxy's internal address by including an entry within /etc/hosts to override what DNS would otherwise provide.

jiriks74 commented May 7, 2024

Got rid of it by modifying the compose file. The setup I used as a base had a defined and that's why it resolved to the container and not the proxy.

  • 👍 2 reactions

@VPaulV

VPaulV commented May 13, 2024

I have the same issue. Could you please provide instructions on how to fix it?

jiriks74 commented May 13, 2024

Like I said, remove/change the from your compose file

  • 👍 1 reaction

@0x09AF

0x09AF commented May 19, 2024

I don't have hostname configured in my compose file, but got this error after upgrading to 29. Is there another fix?

jiriks74 commented May 19, 2024

What is your setup. Like is the server local, behind proxy, etc. What IP is the container resolving the hostbame to? (Run inside the container)

0x09AF commented May 21, 2024

I am not too sure if I have the exact same error but the symptoms are similar, appeared after upgrading to v29. Here's the error:
dig inside the container resolves the same as from the outside - to Cloudflare IPs

@wvxx

wvxx commented May 23, 2024

I'm having the same issue since upgrading to 29, dig ran from within the container resolves to my public IP address, I've no hostname set on my container as well, trusted proxies are set properly.

Any ideas? ;)
Thanks.

jiriks74 commented May 23, 2024

This seems like Nextcloud doesn't have it's hostname set properly?

If it's the same error I suspect that Nextcloud doesn't know it's url and you cannot query an empty string

wvxx commented May 23, 2024 • edited Loading

What are your proxy settings?

I might have expressed myself a bit unclearly. I mean that I get the warnings in my nextcloud admin settings despite curl telling me that all headers are enabled.

I have trusted_proxies set to IP of my traefik container as well as public IP, like I said above dig ran from the nextcloud container shows my public IP address.

0x09AF commented May 23, 2024

This seems like Nextcloud doesn't have it's hostname set properly?
My docker-compose hasn't changed in a few years I have been running Nextcloud. Could you point me to the right env variable or a line in ?
Thanks

@warioishere

warioishere commented May 24, 2024

I am also having this issue, baremetal nextcloud installation. I dont havy any ReverseProxy infront of my NC
they headers are set if i curl my domain.

@tuxArg

tuxArg commented May 26, 2024

Hi, I've just had this message too. I solved it allowing container IP login in limit_login_to_ip app. I hope it helps.

warioishere commented May 26, 2024

I dont use docker, just plain selft installation

@xundeenergie

xundeenergie commented May 29, 2024

Same here. Plain installation without container... and i get the same warnings Since upgrade to 29.

@lexxxel

lexxxel commented May 29, 2024 • edited Loading

same, I run nextcloud from a lxc container and checked with - everything looks OK from there. (My reverse proxy is also traefik on another lxc container somewhere in the network)

@kocouj1

kocouj1 commented Jun 2, 2024

I've Nextcloud 29.0.1 and have some problem. I can see that all headers are send but I'm getting security warning.

@nicolas-parmentier

nicolas-parmentier commented Jun 3, 2024 • edited Loading

Same here, running Nextcloud 29.0.1 with docker (had same behavior with 29.0.0). dig inside the container returns the public IP of my reverse proxy. Everything looks fine.
From the container, with a curl command, i can see the headers well configured:




@nick-oconnor

nick-oconnor commented Jun 5, 2024 • edited Loading

I think the probe is following redirects. With OIDC, unauthenticated requests to the root URL are redirected to the provider. I see a request for made by which is getting redirected to my provider. I'm curious if that's the request that's checking for headers. If that's the case, this issue should be reopened.

warioishere commented Jun 5, 2024 • edited Loading

I think the probe is following redirects. With OIDC, unauthenticated requests to the root URL are redirected to the provider. I see a request for made by which is getting redirected to my provider. I'm curious if that's the request that's checking for headers. If that's the case, this issue should be reopened.

very good point! Could be the cause, I am also using external auth server (SAML SSO Keycloak)
I have another private server which doesnt use the Keycloak Server for authentication, same setup, but it doesnt show the error!

@MatteoPaier

MatteoPaier commented Jun 6, 2024

I can reproduce the problem with Authentik SAML SSO. Maybe the issue should indeed be reopened (or the discussion moved to a new one).

Probably related also to .

  • 👍 4 reactions

@Patta

Patta commented Jun 7, 2024 • edited Loading

I can confirm, that all security headers are set and also approved by securityheaders.com, but after upgrading from nextcloud 28.0.6 to 29.0.2 a warning is displayed in the settings/admin/overview that some headers are not set correctly.
Plain installation with nginx.

@Ra72xx

Ra72xx commented Jun 7, 2024

Authentik, OpenID, Nextcloud in a subdir, Nginx proxy configured as officially documented, problem occurs after update to NC29. Please reopen!

xundeenergie commented Jun 10, 2024

Same here!

@gravelfreeman

gravelfreeman commented Jun 13, 2024

Why is it closed if it's not resolved yet?

joshtrichards commented Jun 13, 2024

Folks, just because you're seeing the same warning, doesn't mean it's always the same underlying cause. :-)

If you're using external authentication then sounds more relevant.

This issue is closed because the original reporter's situation was addressed (they closed it). Their cause was a DNS/hostname matter (which is a common reason for this error to occur because it means the test doesn't run against the proper service).

Other than external authentication ( ), this is a configuration matter (at least as far as known causes go).

The reason you're seeing this trigger after an upgrade is because, in part, the checks are getting better and more sensitive, but mostly because the checks are running server-side rather than client-side now. So if there are configuration problems within your server environment (i.e. mismatched DNS, weirdly configured and values in your Nextcloud , etc.) that is coming out.

So take follow-up to the help forum if you're not in the camp. ;-)

I'm in the camp. Using Traefik + SSO with Authelia. If I disable SSO, the warning disappears. Is it a config issue or there's really an issue? Because if it's only a config issue there's a lot of people waiting in this issue.

Well, the appropriate place to follow-up would be in that case :)

  • 🚀 1 reaction

No branches or pull requests

@mikesteele81

Linux Tutorials – Learn Linux Configuration

Netplan static IP on Ubuntu configuration

In this tutorial, we will discuss a netplan static IP configuration on Ubuntu Linux. Netplan allows for straightforward network IP address configuration using human-readable data-serialization language YAML. The article will also discuss a default Netplan network settings and the location of the Netplan configuration file. You have two options when configuring the IP address on your Ubuntu system, and that is either a static IP address or DHCP. A static IP address allows you to manually select your IP address by configuring it on the Linux system, whereas DHCP relies on the router or DHCP server to lease you an IP address – either a reserved one or the next available one that is currently free, depending on the setup.

In this tutorial you will learn how to:

  • Use netplan to set static IP on Ubuntu Server
  • Configure netplan to set static IP on Ubuntu Server

Netplan static ip on Ubuntu configuration

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Any Linux system
Software Netplan.io
Other Privileged access to your Linux system as root or via the command.
Conventions – requires given to be executed with root privileges either directly as a root user or by use of command
– requires given to be executed as a regular non-privileged user

Configure static IP address using Netplan

Netplan network configuration had been first introduced starting from Ubuntu 18.04, hence Netplan is available to all new Ubuntu from this version and higher. Ubuntu uses Netplan to configure static IP addesses, which utilizes a YAML syntax. This makes it easy to configure a static IP and change minute details in the future if necessary. Let’s get started with some basic understating on how netplan works on Ubuntu.

Netplan allows network configuration via both: networkd daemon or NetworkManager . networkd daemon is mainly used for server configuration, whereas NetworkManager  is used by GUI users. To switch between both you need to specify renderer explicitly via netplan configuration file.

The netplan configuration file location is set to /etc/netplan/ directory. Other possible locations are /lib/netplan/ and /run/netplan/ . Depending on your Ubuntu installation the actual Netplan configuration file can take one of the following three forms:

  • 01-netcfg.yaml
  • 01-network-manager-all.yaml
  • 50-cloud-init.yaml

In case you cannot find your configuration file, you may attempt to generate the new netplan config by executing the below command:

Netplan static ip step by step instructions

Ubuntu server.

  • To configure a static IP address on your Ubuntu server you need to find and modify a relevant netplan network configuration file. See the above section for all possible Netplan configuration file locations and forms.For example you might find there a default netplan configuration file called 50-cloud-init.yaml with a following content instructing the networkd deamon to configure your network interface via DHCP: # This file describes the network interfaces available on your system # For more information, see netplan(5). network: version: 2 renderer: networkd ethernets: enp0s3: dhcp4: yes

In case you run into some issues execute:

Ubuntu Desktop

This is a preferred way of setting the static IP address on Ubuntu Desktop. It is important to note the if your Ubuntu system is using Netplan to configure network on your hosts you need to set the renderer within the Netplan’s configuraiton file to renderer:NetworkManager .

Having the Netplan’s renderer set to networkd daemon will result in the Wired Unmanaged error.

Select wired or Wifi network settings

Closing Thoughts

In this tutorial, you saw how to configure a static IP address on an Ubuntu Linux system. We have covered a GUI and command line method here, so that users with a desktop system or server (without GUI) will be able to follow along. Your static IP address settings will persist after reboots, and you will need to manually reconfigure the IP address or revert to DHCP in order to stop using it.

Related Linux Tutorials:

  • Things to do after installing Ubuntu 22.04 Jammy…
  • Things to install on Ubuntu 22.04
  • An Introduction to Linux Automation, Tools and Techniques
  • Ubuntu 22.04 Guide
  • Linux Configuration files: Top 30 most important
  • FTP client list and installation on Ubuntu 22.04…
  • Ubuntu 22.04 System Backup and Restore
  • Linux commands: Top 20 most important commands you…
  • How to install Ubuntu 22.04 Jammy Jellyfish Desktop
  • Can Linux Get Viruses? Exploring the Vulnerability…

LXD 6.1 has been released

Introduction.

The LXD team would like to announce the release of LXD 6.1!

This is the first feature release in the new 6.x series.

Thank you to everyone who contributed to this release!

New features and highlights

Automatic ip allocation for ovn network forwards and load balancers.

The OVN network forward and load balancers now support automatic IP allocation.

Previously when creating an OVN network forward or load balancer you had to specify the external listen address on the uplink network manually. However, this could be time consuming to figure out which IPs are available and in cases where an OVN network existed inside a project the user creating the network forward or load balancer may not have had sufficient access to see the available IPs on the uplink anyway.

To solve this the lxc network forward create and lxc network load-balancer create commands now accept an optional --allocate flag. This flag can take the value either ipv4 or ipv6 to instruct LXD to allocate an IPv4 or IPv6 address respectively.

LXD will look for an unused IP in the range(s) allocated for OVN network use on the uplink network and if one is available select it for the listen address.

VM automatic core pinning load balancing

Virtual machines that don’t explicitly specify the CPU cores to use will now have their QEMU processes automatically pinned to load balanced CPU cores by LXD’s instance scheduler. This mirrors the behaviour that LXD container processes follow. LXD’s scheduler will rebalance the CPU pinning configuration when instances are added, modified or removed. This change has been added to make VM performance more predictable for latency sensitive applications.

Note: On systems that have mixed performance and efficiency cores (P+E) you may find that VM performance is decreased due to the way LXD now pins some of the VM’s vCPUs to efficiency cores rather than letting the Linux scheduler dynamically schedule them. You can use the explicit CPU pinning feature if needed to avoid this.

Documentation: CPU Pinning

Dell Powerflex Storage Data Client (SDC) kernel driver support

It is now possible to use the Dell Powerflex Storage Data Client (SDC) kernel driver with LXD powerflex storage pools. This is an alternative to using NVME over TCP which is also supported.

To enable the SDC mode, set the powerflex.mode to sdc . If the mode is not set, LXD will first try to use nvme mode and then fallback to the sdc mode.

Note that when using the SDC mode, LXD requires it to already be connected to the Dell Metadata Manager (MDM), as LXD does not set up the SDC connection itself.

Documentation: Dell PowerFlex

Removal of trust password feature

The core.trust_password server setting has been removed. This is to improve the security posture of LXD to avoid allowing the use of long-lived shared passwords for gaining access to the LXD API. This means that in order to add new clients to LXD one must now either add the certificates directly to the trust store or use join tokens.

Documentation: Trust TLS clients

Removal of hidden config option concept

Core server configuration can only be viewed by clients with admin permission. This means that the feature to not return the value of certain fields that were deemed to be sensitive is not required anymore. This exceptional behaviour of the LXD API has now been removed so that all configuration fields behave in the same way (i.e the value of the setting is returned if the client has sufficient access rights). This change only affects the loki.auth.password setting.

Tighten container mknod syscall interception capability checks to align with kernel behaviour

When using LXD’s mknod syscall interception feature, the capability checks have now been tightened to align to what the host kernel normally does. This means that only a user with CAP_MKNOD in the container’s initial user namespace can use it.

Documentation: System call interception

Drop DNS traffic to dnsmasq originating outside of the bridge network

LXD’s managed bridge networks provide a DNS service (dnsmasq) that listens on the bridge interface and is intended to provide DNS resolution for instances connected to that network only. By default LXD bridges are configured with NAT enabled and automatic RFC1918/ULA private subnet allocation. However if a bridge network is configured with a routable subnet then the dnsmasq DNS service could become reachable from outside of the bridge network.

To prevent this LXD managed bridge networks now add firewall rules to the host system to drop DNS traffic directed to the dnsmasq service that originates outside of the bridge network or the local host.

Support running VMs on hosts with >64 CPUs

An issue that prevented starting VMs on hosts that had >64 CPUs has now been fixed. There remains a limit to the number of vCPUs that can be passed into a VM guest, which is currently at 256. But VMs can be started on hosts with >256 CPUs.

Long TPM and disk directory share device name VM support and hot unplug fixes

It was not possible to use tpm and disk directory share devices with VMs when their names were >27 characters or if they contained the / character. Longer names and names with / characters are now supported.

In order to achieve this support the mount tag used for virtiofs and 9p directory shares now uses escaping and hashing to keep the mount tag compatible with QEMU.

This means that the mount tag used for an existing disk device may change when you restart the VM after switching to this release. If you rely on the lxd-agent to mount directory shares then restarting the VM will result in the updated lxd-agent using the new mount tags. If you manually mount the directory share you may need to update the mount tag used inside the guest OS.

Device names containing the - character are now escaped to -- , and the / character is escaped to - . If the total length of the name after escaping exceeds 27 characters then the mount tag will be a hashed value of the name.

Removal of armhf support for ceph

As part of our preparations for moving to the core24 base snap, ceph support for armhf architecture has been removed because it is no longer available in the Ubuntu Noble release.

Update minimum Go version to 1.22.4

The minimum version of Go required to build LXD is now 1.22.4.

Complete changelog

Here is a complete list of all changes in this release:

  • update go dependencies
  • lxd/storage/drivers/driver/btrfs/volumes: Cleanup on failure in RefreshVolume
  • lxd: Add security headers and gzip compression for the /ui/ API route
  • lxd/auth: Remove can_view_configuration entitlement.
  • lxd: Populate server config for can_edit on server .
  • lxd/auth: Decrease log verbosity on GET requests with can_edit .
  • test/suites: Remove can_view_configuration from expected permission list.
  • lxd/auth: Prevent project modifications
  • test/suites: Add test cases for project modification.
  • github: fix branch target name/version extraction logic
  • lxd/device/nic_ovn: Only stop device if network is populated
  • client: Unset project when querying permissions.
  • doc: change link colour for dark mode
  • lxc/copy.go: remove impossible condition
  • doc: update to the current version of the starter pack
  • doc: work around circular dependency
  • doc/images/alias: fix CLI instructions for changing an alias
  • doc: install extra tools inside the environment
  • lxd/instance/drivers/driver/qemu: Restore 50MB tmpfs for lxd-agent as it will likely exceed 25MB
  • doc/UI: reword status of the LXD UI
  • lxd/db/openfga: Strip whitespace
  • lxd/auth: Don’t build authorizer drivers into lxd-agent
  • Makefile: consistently use pip
  • test/suites/basic: check version number format (X.Y.Z for LTSes, X.Y otherwise)
  • lxd/storage/s3/miniod: Specify a port for minio --console-address
  • lxc: Add context to socket access errors
  • lxc/file: Get owner mode only if --gid or --uid is unset
  • doc/devices/nic: add missing spaces
  • doc/devices/unix-*: add configuration examples
  • doc/explanation: Add authorization explanation page.
  • doc: Add instructions for OIDC clients post ‘access_management’ extension.
  • doc: Update authentication page for authorization.
  • doc: Add links to authorization page.
  • doc: Add IAM related words to wordlist.
  • shared/api: Implement xerrors.Unwrap for StatusError.
  • lxd/auth: Wrap errors in api.StatusErrorf.
  • lxd/response: Wrap errors in api.StatusErrorf.
  • lxd: Wrap errors in api.StatusErrorf.
  • lxc: Wrap errors in api.StatusErrorf.
  • lxd/auth: Return appropriate HTTP error codes when getting request details.
  • lxd/request: Add a CtxTrusted context key.
  • lxd/auth: Get authentication status from request.
  • lxd/auth: Handle untrusted requests in authorizer.
  • lxd: Add trusted value to context.
  • lxd: Remove checkTrustedClient method.
  • lxd: Update allowAuthenticated access handler.
  • lxd: Remove call to checkTrustedClient .
  • lxd: Handle certificate creation from untrusted users.
  • lxd: Remove Authenticate call from operation wait handler.
  • lxd: Remove isTrustedClient call from image export handler.
  • lxd: Remove isTrustedClient call from image alias get handler.
  • lxd: Remove isTrustedClient call from image get handler.
  • lxd: Remove isTrustedClient call from images get handler.
  • lxd: Remove isTrustedClient call from images post handler.
  • lxd/project: Update cluster target restriction tests.
  • lxd/auth: Remove no-op methods from authorizer interface.
  • lxd/instance/drivers: Remove authorizer calls to no-op methods.
  • lxd/storage: Remove authorizer calls to no-op methods.
  • lxd: Remove authorizer calls to no-op methods.
  • lxd/storage/drivers/btrfs: Add createVolumeFromCopy for copy and refresh
  • lxd/storage/drivers/btrfs: Use createVolumeFromCopy when copying a volume
  • lxd/storage/drivers/btrfs: Use createVolumeFromCopy when refreshing a volume
  • doc/devices: add CLI examples for more device types
  • doc: except commands from the spelling check
  • lxc: Correctly parse remote when listing permissions.
  • lxd: Pre-check permissions when performing bulk state update.
  • scripts: Add bash completions for lxc auth
  • doc/devices/proxy: add CLI examples for proxy device
  • lxd: Improves efficiency of operation cancel with permission checker.
  • doc/devices/gpu: add configuration examples for gpu devices
  • lxd/patches: Add patchStorageSetVolumeUUIDV2
  • lxd/patches: Deactivate patchStorageSetVolumeUUID
  • lxd/storage/backend_lxd: Ensure new images have a volatile.UUID
  • lxd: Update X-Xss-Protection (deprecated) for Content-Security-Policy
  • lxd: add explanations on the security headers provided for the UI responses.
  • lxd/device/nic: fix default IP for routed NIC ( ipv4.host_address )
  • lxdmetadata: update metadata
  • build(deps): bump github.com/mdlayher/ndp from 1.0.1 to 1.1.0
  • lxd: Add security response headers to documentation
  • lxd: enable server side gzip compression on all API routes
  • scripts/bash/lxd-client: use column to select the image alias
  • scripts/bash/lxd-client: fix lxc storage <TAB>
  • scripts/bash/lxd-client: add missing keys to lxc storage <TAB>
  • scripts/bash/lxd-client: show pool names on lxc storage info <TAB>
  • scripts/bash/lxd-client: Use long option names
  • lxd/instance/drivers/common: Clone the device config
  • scripts/bash/lxd-client: add missing args to lxc network completion
  • lxc: handle GetImage logic inside dereferenceAlias
  • i18n: update .pot files
  • doc/reference: reorder pages and update the landing page
  • doc/explanation: reorder pages and update the landing page
  • lxd/storage/drivers/btrfs: Clarify fallback in case UUID discovery times out
  • lxd/storage/drivers/btrfs: Move config modifications into FillConfig
  • doc/howto: reorder pages and update the landing pages
  • doc: update the start page and add links to sections
  • doc: fix exceptions for Markdown linter
  • lxd/patches: Add selectedPatchClusterMember for patch coordination
  • lxd/patches: Add patchStorageRenameCustomISOBlockVolumesV2
  • lxd/patches: Supersede patchStorageRenameCustomISOBlockVolumes
  • lxd/patches: Add patchStorageUnsetInvalidBlockSettingsV2
  • lxd/patches: Supersede patchStorageUnsetInvalidBlockSettings
  • instance/drivers/driver_lxc: do not set “soft” limit when hard limit is set
  • incusd/instance/qemu: Fix handling of > 64 limits.cpu
  • doc: workaround for undefined references
  • lxd/api: Revert gzip compression on API
  • lxd/storage/drivers/generic: Return cleanup hooks from genericVFSCopyVolume
  • lxd/storage/drivers/ceph: Use the revert pattern for local refreshes
  • lxd/storage/drivers/dir: Use cleanup hooks from genericVFSCopyVolume
  • lxd/storage/drivers/lvm: Use cleanup hooks from genericVFSCopyVolume
  • lxd/storage/drivers/powerflex: Use cleanup hooks from genericVFSCopyVolume
  • lxd/storage/drivers/zfs: Use cleanup hooks from genericVFSCopyVolume
  • lxd/storage/drivers/generic: Return cleanup hooks from genericVFSCreateVolumeFromMigration
  • lxd/storage/drivers/ceph: Use the revert pattern for migrations
  • lxd/storage/drivers/btrfs: Use cleanup hooks from genericVFSCreateVolumeFromMigration
  • lxd/storage/drivers/dir: Use cleanup hooks from genericVFSCreateVolumeFromMigration
  • lxd/storage/drivers/lvm: Use cleanup hooks from genericVFSCreateVolumeFromMigration
  • lxd/storage/drivers/powerflex: Use cleanup hooks from genericVFSCreateVolumeFromMigration
  • lxd/storage/drivers/zfs: Use cleanup hooks from genericVFSCreateVolumeFromMigration
  • lxd/storage/backend_lxd.go: remove unused parameters
  • lxd/api_internal.go: remove impossible conditions
  • lxd: Update instance types URL
  • build(deps): bump github.com/openfga/openfga from 1.5.0 to 1.5.1
  • lxd/shared/util: create function for applying device overrides
  • lxc/utils: create function for getting profile devices
  • lxd/api_internal: eliminate duplicated code
  • lxc/init: eliminate duplicated code
  • lxc/copy: apply profile expansion on device override
  • test: add test for device overriding on copy
  • i18n: update translations
  • grafana: connect nulls and use instant type where appropriate
  • grafana: add legend to stats
  • shared: Move ParseIPRange to shared/
  • lxd/network: Use shared.ParseIPRanges
  • actions: add notification for doc PRs
  • doc: remove nesting for the tutorial
  • actions: fix notification for doc PRs
  • doc/server settings: change display of /etc/sysctl.conf settings
  • api: Add storage_volumes_all extension
  • shared/api: Add Pool field to api.StorageVolume
  • lxd: Remove uncecessary parameter from URL function
  • shared/api: Update call to URL function
  • lxd: Remove uncecessary parameter from storagePoolVolumeUsedByGet
  • lxd: Update storagePoolVolumeUsedByGet usage
  • lxd/db: Update get volume query
  • lxd: Add endpoints to list all volumes
  • client: Add functions to get all volumes
  • lxc/storage_volume.go: Update lxc storage volume list
  • test: Add tests for listing volumes from all pools
  • i18n: Update translations
  • doc: Run make update-api
  • doc/config options: update the config option index
  • doc/config options: link to config options where possible
  • instances: fix typo in config option
  • doc/api extensions: link to config options
  • test/lint/client-imports: rename godeps.list file
  • test/lint/client-imports: export LC_ALL for predictable sorting
  • test/lint: add lxd-agent-imports
  • shared: Ignore invalid uid/gid values and truncate mode to perm bits
  • lxd: Update uid/gid/mode API docs
  • gitignore: Ignore all pycache under doc/
  • shared/ioprogress: Support simple readers
  • lxd/storage/drivers/btrfs: Report migration progress from receiver
  • lxd/storage/drivers/btrfs: Use daemons shutdown context
  • shared/api: Fix typo
  • lxd/api_metrics: Check individual project permissions if set
  • gitignore: Ignore all .bak
  • lxd/metrics: Use label aware permission check when filtering samples
  • lxd/api_metrics: Filter metrics by looping only once
  • lxd/auth/driver_tls: Allow viewing metrics for unrestricted metrics certs
  • lxd/db/cluster: Add identityTypeCertificateMetricsRestricted and identityTypeCertificateMetricsUnrestricted
  • lxd/db/cluster/identities: Handle unrestricted metrics certificates
  • shared/api/auth: Replace IdentityTypeCertificateMetrics with a restricted and unrestricted type
  • lxd/daemon: Use IdentityTypeCertificateMetricsRestricted and IdentityTypeCertificateMetricsUnrestricted
  • lxd/db/cluster/certificates: Use IdentityTypeCertificateMetricsRestricted and IdentityTypeCertificateMetricsUnrestricted
  • lxd/identity: Use IdentityTypeCertificateMetricsRestricted and IdentityTypeCertificateMetricsUnrestricted
  • lxd/auth/openfga: Extend can_view_metrics entitlement to projects
  • lxd/db/cluster/update: Fix updateFromV69
  • test/suites/auth: Update test to account for can_view_metrics
  • test/suites/metrics: Add restricted and unrestricted certificate tests
  • shared: Return new structure from ParseLXDFileHeaders
  • lxd: Refactor calls to shared.ParseLXDFileHeaders
  • client: Refactor calls to shared.ParseLXDFileHeaders
  • Suggested changes to the tutorial
  • build(deps): bump actions/checkout from 3 to 4
  • api: Add instances_files_modify_permissions extension
  • shared: Parse X-LXD-modify-perm header
  • lxd: Allow setting permissions for existing files via API
  • client: Send X-LXD-modify-perm on file POST
  • lxc/file: Set ModifyExisting when --mode, --uid, or --gid are passed
  • Revert “driver_lxc: Include running state in metrics”
  • lxd/instance/drivers/lxc: default some metrics to 0 instead of -1
  • lxd/metrics: Replace lxd_containers and lxd_vms metrics by lxd_instances
  • incusd/instance/qemu: Set auto-converge on all migrations
  • incusd/device/disk: Remove bad comment
  • lxd/api_metrics: Make lxd_instances and internal metrics visible
  • tests: Fix metrics tests
  • gomod: Update dependencies
  • lxc/config/default: Add images remote for images.lxd.canonical.com
  • api: add image_restriction_nesting
  • doc/images: introduce requirements.nesting
  • internal/server/instance/lxd: add support for image.requirments.nesting
  • Formatting changes as per review
  • lxc: Make lxc init and lxd launch manpages more consistent
  • Correct disk free to GiB
  • lxd/db: Remove ErrAlreadyDefined sentinel error.
  • lxd/db: Replace ErrAlreadyDefined with an api.StatusError .
  • lxd: Replace db.ErrAlreadyDefined with an api.StatusError .
  • lxd: Check for database conflicts using api.StatusErrorCheck .
  • lxd/instance: Check for database conflicts using api.StatusErrorCheck .
  • lxd/response: Remove dependency on lxd/db from lxd/response .
  • lxd/db: Update unit tests to check for 409 Conflict.
  • tests: Update test_remote_usage to check for existing image on images.lxd.canonical.com
  • test: Don’t use default 10GiB block volume in test_storage_volume_snapshots
  • lxd/auth: Add comments to the OpenFGA model describing entitlements.
  • lxd/auth/generate: Add logic for generating entitlement definitions.
  • lxd/auth: Adds entitlements file with go:generate directive.
  • Makefile: Adds update-auth make target.
  • lxd/auth: Runs make update-auth.
  • test/lint: Add linter to ensure generated file is up to date.
  • lxd/auth: Remove duplicated type and function definitions.
  • lxd/auth: Replace EntitlementProjectOperator with EntitlementOperator .
  • lxd: Update entitlement validation calls.
  • lxd/auth: Add a can_delete entitlement to identity.
  • lxd/auth: Add directly related user types to group entitlements.
  • lxd/auth: Run make update-auth.
  • test/suites: It should be possible to grant permissions against a certificate.
  • test/suites: Update list of server entitlements.
  • scripts/bash/lxd-client: add security.sev* instance keys
  • scripts/bash/lxd-client: sort and add missing global keys
  • scripts/bash/lxd-client: sort and add missing instance keys
  • lxd/instance/instance/utils: Align validation terminology with that used for volume name validation
  • lxd/instance/instance/utils: Indicate instance name is invalid
  • lxd/instance/instance/utils: Include instance name in ValidName
  • lxd/storage/utils: Adds ValidVolumeName function
  • lxd/storage/volumes: storagePools.ValidVolumeName usage
  • lxd/storage/backend/lxd: Adds validation of instance and volume names to CreateInstanceFromBackup
  • api: add container_syscall_intercept_finit_module api extension
  • lxd: add forksyscallgo helper
  • lxd/seccomp: add libcap dependency and helper
  • lxd/seccomp/seccomp: add finit_module interception code
  • lxd/instance/drivers/driver_lxc: add support for linux.kernel_modules.load
  • scripts/bash/lxd-client: add “linux.kernel_modules.load” config option
  • run make update-metadata
  • lxd/devices: prepare for VMs dynamic core pinning support
  • instance/driver_qemu: implement SetAffinity()
  • instance/driver_lxc: get rid of redunant calls to cgroup.TaskSchedulerTrigger
  • instance/driver_qemu: call TaskSchedulerTrigger hook onstart/stop/update
  • lxd/storage/backend/lxd: Improve volume name validation in CreateCustomVolumeFromBackup
  • test/lint/godeps: rework dependency checking
  • Enable renovate bot
  • test/suites/container_devices_nic_bridged_filtering: silence SC2001
  • Makefile: use bash with shellcheck
  • build(deps): bump golang.org/x/crypto from 0.21.0 to 0.22.0
  • build(deps): bump github.com/osrg/gobgp/v3 from 3.24.0 to 3.25.0
  • build(deps): bump github.com/openfga/openfga from 1.5.1 to 1.5.2
  • build(deps): bump golang.org/x/oauth2 from 0.18.0 to 0.19.0
  • shared/simplestreams: Fix delta always using container rootfs as source
  • lxd/instances: Don’t start instances when evacuated
  • UI: Add canonical.com domain to content security policy, so the ui can load data from images.lxd.canonical.com
  • lxd/auth/openfga: If the entityType is TypeServer , no need to list the server objects
  • doc/instances: change link to instance types files
  • doc: add back information about images: remote
  • doc/storage: document how to list all storage volumes
  • lxd: GET /1.0/warnings should use the can_view_warnings entitlement.
  • lxd: Update internal warning create handler.
  • test/suites: Adds authorization test for viewing warnings.
  • instance/drivers/driver_qemu: wait until hotplugged vCPUs are visible
  • doc/api extensions: add links to config options
  • client: Fix permissions extension typo
  • test: Push permissions for existing files
  • scripts/bash/lxd-client: add completion to lxc pause
  • scripts/bash/lxd-client: lxc manpage is hidden, don’t autocomplete it
  • scripts/bash/lxd-client: add lxc rebuild and warning top commands
  • scripts/bash/lxd-client: complete lxc rebuild
  • scripts/bash/lxd-client: complete lxc warning
  • scripts/bash/lxd-client: sort some commands
  • scripts/bash/lxd-client: add lxc remote switch
  • lxd/storage/drivers/zfs: Fix refresh of VM volumes
  • instance/drivers/driver_qemu: move setCoreSched() into setCPUs()
  • lxd/db/images: Add UnsetImageCached to disable the cached field
  • lxd: ImageDownload now checks for an explicit copy operation and eventually uncache the image
  • lxd: Signal to ImageDownload when an explicit image copy is happening
  • tests/remote_usage: Add integration tests
  • renovate: disable Dependency Dashboard
  • renovate switch to recommended config preset
  • github: move renovate.json out of the root dir
  • github: check for lxd-agent binary size changes
  • lxd/api/metrics: Don’t repeatedly call instance.Project() in metricsGet
  • lxd/api/metrics: Fix crash due to absent locking in metricsGet
  • lxd/api/metrics: Avoid repeated calls to wg.Add in metricsGet
  • lxd/config/default: Add images to DefaultRemotes
  • lxd-benchmark: Improve error reporting in LaunchContainers
  • test: Add additional checks for stopped instances in metrics tests
  • lxd/api/metrics: Use api.ProjectDefaultName constant in metricsGet
  • github: check both lxc and lxd-agent binary sizes
  • build(deps): bump golang.org/x/sync from 0.6.0 to 0.7.0
  • start the DNS listener after the networks are started
  • updated the network_zone test to include a restarting the server case
  • lxd/device/device_utils_disk: fix diskAddRootUserNSEntry to add root mapping only if it’s required
  • doc/file push: include information about permission flags
  • doc: clarify relation between proxy devices and network forwards
  • lxd: added an error message with link of the LXD documentation when lxd-ui is disabled
  • scripts/bash/lxd-client: add “lxc operation” command
  • scripts/bash/lxd-client: fix “lxc restore” completion
  • scripts/bash/lxd-client: add missing quotes and –
  • scripts/bash/lxd-client: add “lxc warning” command
  • scripts/bash/lxd-client: complete “lxc image” subcommands
  • scripts/bash/lxd-client: add “lxc alias” command
  • README: add MicroCloud to the list of tools for managing LXD
  • README: add Bolt and Packer to the list of tools for managing LXD
  • fix(deps): update module github.com/openfga/openfga to v1.5.3 [security]
  • doc/faq: add an entry about ZFS 2.1 being required
  • Makefile: fail if any test/lint files are not executable
  • Makefile: fail if any test/lint files are missing the .sh extension
  • test/lint: make godeps.sh executable
  • test/lint/godeps: display diff on failure
  • test/godeps/lxd-agent: remove github.com/golang/protobuf/proto
  • doc/ovn: include networking architecture figures
  • doc/ui: add instructions for enabling or disabling the UI
  • github: add package arg to lxd-snapcraft
  • github: use non-shallow clones for differential shellcheck
  • github: be stricter with shellcheck
  • fix(deps): update github.com/openfga/language/pkg/go digest to dc43b60
  • fix(deps): update go.starlark.net digest to 9b43f0a
  • lxd: Use pool name from DB entry in permission check.
  • test/suites: Check that authorization is working for /1.0/storage-volumes.
  • build(deps): bump github.com/miekg/dns from 1.1.58 to 1.1.59
  • doc/storage: fix import command
  • scripts/bash/lxd-client: add “lxc config device override”
  • lxd/storage/drivers/lvm: Fix source.wipe
  • doc: pin version of myst-parser
  • lxd/db: Update GetStoragePoolVolumes to use StorageVolumeFilter.PoolID
  • lxd/storage_volumes: Optimize database calls on storagePoolVolumesGet
  • lxd/storage: Update GetStoragePoolVolumes usage
  • lxd: Rename GetStoragePoolVolumes to GetStorageVolumes
  • shared/api: Switch server config to map[string]string
  • lxc: Update for server config type
  • lxd/config: Update for server config type
  • lxd/node: Update for server config type
  • lxd/cluster: Update for server config type
  • lxd/instance: Update for server config type
  • lxd/network: Update for server config type
  • lxd/project: Update for server config type
  • lxd/db/cluster: Update for server config type
  • lxd: Update for server config type
  • lxc: Fix cluster enable check
  • lxd/cluster/config: Don’t hide LOKI password
  • lxd/cluster/config: Don’t hide trust password
  • lxd/config: Remove concept of Hidden config
  • test: Fix setting block.* tests
  • lxd/storage/drivers/zfs: filter redundant options on ensureInitialDatasets
  • lxd/config: Fully remove Hidden configs
  • rest-api: Update ServerPut definition
  • lxc/init: add a device override example
  • lxc/launch: add a device override example
  • Makefile: have dqlite build raft
  • github: update env vars now that dqlite builds raft
  • doc/installing: update env vars now that dqlite builds raft
  • doc/installing: remove traces of raft being a separated lib
  • Makefile: remove vendored raft lib from dist target
  • Makefile: remove outdated comment
  • fix(deps): update github.com/dustinkirkland/golang-petname digest to eebcea0
  • fix(deps): update github.com/openfga/api/proto digest to 619029c
  • doc: unpin version of myst-parser
  • build(deps): bump github.com/minio/minio-go/v7 from 7.0.69 to 7.0.70
  • doc: add lxd group creation to installation process
  • doc: add user addition to lxd group to intallation process
  • doc/ovn: update OVN networking diagrams to work on dark background
  • doc/howto/benchmark_performance: s/22.04/24.04/g
  • doc/howto/cluster_groups: s/22.04/24.04/g
  • doc/howto/cluster_manage_instance: s/22.04/24.04/g
  • doc/howto/images_manage: s/22.04/24.04/g
  • doc/howto/images_remote: s/22.04/24.04/g
  • doc/howto/instances_create: s/22.04/24.04/g
  • doc/howto/instances_routed_nic_vm: s/22.04/24.04/g
  • doc/howto/network_ovn_setup: s/22.04/24.04/g
  • doc/howto/projects_work: s/22.04/24.04/g
  • doc/tutorial/first_steps: s/22.04/24.04/g
  • lxc/init: s/22.04/24.04/g
  • lxc/launch: s/22.04/24.04/g
  • lxc/main: s/22.04/24.04/g
  • lxd-benchmark/main: s/22.04/24.04/g
  • shared/api/image: s/22.04/24.04/g
  • shared/api/instance: s/22.04/24.04/g
  • shared/api/server: s/22.04/24.04/g
  • doc/reference/image_format: s/22.04/24.04/g and s/jammy/noble/g
  • doc/rest-api: run make update-api
  • Add page describing lxc show and info
  • lxc: If the volume ContentType is ‘filesystem’, args[1] is the device name and args[3] its path
  • lxc: if the volume ContentType is ‘filesystem’, ensure the argument used for the device path is an absolute path
  • i18n: Update translation files
  • doc: fix topical build
  • test/README: Document LXD_VERBOSE
  • doc/requirements: mention that HW support is required for running VMs
  • Add device override to howto instance conf
  • api: device_usb_serial
  • shared/api: Add Serial to ResourcesUSBDevice
  • lxd/resources: Add USB Serial
  • lxd/device/usb: Add serial, busnum and devnum options
  • github: Ensure lxd metadata can update the needed files during static analysis check
  • doc/rest-api: Refresh swagger YAML
  • added reference page for complete preseed yaml fields; how to form a cluster and how to initialize lxd linked to complete preseed yaml fields
  • remove trailing space; add blank line at EOF
  • add ‘storage_volumes’ to the YAML
  • api: Add network_allocate_external_ips extension.
  • lxd/network: Return listen address when creating load-balancer or forward.
  • lxd/network: Add a util for getting a random IP address within a subnet.
  • lxd/network: Add unit test for random address util.
  • lxd/network: Add a util to the OVN driver to get an available external address.
  • lxd/network: Add auto-allocation logic to OVN network forwards.
  • lxd/network: Add auto-allocation logic to OVN network load-balancers.
  • lxd/network: Return an unimplemented error for auto-allocation in bridge driver.
  • client: Check for API extension if listen address is unspecified.
  • lxc/config: Adds a GetInstanceServerWithTransportWrapper method.
  • client: Allow setting the transport wrapper on a unix client.
  • client: Update calls to unixHTTPClient.
  • lxc: Add a transport wrapper for inspecting Location headers.
  • lxc: Add --allocate flag and make listen address optional.
  • i18n: Update translations.
  • doc/howto: Update how-tos for network forwards and load-balancers.
  • doc: Update mdl exceptions list.
  • doc/instances: add UI instructions for creating instances
  • doc/instances: update UI instructions for configuring instances
  • doc/profiles: add UI instructions for using profiles
  • doc/instances: add UI instructions for troubleshooting instances
  • doc/ui: update console screenshot for Noble
  • doc/instances: update instructions for accessing files for UI
  • doc/instances: add UI instructions for running commands
  • doc/instances: add UI instructions for accessing the console
  • doc/instances: add UI instructions for adding a routed NIC
  • doc/instances: add UI instructions for backing up instances
  • doc/instances: clarify moving instances only works in CLI
  • doc: tinify images
  • doc/api-extensions: link config options
  • grafana: Refresh dashboard
  • test/suites/auth: Add checks for can_edit on server and storage_pool config
  • lxd/device/usb: Don’t require USB devices to have a serial file
  • lxd/fsmonitor/drviers/driver/fanotify: Don’t log error during shutdown
  • doc/howto/grafana: Minor tweaks
  • doc/metrics: provide non-snap instruction on how to restart prometheus
  • doc/images: remove outdated grafana dashboard ID capture
  • grafana: Better filter Loki events by project
  • lxd/daemon: Use hostname as default instance property on standalone systems
  • lxd/loki: Re-order config fields
  • lxd/loki: Allow overriding the location field
  • lxd/daemon: Set location field to local hostname on standalone systems
  • lxd_metadata: Annotate network zone properties
  • lxd_metadata: Annotate network ACL properties
  • lxd_metadata: Annotate network forward properties
  • lxd_metadadta: Annotate network load balancer properties
  • lxd_metadata: Annotate network peering properties
  • doc: Update doc to insert generate property tables
  • doc/network_forwards: update line numbers for linter exceptions
  • lxd_metadata: update metadata
  • doc/networking: add back table that went missing
  • lxd/storage/drivers/btrfs: Correctly detect raw disks
  • test/suites/storage: source.wipe for lvm, btrfs, zfs
  • lxd/storage/drivers/utils: fsUUID returns err for missing UUID
  • fix(deps): update module github.com/openfga/language/pkg/go to v0.0.0-20240429103126-f3e71ca3287d
  • fix(deps): update module k8s.io/utils to v0.0.0-20240502163921-fe8a2dddb1d0
  • fix(deps): update module github.com/osrg/gobgp/v3 to v3.26.0
  • fix(deps): update module github.com/openfga/api/proto to v0.0.0-20240501220219-2b164f5813a7
  • build(deps): bump golang.org/x/oauth2 from 0.19.0 to 0.20.0
  • build(deps): bump google.golang.org/protobuf from 1.33.0 to 1.34.0
  • test: add new dependency to lxd-agent
  • build(deps): bump golang.org/x/text from 0.14.0 to 0.15.0
  • build(deps): bump golang.org/x/sys from 0.19.0 to 0.20.0
  • doc: configure cloud-init from a file
  • Apply suggestions from code review
  • Update network_increase_bandwidth.md document with details for u18.04+
  • build(deps): bump golang.org/x/term from 0.19.0 to 0.20.0
  • doc/images: add UI instructions for dealing with images
  • Makefile: stop building lxd-migrate and lxd-agent in build target
  • Makefile: add lxd-metadata target
  • Makefile: stop building lxd-metadata in build target
  • Makefile: add lxd-metadata as a dependency for build target
  • Makefile: rename build target to lxd and add build as alias
  • Makefile: add all target to build the client, lxd, lxd-agent and lxd-migrate
  • github: drop invalid ref to matrix.go in snap edge build step
  • github: specify which make target to use when building LXD
  • Makefile: add lxd-benchmark target
  • Makefile: add lxd-benchmark to all target
  • Makefile: default to building all binaries: lxc, lxd, lxd-agent, lxd-benchmark and lxd-migrate
  • doc/howto/instances_troubleshoot: rename container to avoid confusion
  • doc/howto/instances_troubleshoot: add instructions for debugging systemd
  • build(deps): bump golang.org/x/crypto from 0.22.0 to 0.23.0
  • build(deps): bump google.golang.org/protobuf from 1.34.0 to 1.34.1
  • lxd/storage/drivers: Add volume param to roundVolumeBlockSizeBytes
  • Update module github.com/openfga/language/pkg/go to v0.0.0-20240513164614-7d0da9bc9c63
  • lxd: Only allow force stop for frozen instances
  • lxd: instance start also unfreezes
  • lxd: instances_put start unfreezes instances
  • test/basic: Add freeze tests
  • Update doc/howto/network_increase_bandwidth.md
  • Update network_increase_bandwidth.md
  • lxd: Add int upper bound check
  • doc/contributing: remove note about configuration options
  • lxd/cluster: Add int upper bound check
  • doc: Add network list-leases to IPAM How-to
  • test/lint: Reintroduce --whole-files linter flag.
  • github: run the doc link checker on PRs only
  • doc: fail doc-lint if unneeded exceptions are present
  • doc: remove now unneeded exception
  • Makefile: bind http server to 127.0.0.1 instead of 0.0.0.0
  • lxd: Fix double unlock of the task group’s mutex
  • lxd/task: Group usage comment
  • fix(deps): update module github.com/checkpoint-restore/go-criu/v6 to v7
  • fix(deps): update module github.com/juju/gomaasapi to v2
  • doc: Add a page about dqlite troubleshooting
  • lxd/network/openvswitch/ovn: Workaround OVN load_balancer table index issue by deleting records by UUID
  • lxd/storage/drivers/zfs: Round to zfs.blocksize or 16KiB
  • lxd/storage/drivers: Refactor volume size rounding logic
  • test/storage: Add non-power-of-two sized storage check
  • lxd/storage/drivers: Fix linter errors
  • lxd/network/openvswitch/ovn: Removes unused switches argument from LoadBalancerApply
  • lxd/network/driver/ovn: Removes unused switches argument to client.LoadBalancerApply calls
  • lxd/network/openvswitch/ovn: Fix linter suggestion in LogicalSwitchDHCPv4RevervationsGet
  • lxd/network/openvswitch/ovn: Only add – if needed in LoadBalancerApply
  • lxd/instance/drivers: Remove unreachable condition
  • lxd: remove unused parameters from instance.go
  • lxd: Remove unused parameter from ensureDownloadedImageFitWithinBudget
  • Revert “lxd: Update for server config type”
  • Revert “lxd/db/cluster: Update for server config type”
  • Revert “lxd/project: Update for server config type”
  • Revert “lxd/network: Update for server config type”
  • Revert “lxd/instance: Update for server config type”
  • Revert “lxd/cluster: Update for server config type”
  • Revert “lxd/node: Update for server config type”
  • Revert “lxd/config: Update for server config type”
  • Revert “lxc: Update for server config type”
  • doc/howto/logs_loki: loki.instance needs to match the Prometheus job name
  • Revert “shared/api: Switch server config to map[string]string”
  • rest-api: Update server config properties to be of type any
  • lxd/config: Record error if type assertion fails
  • lxc: Fix indent-error-flow by removing the else block
  • lxc: Allow comparison of interface with bool
  • lxd/cluster: Prefer not to defer chains of function calls
  • lxd/main: Add missing comments for exported functions
  • lxd/cluster: Remove redundant import alias
  • lxd/config: Update error messages
  • lxd/config: Update tests with latest error messages
  • lxd/cluster/config: Update error messages
  • lxd/cluster/config: Update tests with latest error messages
  • doc/howto/instances_create: add CLI instructions to enable the LXD agent in manually installed VMs
  • doc/howto/instances_create: 1 CPU/1GiB/8GiB is too tight for desktop VMs
  • fix(deps): update github.com/openfga/language/pkg/go digest to 9e3bd7a
  • doc/dqlite: small doc cleanup
  • doc/instances: make instructions for ISO VM consistent for API & CLI
  • lxd/storage/btrfs: Fix btrfs argument order
  • lxd/storage/btrfs: add space after comment marker
  • doc/cloud-init: use tabs for API/CLI instructions
  • doc/cloud-init: add instructions for the UI
  • doc/cloud-init: move instructions for enabling the LXD agent
  • test/storage: Remove zfs rounding test
  • po: remove outdated “Manipulate container images.\n” section
  • po: remove outdated “If this is your first run, …” section
  • lxd/instance/drivers/driver_qemu: properly calculate VHOST_VSOCK_SET_GUEST_CID
  • Update metrics.md to add symbolic link from current/tls to common/tls as the work around so that Prometheus can find the .crt & .key files in the tls folder.
  • test/suites/auth: Use server config keys that contain actual passwords
  • storage/drivers/driver_btrfs_utils: properly calculate BTRFS_IOC_SET_RECEIVED_SUBVOL
  • lxd/devices: properly handle cpu.limit for VM-type instances in deviceTaskBalance()
  • shared/idmap: Make get_userns_fd configure the userns
  • idmap/shift_linux: fix a bunch of go linter warnings
  • lxd/devices: fix a bunch of linter errors
  • doc/substitutions: simplify yaml formatting and alpha-sort
  • doc: effectively joining the lxd group requires to log out/in
  • build(deps): bump github.com/go-acme/lego/v4 from 4.16.1 to 4.17.3
  • build(deps): bump github.com/jaypipes/pcidb from 1.0.0 to 1.0.1
  • doc: change Makefile structure
  • doc: fix woke failure
  • lxd/seccomp/seccomp: tighten capability checks a bit
  • lxd/seccomp: fix a bunch of linter errors
  • lxd/network/driver_bridge: check the right error code when killing dnsmask
  • lxd/network/driver_bridge: check the right error code when killing forkdns
  • lxd/network/driver_bridge: remove redundant error checking
  • lxd/network/common: remove unused clientType param for delete()
  • lxd/network/utils: remove unused s param for usedByProfileDevices()
  • lxc/info: remove unused remotes param for instanceInfo()
  • lxd/cluster: remove unused cert param for loadInfo()
  • lxd/storage/filesystem/fs: check for error when detecting btrfs
  • lxc/list: remove unused conf param to listInstances()
  • lxc/file: remove redundant error checking
  • lxc/list: remove unused cInfo param to matchByNet()
  • lxc-to-lxd: remove unused op param to transferRootfs()
  • lxd-agent: remove unused debug param
  • lxd-agent: remove unused daemon param to get*Metrics()
  • lxd/apparmor: remove unused sysOS param to *Profile()
  • lxd/apparmor/qemuimg: fix error check when creating subprocess
  • lxd/auth/openfga: check error only once
  • lxd/db/cluster/update: remove redundant error check
  • lxd/db/generate/file/write: remove unused imports param to resetInterface()
  • lxd/db/generate/db/stmt: remove unused filters param to register()
  • lxd/db/generate/README: fix some markdownlint warnings
  • lxd/db/query/slices: remove unused typeName param to scanSingleColumn()
  • lxd/db/networks: remove unused tx param to getNetworkConfig()
  • lxd/db/storage_pools: remove unused tx param to getStoragePoolConfig()
  • lxd/db/storage_pools: remove duplicated error checking in getStoragePool()
  • lxd/device/device_utils_network: remove tautological nil check
  • lxd/device/nic_ovn: remove unused uplink param to setupHostNIC()
  • lxd/device/proxy: check the right error code when killing forkproxy
  • lxd/dns/debug: remove unused zone param to debug()
  • lxd/firewall/firewall_load: remove tautological check and remove dead code
  • lxd/instance/drivers/qemu: avoid dereferencing nil
  • lxd: remove unused forcecheck param to storageStartup()
  • lxd/instance/drivers/qemu_metrics: remove unused monitor param to getQemuMemoryMetrics()
  • lxd/daemon_storage: remove unused storageType param to mount()/umount()
  • lxd/instance/drivers/common: remove unused stateful param to validateStartup()
  • lxd/instance/drivers/qemu: remove unused configCopy param to deviceAttachNIC()
  • lxd/instance/drivers/qemu: remove unused configCopy and mount params to deviceAttachPath()
  • lxd/instance/drivers/qemu: remove unused deviceName and configCopy params to deviceAttachBlockDevice()
  • lxd/instance/drivers/qemu: remove unused rawConfig param to deviceDetachPath()
  • lxd/instance/drivers/qemu: remove unused rawConfig param to deviceDetachBlockDevice()
  • lxd/instance_file: remove unused s and r params to instanceFileHead()
  • lxd/instance_file: remove unused r param to instanceFileDelete()
  • lxd/main_forkproxy: remove unused timeout param to genericRelay()
  • lxd/storage/drivers/cephobject: remove unused bucket param to radosgwadminBucketSetQuota()
  • gomod: drop unused mods: checkpoint-restore/go-criu/v7 and juju/gomaasapi/v2
  • lxd/instance/drivers/driver_qemu: Fix indentation.
  • lxc/file: simplify loop by continuing early
  • lxc/list: remove duplicated comment marker
  • lxc/list: return early in loop
  • lxd/apparmor/dnsmasq: omit unneeded type declaration
  • lxd/apparmor/forkdns: omit unneeded type declaration
  • lxd/apparmor/forkproxy: omit unneeded type declaration
  • lxd/apparmor/qemuimg: omit unneeded type declaration
  • lxd/apparmor/qemuimg: add space after comment marker
  • lxc-to-lxd/main_migrate: return early in loop
  • lxd/main_forkproxy: UDP should be capitalized
  • lxd/storage/drivers/cephobject_buckets: fix comment for CreateBucketKey()
  • lxd/instance_file: remove uneeded else clauses
  • lxc/list: unexport architectureColumnData()
  • lxc/list: unexport storagePoolColumnData()
  • lxc/list: unexport createdColumnData()
  • lxc/list: unexport numberOfProcessesColumnData()
  • lxc/list: unexport profilesColumnData()
  • fix(deps): update github.com/openfga/language/pkg/go digest to f5fc1d6
  • lxc/list: unexport lastUsedColumnData()
  • lxc/list: add comments to exported functions
  • lxc/file: add comments to exported functions
  • lxc/info: add comments to exported functions
  • lxd/main_forkproxy: add comments to exported functions
  • lxc-to-lxd/main_migrate: add comments to exported functions
  • lxd-agent: add comments to exported functions
  • lxd/apparmor/qemuimg: add comment to exported function
  • lxd/device/device_utils_network: add space after comment marker
  • Update grafana.md
  • doc: replace the doc cheat sheet
  • doc: move handling of additional prereqs to Makefile.sp
  • doc: update documentation checks
  • lxc: Unexport all Run and Command methods (exported).
  • lxc: Unexport remaining methods from lxc command structs (exported).
  • lxc: Remove deferred statements from loops (defer).
  • lxc: Fix datarace in lxc file get (datarace).
  • lxc: Use named returns where appropriate (confusing-results).
  • lxc: Check all type assertions (unchecked-type-assertion).
  • lxc: Replace interface{} with any (use-any).
  • lxc: Return early where possible (early-return).
  • lxc: Fix comments (comment-spacings).
  • lxd/apparmor/lxc: Fix rule syntax
  • doc: update the documentation for the doc framework
  • Update doc/howto/grafana.md
  • lxd/network: Pass bridge ips to Firewall.NetworkSetup
  • lxd/firewall: Drop DNS traffic to dnsmasq originating outside the bridge
  • test: Ensure dns traffic from external source is dropped
  • lxd/firewall: Fix linter errors
  • doc: clean up the wordlist
  • doc: update links to the MicroCloud website
  • doc: turn on colours for the link checker and doc build on GitHub
  • doc: output the broken links if the linkcheck fails
  • lxd/instance/drivers: Rename blockNodeName to generateQemuDeviceName
  • lxd/isntance/drivers: Use qemuDeviceNamePrefix for blockdevs and netdevs
  • lxd/instance/drivers: Use generateQemuDeviceName for device tags
  • lxd/instance/drivers: Indicate device name max length with variable
  • doc/Makefile.sp: replace subshell by command group
  • lxd/apparmor/lxc: Tweak rule syntax
  • lxd/network: Include error type in function comment.
  • lxd/network: Return boolean from address validator.
  • lxd/network: Use switch statement instead of multiple stanzas.
  • lxd/network: Refactor bridge network forward creation to use pattern from ovn.
  • lxc/config: Fix method name in doc block.
  • lxc: Validate location header and listen address.
  • lxd/network: Use net.IP argument to checkAddressNotInUse .
  • doc/images: replace distrobuilder with LXD image builder
  • doc/server: add UI instructions for configuring server settings
  • lxd/auth: Remove project from request details.
  • lxd/auth: Remove project access check in TLS GetPermissionChecker.
  • lxd/project: Raise error level of GetPermissionChecker err.
  • lxd/project: Continue loop if GetPermissionChecker fails.
  • test/suites: Test for project used-by filtering for restricted TLS clients.
  • lxd/auth/entity: Moved generated entitlements and some helper types/functions into own package
  • lxd/dev/openfga: Move openfga datastore to own package to avoid unnecessary dependencies elsewhere
  • lxd/daemon: Use github.com/canonical/lxd/lxd/db/openfga
  • lxd-agent/devlxd: Removes unused reference to daemon.Debug
  • lxd: Use github.com/canonical/lxd/lxd/auth/entity
  • go: Update minimum version to 1.22.3
  • gomod: Update dependencies and switch to go 1.22.3
  • test/mini-oidc: Merges into main Go module
  • test/mini-oidc: Standardise on github.com/go-jose/go-jose/v4
  • gomod: Update depedencies after test/mini-oidic is merged into main module
  • lxd/auth/generate: Update entity generator to use new location and name changes
  • test/godeps: Removes openfga from expected deps for lxd-agent
  • github: Updated expected size of lxd-agent
  • github: Fix permissions for static analysis check
  • test/mini-oidc: Comment should end in a period (godot)
  • test/mini-oidc/storage/storage: renewRefreshToken confusing-results: unnamed results of the same type may be confusing, consider using named results (revive)
  • lxd/storage/volumes/snapshot: Fix duplicate import
  • lxd/events: Fix go linter error
  • test/mini-oidc/storage: Ignore exported func NewMultiStorage returns unexported type *storage.multiStorage, which can be annoying to use linter warning
  • test/mini-oidc/storage: Return standard error rather than pointer to oidc.Error
  • lxd/api/internal/recover: Ignore defer: prefer not to defer inside loops (revive) as this is intended
  • lxd/api/internal/recover: Fix early return from linter suggestion
  • lxd/storage/volumes: Remove empty new line
  • doc: add notes to files from the starter pack that should not be edited
  • test/mini-oidc/storage/storage: linter fixes
  • lxd/api/internal/recover: Fix early-return from linter
  • test/mini-oidc/storage: Fix import spacing
  • lxd/apparmor/lxc: remove dup mount options rules
  • lxd/apparmor/lxc: reorganize mount options rules for priv containers
  • gomod: temporarily replace gopkg.in/square/go-jose.v2 by gopkg.in/go-jose/go-jose.v2
  • test/godeps: Update go-jose.v2 dependency for client
  • test/godeps: Update go-jose.v2 dependency for lxc-config
  • test/godeps: Update go-jose.v2 dependency for lxd-agent
  • gomod: update
  • doc/howto/instances_create: give manual instructions to install the lxd-agent
  • doc/cloud-init: remove section on how to enable the lxd-agent
  • Revert “github: run code-tests with 1.21 to avoid swagger crash”
  • test/suite/database: use a space between parenthesys and opening braket
  • test/main: export LXD_SKIP_TESTS
  • test/main: export LXD_REQUIRED_TESTS
  • github: use global vars to avoid dup’ing them between jobs
  • test/lint: add test to ensure all test cases are used
  • test: enable test_clustering_upgrade
  • test: enable test_clustering_upgrade_large
  • test/suites/backup: rename internal sub-functions
  • test/suites/fuidshift: rename internal sub-functions
  • test/suites/container_devices_disk: rename internal sub-functions
  • test/suites/container_devices_unix: rename internal sub-function
  • test/suites/image_profiles: rename internal sub-function
  • test/suites/config: rename internal sub-functions
  • test: enable test_image_import_existing_alias
  • test: enable test_init_dump
  • test: enable test_projects_copy
  • test: enable test_remote_url_with_token
  • test/suites/image: fix export/import from alias to cope with .tar.xz extension
  • test/suites/serverconfig: rename internal sub-function
  • test/suites/remote: delete project at the end of test_remote_url_with_token()
  • test/suites/init_dump: remove network “managed: true” from expected config dump
  • test/suites/init_dump: add network “project: default” to expected config dump
  • test/suites/init_dump: add storage_volumes list to expected config dump
  • test/suites/init_dump: add projects section to expected config dump
  • test/suites/init_dump: mangled the dumped trust_password value
  • test/suites/remote: update expected behavior when accessing restricted projects
  • github: skip clustering upgrade tests (broken)
  • fix(deps): update module github.com/gorilla/websocket to v1.5.2
  • fix(deps): update module github.com/minio/minio-go/v7 to v7.0.71
  • lxc: Parse location header into URL.
  • lxd/device: Minor comment correction
  • lxd/device: Name parameters of the same type in DiskParseRBDFormat
  • test: Minor fix in tpm tests
  • lxd: Move addFileDescriptor to lxd/util
  • lxd/instance/drivers: Create ShortenedFilePath to handle long socket paths
  • lxd/device: Use shorter socket path when calling swtpm socket
  • lxd/instance: Pass shorter virtiofsd socket paths to qemu
  • lxd/instance/drivers: Pass shorter swtpm socket path to qemu
  • lxd/instance/drivers: Use shorter socket path in deviceAttachPath
  • doc/howto/images_remote: add token to the list of accepted params for “remote add”
  • lxd/archive: Properly anchor exclude rules
  • lxd/archive: add comment to exported function
  • api: Add explicit_trust_token extension
  • shared/api: Add TrustToken support in CertificatesPost and ClusterPut
  • lxc: Add support for setting trust token explicitly
  • client: Allow joining a cluster with token
  • lxd: Add support for setting trust token explicitly
  • i18n: Update translation templates
  • tests: Add spawn_lxd_and_join_cluster_with_token func
  • tests: Explicitly join a node by token during clustering
  • tests: Add trust by explicitly using a token
  • client: Remove clear-text logging of sensitive information
  • lxd/device/tpm: Fix regression in start VMs with TPM devices
  • lxd/device/device/utils/disk: Close derived unix listener socket when reverting in DiskVMVirtiofsdStart
  • lxd/device/disk: Fix socket leak from DiskVMVirtiofsdStart when VM fails to start in startVM
  • lxd/device/disk: Fix socket leak from DiskVMVirtfsProxyStart when VM fails to start in startVM
  • lxd: Move util.ShortenedFilePath and util.AddFileDescriptor back to qemu driver
  • lxd/auth: Move Authorizer implementations into drivers package.
  • lxd/auth/generate: Update entitlement definition generator for new package structure.
  • lxd: Update auth package imports.
  • test/godeps: Update auth package import in lxd-agent.
  • lxd/auth: Remove ‘driver_’ prefix from driver file names.
  • github: Remove permission change.
  • github: temporarily ignore microceph enable rgw failing
  • README: avoid permanent HTTP redirections with direct links
  • doc/debugging: avoid permanent HTTP redirection with direct link
  • doc/howto/instances_troubleshoot: avoid permanent HTTP redirection with direct link
  • doc/index: avoid permanent HTTP redirections with direct links
  • doc/howto/move_instances: avoid permanent HTTP redirection with direct link
  • doc/howto/network_bridge_firewalld: avoid permanent HTTP redirection with direct link
  • doc/authentication: avoid permanent HTTP redirection with direct link
  • doc/tutorial/first_steps: avoid HTTP redirection with direct link
  • doc/reference/storage_powerflex: avoid HTTP redirections with direct links
  • client: Fix bad comment
  • shared/api: Remove core.trust_password from examples
  • shared/api: Mark ClusterPassword and Password as deprecated
  • scripts/bash: Remove core.trust_password
  • lxd-migrate: Enforce explicit trust token usage
  • lxc: Enforce explicit trust token usage when adding remotes
  • client: Remove support for ClusterPassword when joining a cluster
  • lxd: Remove password support
  • lxd/cluster/config: Remove core.trust_password
  • lxd/cluster: Remove ClusterPassword from SetupTrust
  • lxd/main_init: Remove trust password support
  • lxd/util: Remove PasswordCheck
  • lxd/cluster/config: Remove passwordSetter
  • metadata: Remove core.trust_password
  • doc: Remove trust password
  • lxd/db: Remove core.trust_password
  • lxd/patches: Add patchPreLoadClusterConfig patch stage
  • lxd: Run the patchPreLoadClusterConfig patch stage on init
  • lxd: Add patchRemoveCoreTrustPassword
  • test/godeps/lxd-agent: Update list
  • tests: Remove trust password
  • shared/util: Add basic PathIsWritable
  • shared/util: Add comments to exported functions
  • lxc/config: Bump zitadel/oidc to v3
  • client: Bump zitadel/oidc to v3
  • client: Add default 10s timeout to IdP requests.
  • lxd/auth/oidc: Bump zitadel/oidc to v3
  • gomod: Runs make update-gomod
  • test/godeps: Update dependency lists for linter.
  • client/connection: Check for presence of snapped LXD unix socket
  • lxd-migrate: Rename user agent to LXD-MIGRATE
  • lxd-migrate: Support using the local server
  • github: Bump max binary size for lxc.
  • gomod: Remove now unneeded replace directive
  • github: Update bin size checks to derive min from the max provided
  • lxd/instance/instancetype: Fix limits.memery unit
  • docs: Update metadata
  • shared/cert: Set Not Before in self-signed cert to now-1minute
  • shared/cert: Add comments to exported functions
  • lxd/instance/drivers/driver/common: Update devicesUpdate to return slice of devlxd events
  • lxd/instance/drivers/driver/lxc: Use devlxd events returned from d.devicesUpdate in Update
  • lxd/instance/drivers/driver/qemu: Use devlxd events returned from d.devicesUpdate in Update
  • lxd/instance/drivers/driver/qemu: Update deviceAttachPath to return mount tag for mounting inside guest
  • lxd/instance/drivers/driver/common: Capture mount tag returned from deviceStart in devicesUpdate and pass to devlxd event
  • lxd-agent/events: Detect mount tag in source field of options for disk devices
  • lxd-agent/events: Linter fix
  • lxd/instance/drivers/driver/qemu: Use consistent host drive share device name when booting and hotplugging
  • lxd/instance/drivers: Extract hashing from generateQemuDeviceName to hashIfLonger
  • lxd/instance/drivers: Indicate max device ID length with qemuDeviceIDMaxLength
  • lxd/instance/drivers/driver/qemu/templates: Fix qemuHostDriveDeviceID to support long device names
  • lxd/instance/drivers/driver/qemu: Align fsdev and chardev names for host drive to that used when hotplugging
  • lxd/device/disk: Escape device name when using it as part of a path for drive share daemons
  • lxd/instance/drivers/driver/qemu: Update path of virtiofsd in deviceAttachPath
  • lxd/instance/drivers/driver/qemu: Updates generateQemuDeviceName to also do escaping
  • lxd/instance/drivers/driver/qemu: Update usage of d.generateQemuDeviceName
  • lxd/instance/drivers/driver/qemu/config/test: Update host drive tests to reflect new consistent fsdev and chardev naming
  • fix(deps): update golang.org/x/exp digest to 7f521ea
  • fix(deps): update module github.com/miekg/dns to v1.1.61
  • lxd/storage/drivers/ceph: Call genericVFSCreateVolumeFromMigration only once
  • lxd/storage/backend/lxd: Use validated image fingerprint from DB record in EnsureImage
  • build(deps): bump github.com/spf13/cobra from 1.8.0 to 1.8.1
  • build(deps): bump github.com/zitadel/oidc/v3 from 3.25.0 to 3.25.1
  • lxd/instance/drivers/load: Remove unnecessary check for device name length
  • client/lxd_images: Remove check of an impossible error
  • lxd/db/images: Populate source image type when fetching an image
  • client/lxd_images: Handle potential panic when extracting values from operation metadata
  • fix(deps): update module github.com/gorilla/websocket to v1.5.3
  • test/godeps: Remove 2 golang.org/x/net deps from the client
  • test/godeps: Remove 2 golang.org/x/net deps from lxc-config
  • test/godeps: Remove 2 golang.org/x/net deps from lxd-agent
  • lxd/storage/drivers/ceph: Allow receiver to read VM filesystem vol via rsync
  • lxd/storage/drivers/ceph: Clarify migration comments
  • lxd/storage/drivers/dir: Quote paths in errors
  • lxd/storage/drivers/dir: Allow lost+found subdir if source is root of the filesystem
  • lxd/storage: Set correct volume’s volatile.uuid on refresh
  • lxd/storage/drivers/powerflex: Revert unmap before resize
  • lxd/storage/drivers: Use context for tryExists
  • lxd/storage/drivers/btrfs: Use 10s timeout context for tryExists
  • lxd/stroage/drivers/btrfs: Fix typo in comment
  • lxd/storage/drivers: Add waitGone utility func
  • lxd/storage/drivers/powerflex: Wait for volume to disappear after unmount
  • lxd/storage/drivers/powerflex: Remove unnecessary NVMe/TCP disconnect
  • lxd/storage/drivers/powerflex: Lock the entire volume map process
  • test: Add dir storage pool test for empty mounted filesystem
  • doc: readthedocs now supports Go 1.22
  • doc: use Python 3.12 on readthedocs
  • Makefile: bump Go min to 1.22.4 (needed by OpenFGA)
  • github: bump Go min version to 1.22.4
  • lxd/apparmor/network_forkdns: forkdns binds port 1053 (no need for CAP_NET_BIND_SERVICE)
  • lxd/apparmor/network_forkdns: forkdns talks to dnsmasq which also listens on TCP/53
  • test/suites/clustering: improve grep patterns to be safer
  • test/suites/clustering: make better use of alternations in grep pattern
  • Revert “test/lint: Disable licence check.”
  • github: pull GOMIN from Makefile
  • github: always check compat with GOMIN
  • github: make sure doc requirement for Go version stays in sync
  • doc/requirements: bump min Go version to 1.22.4
  • doc/projects: Add API instructions
  • lxc: Always allow specifying a password when adding remotes
  • lxd/storage/drivers/powerflex: Don’t use nvme CLI to retrieve subsystems
  • Makefile: the toolchain directive should be better supported now
  • fix(deps): update module github.com/go-chi/chi/v5 to v5.0.14
  • build(deps): bump github.com/minio/minio-go/v7 from 7.0.71 to 7.0.72
  • lxd/storage/drivers/zfs: Wait for device to appear when activating a volume
  • lxd/apparmor/instance_lxc: allow devpts for unprivileged containers
  • lxd/storage/drivers/zfs: Check for non /dev/zvol/* paths
  • doc: add LTS to Ubuntu versions
  • doc/installing: remove related link to snap package guide
  • doc: move doc-incremental target
  • doc/linkchecker: remove exceptions for MAAS documentation
  • lxd/instance/device: Correct qemuDeviceIDMaxLength
  • lxd/apparmor/instance_qemu: relax proc rules a bit to workaround bug in AppArmor
  • lxd/auth: Standardise error field to err
  • lxd/identities: Standardise error field to err
  • lxd: Standardise error field to err
  • lxd-agent/events: Retry virtiofs hotplug mount
  • lxd-agent: Enable syslog logging
  • lxd-agent: Match the use of contextual logging for start up mounts
  • lxd-agent: Standardise error field to err
  • lxd-agent: Ignore linter complaints about deep exit
  • lxd/instance/drivers: Switch qemuHostDriveDeviceID for qemuDeviceNameOrID
  • lxd/instance/drivers: Use qemuDeviceNameOrID for node names and mount tags
  • lxd/instance/drivers: Use qemuDeviceNameOrID for TPM config section IDs
  • lxd/device: Allow / in VM TPM device name
  • lxd/device: Allow / in container TPM device name
  • lxd-agent: Log start time mount args on error
  • lxd/auth: Add constants for internal authentication methods.
  • lxd/auth/drivers: Use authentication method constants.
  • lxd: Use authentication method constants.
  • lxd/util: Split CheckTrustState into two functions.
  • lxd/cluster: Update calls to CheckTrustState .
  • lxd: Update calls to CheckTrustState .
  • lxd-agent: Update calls to CheckTrustState .
  • lxd: Refactor (*Daemon).Authenticate method.
  • lxd: Update comment on server certificate mTLS checks.
  • lxd/util: Update info log to indicate CA restriction applies to clients.
  • lxd/util: Add comment to exported method (revive: exported).
  • lxd: Disallow certificate creation in CA mode if cert is not signed by CA.
  • lxd/auth/drivers: Delegate to the TLS authorizer when protocol is PKI.
  • lxd/auth/drivers: Set logger in TLS driver.
  • shared: Set GetClientCertificate in TLS config.
  • shared: Add comments to exported functions (revive: exported).
  • test/suites: Improve test coverage for PKI mode.
  • doc: Update PKI documentation.
  • fix(deps): update module github.com/go-chi/chi/v5 to v5.1.0
  • lxd/storage/drivers/powerflex: Make getMappedDevPath mode independent
  • lxd/storage/drivers/powerflex: Let createNVMeHost return a reverter
  • lxd/storage/drivers/powerflex: Let connectNVMeSubsys return a reverter
  • lxd/storage/drivers/powerflex: Make mapNVMeVolume mode independent
  • lxd/storage/drivers/powerflex: Make unmapNVMeVolume mode independent
  • lxd/storage/drivers/powerflex: Add operation mode constants
  • gomod: Add Dell goscaleio library
  • lxd/storage/drivers/powerflex: Add SDC mode
  • lxd/storage/drivers/powerflex: Remove powerflex.host lock
  • lxd/storage/drivers/powerflex: Fix subsystem discovery
  • metadata: Add PowerFlex SDC mode
  • doc: Add PowerFlex SDC mode
  • doc/projects: add UI instructions for projects
  • lxd/instance/drivers/driver/lxc: Re-generate lxc.conf during Exec
  • lxd/instance/drivers/driver/lxc: Improve error message for loading go-lxc
  • server/seccomp: Add loongarch64
  • shared/cgo: Add loongarch64
  • Add loongarch64 support
  • doc: Add LoongArch to word list
  • lxc: Add validation for non-empty remote address
  • lxd/device: Allow zfs storage pools in degraded state
  • doc/bgp: Clarify how to configure BGP for OVN (uplink) networks
  • lxd/instance/drivers/driver/lxc: Fix containers not always starting up after host reboot
  • lxd/instance/instance/utils: Fix LoadFromBackup to work without DB
  • lxd: instance.LoadFromBackup usage
  • lxd/auth: Add utils for inspecting the request context.
  • lxd/auth/drivers: Refactor drivers to use auth utils.
  • lxd: Add access handler for project resource listing.
  • lxd: Use allowProjectResourceList access handler.
  • lxd/auth: Remove http.Request parameter from authorizer interface.
  • lxd/auth/drivers: Update auth drivers to remove request parameter.
  • lxd/project: Update authorizer calls.
  • lxd: Update calls to authorizer.
  • test/suites: Validate listing resources in disallowed project returns an error.
  • test/suites: Improve PKI test coverage.
  • Revert “test/suites/remote: update expected behavior when accessing restricted projects”
  • lxd/auth: Add GetIdentityFromCtx util.
  • lxd/auth: Handle unrestricted clients when checking caller privilege.
  • lxd/auth/drivers: Update TLS driver to use new utils.
  • lxd/auth/drivers: Update OpenFGA driver to use new utils.
  • lxd/auth/drivers: Ignore the identities’ project list in OpenFGA driver.
  • lxd: Update allowProjectResourceList to use new auth utils.
  • lxd/identity: Move ValidateAuthenticationMethod to identity package.
  • lxd/identity: Validate authentication method when getting cache entries.
  • fix(deps): update golang.org/x/exp digest to 46b0784
  • fix(deps): update module github.com/minio/minio-go/v7 to v7.0.73

The release tarballs can be found on our download page .

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 6.1 is now available in the latest/candidate snap channel and will be rolled out to the latest/stable channel soon.

What is RSAT, and how to add (or remove) them on Windows 11? Remote administration tools explained.

If you're an IT admin, you can add or remove RSAT from Windows 11 in multiple ways, and here's how.

Windows 11 RSAT

On Windows 11 (and 10), you can install the Remote Server Administration Tools (RSAT) in at least two ways using the Settings app and PowerShell, and in this guide, I will explain how.

If you use a computer at home or even at work, you probably never heard about the RSAT. However, it's a different story if you're a network administrator who works in an Active Directory environment. The Remote Server Administration Tools, or RSAT for short, is a collection of tools that allows administrators to manage devices running a supported version of Windows Server from Windows 11 (or 10), nearly eliminating the need to remote into a server to make changes. 

The features available will depend on the tool you install, but in general, you can remotely manage user accounts, security policies, storage, and more.

As part of the requirements, you can only install RSAT on Windows 11 Pro, Enterprise, and higher releases. You cannot add RSAT to the "Home" edition of the operating system. Also, while you can install the tools with any account type, you must be signed in with an account that has already joined the Active Directory domain. Otherwise, you may receive an error when trying to open the tools.

In this how-to guide , I will outline the steps to install or uninstall the available administrator tools on Windows 11.

How to add RSAT from Settings on Windows 11

To install RSAT tools using the Settings app, use these steps:

  • Open Settings .
  • Click on System .
  • Click the Optional features page.

Open Optional features

  • Click the View features button from the top-right corner.

View features option

  • Search for RSAT in the search box.
  • Check the RSAT tool to install on Windows 11.

Settings add RSAT tools

  • Quick tip: You can click the tool from the list to view a description and dependencies. You can check to install more than one tool as needed.
  • Click the Next button.
  • Click the Add button.

 Once you complete the steps, the RSAT tools will install on Windows 11.

Get the Windows Central Newsletter

All the latest news, reviews, and guides for Windows and Xbox diehards.

Remove RSAT using Settings

To remove Remote Server Administration Tools from the Settings app, use these steps:

  • Click the RSAT item under the "Added features" section.
  • Click the Remove button.

Settings remove RSAT tools

After you complete the steps, the tool will be removed from the computer. You may need to repeat the steps to uninstall other items.

How to add RSAT from PowerShell on Windows 11

To add RSAT tools with PowerShell commands, use these steps:

  • Open Start .
  • Search for PowerShell , right-click the top result, and select the Run as administrator option.
  • Type the following command to view the available RSAT tool and confirm those that are already installed on the computer and press Enter : Get-WindowsCapability -Name RSAT* -Online | Select-Object -Property DisplayName, Name, State

PowerShell view RSAT

  • Type the following command to install a specific RSAT and press Enter : Get-WindowsCapability -Name 'RSAT-TOOL-POWERSHELL-NAME' -Online | Add-WindowsCapability –Online

In the command, change "RSAT-TOOL-POWERSHELL-NAME" to the name of the tool, as shown in the PowerShell output. For example, you can use the Get-WindowsCapability -Name 'Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0' -Online | Add-WindowsCapability –Online command to install the Active Directory Domain Services and Lightweight Directory Services Tools.

PowerShell install RSAT

  • (Optional) Type the following command to install all the available RSAT tools and press Enter : Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability –Online

Once you complete the steps, the PowerShell command will install the tool on your computer.

Remove RSAT using PowerShell

To remove RSAT from PowerShell, use these steps:

  • Type the following command to determine the tools already installed on the computer and press Enter : Get-WindowsCapability -Name RSAT* -Online | Select-Object -Property DisplayName, Name, State
  • Type the following command to uninstall a specific RSAT item and press Enter : Remove-WindowsCapability -Name "RSAT-TOOL-POWERSHELL-NAME" -Online

In the command, change "RSAT-TOOL-POWERSHELL-NAME" for the name of the tool as shown in the PowerShell output. For example, you can use the Remove-WindowsCapability -Name 'Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0' -Online command to uninstall the Active Directory Domain Services and Lightweight Directory Services Tools.

PowerShell remove RSAT

After you complete the steps, the PowerShell command will remove the tool from your computer.

Remote Server Administration Tools

Here is the complete list of available tools for Windows 11:

  • Active Directory Domain Services and Lightweight Directory Services Tools.
  • PowerShell module for Azure Stack HCI.
  • BitLocker Drive Encryption Administration Utilities.
  • Active Directory Certificate Services Tools.
  • DHCP Server Tools.
  • DNS Server Tools.
  • Failover Clustering Tools.
  • File Services Tools.
  • Group Policy Management Tools.
  • IP Address Management (IPAM) Client.
  • Data Center Bridging LLDP Tools.
  • Network Controller Management Tools.
  • Network Load Balancing Tools.
  • Remote Access Management Tools.
  • Remote Desktop Services Tools.
  • Server Manager.
  • Storage Migration Service Management Tools.
  • Storage Replica Module for Windows PowerShell.
  • System Insights Module for Windows PowerShell.
  • Volume Activation Tools.
  • Windows Server Update Services Tools.

Once you have installed the tools, they will be available from the Start menu, more specifically, from the "All Apps" menu inside the "Windows Tools" folder. 

One thing I noticed is that installing or uninstalling these tools can take some time. If the setup seems stuck, stay patient and wait for the process to complete successfully.

Although I'm focusing this guide on Windows 11, you can refer to these instructions to install the tools on Windows 10 (version 1809 and higher releases).

More resources

For more helpful articles, coverage, and answers to common questions about Windows 10 and Windows 11, visit the following resources: 

  • Windows 11 on Windows Central — All you need to know
  • Windows 10 on Windows Central — All you need to know

Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.

  • MusicTechGuy I have installed Windows 11 Arm64 Enterprise on a VM environment at work and have not been able to install Rsat as it appears MS doesn't make it available in Win11 on Arm. Have you heard any rumblings from MS about this changing? With the new Snapdragon HW, this would be a huge problem as enterprises would benefit from ARM computers WITH RSAT. Reply
  • View All 1 Comment
  • 2 How to uninstall Microsoft Teams from Windows 11
  • 3 Western Digital's new 6TB external hard drive is fantastic, but one of its two variants is even better than the other
  • 4 The 7 best new Elden Ring DLC builds I'm using with Shadow of the Erdtree weapons, spells, and more
  • 5 You don't need to wait for Prime Day to get a stacked RTX 4060 gaming laptop for $1,000

set ip ubuntu server

IMAGES

  1. How to Set Static IP Address on Ubuntu 22.04

    set ip ubuntu server

  2. How to Configure Static IP Address on Ubuntu 20.04?

    set ip ubuntu server

  3. Setting a Static IP in Ubuntu

    set ip ubuntu server

  4. how-to-setup-static-ip-address-ubuntu-20.04-server

    set ip ubuntu server

  5. Configuring static and dynamic IP Addresses in Ubuntu using Netplan

    set ip ubuntu server

  6. How To Set A Static Ip Address In Ubuntu 20 04

    set ip ubuntu server

VIDEO

  1. Konfigurasi IP Address Pada Interface Ubuntu Server 22.04.3 LTS

  2. แก้ Static IP ubuntu server

  3. Howto Setting IP in UBUNTU 18

  4. KONFIGURASI IP ADDRESS PADA UBUNTU SERVER

  5. How to Set Static IP in Ubuntu Server 20.04 & Create New User |Hindi|

  6. Setting a Netplan in Ubuntu Server 22.04

COMMENTS

  1. How to Configure Static IP Address on Ubuntu 20.04

    Depending on the interface you want to modify, click either on the Network or Wi-Fi tab. To open the interface settings, click on the cog icon next to the interface name. In "IPV4" Method" tab, select "Manual" and enter your static IP address, Netmask and Gateway. Once done, click on the "Apply" button.

  2. How to Set Static IP Address on Ubuntu Server 22.04

    Setting up Static IP address on Ubuntu Server 22.04. Login to your Ubuntu server 22.04, look for the netplan configuration file. It is located under /etc/netplan directory. Run below cat command to view the contents of '00-installer-config.yaml'. Note: Name of configuration file may differ as your per setup.

  3. Configuring networks

    Configuring networks. Network configuration on Ubuntu is handled through Netplan, which provides a high-level, distribution-agnostic way to define how the network on your system should be set up via a YAML configuration file.. While Netplan is a configuration abstraction renderer that covers all aspects of network configuration, here we will outline the underlying system elements like IP ...

  4. How to Set a Static IP Address in Ubuntu

    Set a Static IP in Ubuntu with the GUI. Click the icons at the far-right end of the system bar to show the system menu, then click on the "Wired Connected" menu option. If you're using a wireless connection, instead click the name of your Wi-Fi network. The available connections are displayed.

  5. Change IP address on Ubuntu Server

    You have two options when configuring the IP address on your Ubuntu Server, and that is either a static IP address or DHCP. A static IP address allows you to manually select your IP address by configuring it on the Linux system, whereas DHCP relies on the router or DHCP server to lease you an IP address - either a reserved one or the next available one that is currently free, depending on ...

  6. Set static IP in Ubuntu using Command Line

    The DHCP server may also give you a new IP address occasionally. This could cause a problem if you have a home lab or server setup that works on a fixed IP address. You need to set a static IP address on your Ubuntu system to avoid problems. Step 1: Identify the correct network interface

  7. Ubuntu Static IP configuration

    In this tutorial, you will learn all about Ubuntu static IP address configuration. We will provide the reader with a step by step procedure on how to set static IP address on Ubuntu Server via netplan and Ubuntu Desktop using NetworkManager.Static IP address is recommended for servers as the static address does not change as oppose to a dynamic IP address assignment via DHCP server.

  8. How to configure static IP address on Ubuntu 20.04 Focal Fossa Desktop

    By default your current Ubuntu system uses DHCP server to configure its networking settings. Hence, the configuration of your IP address is dynamic. In many scenarios, simply configuring your router or local DHCP server is a preferred way to set a static address to any host regardless of the operating system in use.

  9. Configure Static IP Address on Ubuntu 22.04|20.04|18.04

    $ ifconfig -a ## OR $ ip addr. If you cannot see ip address, gateway, and netmask info, restart your computer. Just type the command reboot on the terminal. sudo reboot Method 2: Use Netplan YAML network configuration. On Ubuntu 22.04|20.04|18.04, you can use Netplan which is a YAML network configuration tool to set static IP address.

  10. How to Configure Static IP Address on Ubuntu 18.04

    In the Activities screen, search for "network" and click on the Network icon. This will open the GNOME Network configuration settings. Click on the cog icon. In "IPV4" Method" section, select "Manual" and enter your static IP address, Netmask and Gateway. Once done, click on the "Apply" button.

  11. How to Assign Static IP Address on Ubuntu Linux

    Method 2: Switch to static IP address in Ubuntu graphically. If you are on desktop, using the graphical method is easier and faster. Go to the settings and look for network settings. Click the gear symbol adjacent to your network connection. Next, you should go to the IPv4 tab.

  12. Configuring Ubuntu 20.04 to use a Static IP Address

    5. We are now in the right place to configure a static IP address for our Ubuntu 20.04 system. Before we can set the static IP address, we must change the DHCP mode from " automatic " to " manual " ( 1.) Switching DHCP to manual mode, we will be able to specify the address ( 2. ), netmask ( 3. ), and gateway ( 4. ).

  13. Setting a Static IP in Ubuntu

    To open the interface settings, click on the gear icon next to the interface name. Select "Manual" in the IPV4 tab and enter your static IP address, Netmask and Gateway. Click on the Apply button. Manually setting a static IP using Ubuntu Desktop. Verify by using the command ip a.

  14. How to set a static IP on Ubuntu Server 20.04

    Previous versions of Ubuntu Server used a file under /etc/network to configure static IP addresses, but this has been changed in later versions of Ubuntu. When installing Ubuntu Server, a tool called NetPlan will probably configure your address with DHCP during the cloud-init step. To set a static IP we will need to keep using NetPlan to change ...

  15. Configure Static IP Address on Ubuntu 20.04 (Server CLI and Desktop)

    Configure Static IP on Ubuntu 20.04 Desktop. If you are running a Desktop GUI, then configuring a static IP should be quite easy. Click on the ' Network icon ' at the top right corner of your screen and select the 'Wired Settings ' option. This opens the 'Network ' configuration page. In the 'Wired ' section, click on the gear wheel icon.

  16. How to set a static ip address in Ubuntu Server 20.04

    When you install Ubuntu server, its network setting defaults to dynamic IP addressing, that is, the network management daemon in Ubuntu searches for a DHCP server on the connected network and configures the network with the IP address assigned by DHCP. ... In this chapter, you will learn how to configure the network interface with static IP ...

  17. How to Configure Static IP Address on Ubuntu 20.04

    Ubuntu Network Method. Click on the ' Manual ' option and new address fields will be displayed. Fill out your preferred static IP address, netmask, and default gateway. Set Manual Network. The DNS is also set to automatic. To manually configure the DNS, click on the toggle to turn off Automatic DNS.

  18. How to configure a static IP address in Ubuntu Server 18.04

    The new method. Open up a terminal window on your Ubuntu 18.04 server (or log in via secure shell). Change into the /etc/netplan directory with the command cd /etc/netplan. Issue the command ls ...

  19. Setting a Static IP Address in Ubuntu 24.04 via the Command Line

    Setting a static IP address on Ubuntu 24.04 involves identifying the correct network interface, editing the Netplan configuration file with the new IP settings, securing the file permissions, and applying the changes. This process ensures your server can communicate consistently and securely on your network. Remember to always backup ...

  20. networking

    Setting the static IP address as above in the accepted answer here works, but one has to flush the old IP addr setting and then restart networking.service: sudo ip addr flush enp0s25. sudo systemctl restart networking.service. Then verify it is correct: ip add.

  21. How to setup a static IP on Ubuntu Server 18.04

    I have used this configuration with my Ubuntu Server virtual machine and it works so far, just make sure the info is correct; the optional: true setting supposedly speeds up the booting time by not verifying if the interface is connected or not, this is default, also there is no need to declare values not used, for example DHCP, if they are ...

  22. Install and Configure Samba Server on Ubuntu Ubuntu 24.04

    Step 4: Create a directory to Share. Now, we create a custom directory that will hold the files we want to share over the network using the Samba protocol.Here we are creating a directory called "linuxshare" under our ubuntu user HOME.However, if want to share some existing directory then that is possible as well which we learn how in the next step.

  23. How to Fix "DNS Server Not Responding" Error

    Go to the "TCP/IP" tab and set the "Configure IPv6" option to "Off." Windows: Open the Control Panel and go to Network and Sharing Center. Click on the network connection you want to modify, then click on "Properties."

  24. [Bug]: After update to 29: Some headers are not set correctly ...

    Debian/Ubuntu. PHP engine version. PHP 8.2. Web server. Apache (supported) Database engine version. MariaDB. Is this bug present after an update or on a fresh install? Upgraded to a MAJOR version (ex. 22 to 23) Are you using the Nextcloud Server Encryption module? Encryption is Disabled. What user-backends are you using? Default user-backend ...

  25. Netplan static IP on Ubuntu configuration

    Select IPv4 from the top menu. Select IPv4 to start configuring a new IP address. Choose Manual for the IPv4 settings, enter your desired configuration and hit Apply . Set your desired static IP address. Restart your network by ON/OFF switch. Restart to apply new network settings.

  26. How to remote desktop to Ubuntu

    Find your IP address by going to Network or Wi-Fi and click the settings cog next to your network.Note that the port number will default to 3389. Install a Remote Desktop Client on your guest PC ...

  27. LXD 6.1 has been released

    Introduction The LXD team would like to announce the release of LXD 6.1! This is the first feature release in the new 6.x series. Thank you to everyone who contributed to this release! New features and highlights Automatic IP allocation for OVN network forwards and load balancers The OVN network forward and load balancers now support automatic IP allocation. Previously when creating an OVN ...

  28. What is RSAT, and how to add (or remove) them on Windows 11? Remote

    On Windows 11 (and 10), you can install the Remote Server Administration Tools (RSAT) in at least two ways using the Settings app and PowerShell, and in this guide, I will explain how.

  29. How to Make a Minecraft Server (Java Edition) on Windows or Ubuntu

    Ubuntu. Open the terminal and use the cd command to navigate to the Minecraft folder. Alternatively, you can open the specific folder, right-click, and select Open in Terminal to have it directly point towards that directory.. Now run java -Xmx1024M -Xms1024M -jar server.jar, and press enter.. The Xmx and Xms signifies the maximum and minimum ram your Minecraft server runs with, respectively.