How to add `/tmp/emacs1000` as a disk

I would like to run emacsclient in my container and use it to edit files via my primary emacs running on my host machine. In order to do that, I think I need to expose the /tmp/emacs1000/server socket my host to my LXD container. So I tried:

$ lxc config device add first home disk source=/tmp/emacs1000 path=/tmp/emacs1000
Error: The device already exists

But, as you see, that fails.

$ lxc shell first
root@first:~# ls -l /tmp
total 1
drwx------ 3 root root 3 Nov 28 01:24 systemd-private-8453824c02ae4da7bf85ffc78a9a1d69-systemd-resolved.service-EOoIbY

Any tips?


Oops…silly me… I had already added a disk named home. This worked fine:

$ lxc config device add first emacsclient disk source=/tmp/emacs1000 path=/tmp/emacs1000

(and I can now run emacsclient within my container) and use my single (long lived) instance of emacs to edit files in the container.

Sorry for the noise.