Howto share resources over a wireguard to host containers?

I got LXD HOST with containers and remote raspberry PI connected via wireguard.
I want to share Rpi resources for HOST containers.
I found only one solution
export Rpi NFS shares to HOST via wireguard
then add those shares to HOST containers as LXD disks via
lxc config device with NFS share as source for disk

Is there a simpler/faster/safer? way to share resources over a wireguard to host containers?
For example move wireguard connections and NFS shares directly to containers? (lower security required i presume?)


If you your Wireguard Tunnel Endpoint is set to your LXDBR0 IP on the Host then all containers should be reachable.

I think You missed the point of my question
I know howto reach containers but thinking about better sharing Rpi resources/filesystem to containers

Samba / CIFS share?
Not secure but your running wireguard which is secure, so data is encrypted.
Also CIFS is a bit slow over a WAN link.

well samba doesn’t store linux attributes/permissions?
I think NFS is way more faster via wireguard


1 Like