You can set LXD_INSECURE_TLS=true in the environment of the LXD 5.0 system.
Easiest way to do this would be systemctl edit snap.lxd.daemon and then add a section like:
[Service]
Environment=LXD_INSECURE_TLS=true
To get it applied, you could try systemctl reload snap.lxd.daemon which may do the trick. If it doesn’t, a full system reboot is likely the easiest alternative.
Also exporting LXD_INSECURE_TLS=true doesn’t seem to be working for me with 5.0.0 when connecting to an image server running 2.21. Still getting the same error.
You’d need to make sure that both your LXD server and your LXD client have it set as copies between images servers involves the client tool itself connecting to the source server.
Can you elaborate on what exactly is required so that LXD_INSECURE_TLS=true is not needed? For example, I have openssl 1.1.1+ on both client and server (and see TLSv1.3 in the output of openssl ciphers -v), yet it still can’t communicate.
Thank you, when running command -v lxc I was able to see that the apt package version of LXD was still installed on the client along with the snap; the apt package binary was first on the $PATH, so it was getting called on the client instead of the newer LXD 5.0.0 snap version. After removing the apt package version so only the snap package version is present on the $PATH, it is now working.