How to mount directory from guest to host?

Hello! By default, we’re mounting host’s dir to lxd container like this
lxc config device add name share disk source=/files path=/mount
But I need “reverse” bind: mount guest’s directory /mount to host’s directory /files, is there any way to do this?

You can use lxc file mount command which uses sshfs (without needing ssh inside the instance) to mount the filesystem of the guest to the host.

See https://linuxcontainers.org/lxd/docs/master/howto/instances_access_files/#mount-a-file-system-from-the-instance