LXD Built-In GUI

There is a Canonical LXD web interface as of LXD v5.14. I have covered the third party interfaces for LXD including lxdui, LXD Mosaic, and LXD Dashboard. In this tutorial we learn how to configure the new Canonical LXD web interface.

The Canonical documentation on the LXD web UI is here.

Find out which version of LXD that you are running:

lxc --version

If you are running a version older than v5.14, you will need to upgrade LXD. An upgrade will not affect your current containers.

sudo snap refresh lxd --channel=latest

As of August 2023, the latest version is v5.15.

lxc --version

To enable the LXD web UI:

sudo snap set lxd ui.enable=true

You must now restart LXD:

sudo snap restart --reload lxd

An alternate way to reload the LXD daemon.

sudo systemctl reload snap.lxd  daemon

You must also be sure that the core address for the LXD server is set:

lxc config set core.https_address  :8443

Now, in your web browser (preferably Chrome) navigate to the address of your LXD server at port 8443. In my case:

In the screen above, select “advanced” and then “Proceed to…” and you should see the following screen:

Select “Create a new certificate” from the screen above:

Click “Generate” to create a new certificate and you will get the following popup. You don’t really need a password, so you can click skip.

image

Next, click the option to download the certificate and it will be saved in your download folder.

Open a terminal on your LXD server and execute the following command:

lxc config trust add Downloads/lxd-ui.crt

You can list the trust store on your LXD server:

lxc config trust list

Next, go back to your web browser and download the web browser certificate (lxd-ui.pfx) for the browser type that you are using:

In chrome, open another tab to the certificates – settings screen:

chrome://settings/certificates

Click “import” on the screen above and select the pfx file:

Once the certificate is imported into the web browser, you can return to the LXD web UI tab and you may or may not have a popup prompt to dismiss. After that, you should see the LXD web UI and it should list all of your LXD container instances:

Your Canonical LXD web UI should now be completely operational.

To ask questions, come by https://chat.scottibyte.com/.

I had to completely restart my browser after importing the certificate in order for it to work.

That could depend on the browser cookies. Remember that the LXD Web UI is also a very early release. It seems that LXDware LXD Dashboard is a much better option at this point in time.