Skip to main content
AgentFS can expose filesystems over NFS, enabling remote access from other machines, containers, or virtual machines.

Starting the NFS Server

agentfs serve nfs my-agent
By default, this listens on 127.0.0.1:11111.

Binding to All Interfaces

To allow remote access:
agentfs serve nfs my-agent --bind 0.0.0.0 --port 2049
Exposing NFS on 0.0.0.0 makes the filesystem accessible to anyone who can reach your machine. Use firewall rules or a VPN for production deployments.

Mounting the Filesystem

From the Same Machine

mkdir /mnt/agentfs
mount -t nfs -o vers=3,tcp,port=11111,mountport=11111,nolock 127.0.0.1:/ /mnt/agentfs

From a Remote Machine

mount -t nfs -o vers=3,tcp,port=2049,mountport=2049,nolock server-ip:/ /mnt/agentfs

Mount Options Explained

OptionDescription
vers=3Use NFSv3 protocol
tcpUse TCP transport
port=11111NFS server port
mountport=11111Mount protocol port
nolockDisable file locking (single-user)

Unmounting

umount /mnt/agentfs
If the mount is busy:
umount -f /mnt/agentfs  # Force unmount
# or
umount -l /mnt/agentfs  # Lazy unmount

Next Steps