LXD Dashboard, by LXDWARE is an open source web-based user interface capable of managing multiple LXD servers from a single location. LXD Dasboard can create LXD containers, start, stop, and delete them. LXD Dashboard can manage snapshots and backups as well as downloading backups of LXD instances to your local computer.
LXD dashboard can be deployed on a LXD or Docker container and uses Ubuntu, NginX, and PHP.
INSTALLATION ON A LXD INSTANCE OR A VM
sudo apt update && sudo apt install nginx php-fpm php-curl sqlite3 php-sqlite3 -y
Get the package:
Extract the package:
tar -xzf v.3.8.0.tar.gz
Copy files to destinations:
sudo cp -a lxd-dashboard-v.3.8.0/default /etc/nginx/sites-available/ sudo cp -a lxd-dashboard-v.3.8.0/lxd-dashboard /var/www/html/
Make Folders for program storage:
sudo mkdir -p /var/lxdware/data/sqlite sudo mkdir -p /var/lxdware/data/lxd sudo mkdir -p /var/lxdware/backups
sudo chown -R www-data:www-data /var/lxdware/ sudo chown -R www-data:www-data /var/www/html
Restart the webserver:
sudo systemctl restart nginx
INSTALLATION IN A DOCKER CONTAINER
mkdir docker cd docker mkdir lxdware
Make your docker-compose.yml file:
version: '3' services: LXD-Dashboard: image: lxdware/dashboard:latest ports: - "8080:80" volumes: - "./lxdware:/var/lxdware:rw"
Start the container:
docker-compose up -d
In both install cases, navigate to the address of the server on which you performed the installation in a web browser. Fill in the registration details.
After you perform the installation and try to add a LXD server to manage, you will need to copy the certificate from the LXD Dashboard web interface. Place the certificate in a file like lxdware.crt on the LXD host you want to manage.
To authorize your LXD dashboard to your server, you must sign on to a command prompt on the actual LXD server and perform the following two commands assuming you have the certificate in the file lxdware.crt.
lxc config trust add lxdware.crt lxc config set core.https_address [::]
The default site configuration file (/etc/nginx/sites-enabled/default) in Nginx has now been replaced. In Ubuntu this file should be linked from the sites-available directory. The version of php-fpm changes over time and the file path listed in the default configuration will need to be updated for your environment. Ubuntu 20.04 used version 7.4, but Ubuntu 22.04 now uses version 8.1. Edit the file using a text editor (nano, vi, etc) and comment out the path to version 7.4 and uncomment the path for version 8.1.
sudo nano /etc/nginx/sites-enabled/default