Disable or reconfig LXD cluster to standalone lxd

Hi all,

I currently using lxd v 4.3 as cluster (on single node) .
An I would try use Maas Lxd beta functionality, but this support only standalone LXD (non clustered LXD).
Any steps how to “migrate” cluster lxd to standalone lxd on same machine with keepenig storage, network and priofiles config and already created lxd containers as well?

Thank you

Best regards


@freeekanayaka do we have a way to do this or is the closest to it still a single node cluster (which MAAS would treat as a cluster)?

We currently don’t support this. But you should be able to do that with:

systemctl stop snap.lxd.daemon
rm $LXD_DIR/cluster.crt $LXD_DIR/cluster.key
sqlite3 $LXD_DIR/database/local.db "DELETE FROM config WHERE key='cluster.https_address'"
sqlite3 $LXD_DIR/database/local.db "DELETE FROM raft_nodes"

This is from the top of my head, I didn’t test it. If you try it, please backup those files first.

Thank you, a will try it


I was trying your suggestions, but not working for me
I was not able start service snap.lxd.daemon after updqate db, and error was:
“Error: failed to open cluster database: failed to ensure schema: failed to update node version info: updated 0 rows instead of 1”

Ah right, you’ll probably also need to create a /var/snap/lxd/common/lxd/database/patch.global.sql file with the following content:

UPDATE nodes SET address='' WHERE id=1

And then restart lxd.