I have previously a small guide on how to get started with LXD 2.0 here. This however install LXD 2.0.5 and the current stable version is 2.6.2 at the time of writing. The whole setup is on a KVM VPS at RamNode. Notice that OpenVZ VPS does not support LXD as the kernel is too old.
Installation of LXD host
Lets add a repository to the newest stable LXD.
We then update and upgrade to get the latest stable version of LXD.
LXD should already be installed on Ubuntu 16.04.1, but if not execute the following. You can skip zfsutils-linux if you will not use ZFS.
Now everything is handled in the LXD configuration, even the LXD bridge. Replace somepassword with your own password. I choose only to have an IPv4 network, not IPv6. Replace /dev/vda3 with your own device / partition for the ZFS storage.
Warning! Notice that I create a new ZFS pool that wipes the chosen partition / device. Choose dir as the storage backend or a ZFS loop device (answer no to "Would you like to use an existing block device (yes/no)?") if you do not wish to wipe a partition / device and to prevent accidental data loss.
We confirm the ZFS pool has been created
Setup a container
Lets create an Ubuntu container
After it is done we confirm that the container is running
We can now enter the container
Which will enter the container as root. Here we can as an example setup NGINX
Then exit the container
Which drops us back to the host. Here we can now access the webserver we just installed on the container
Lastly I wanted a static ip address for my containers. This is now very easy using LXD 2.3 or higher.