3 NAS NFS Share for LXC
claude-bot edited this page 2026-04-28 22:29:41 -04:00

Set Up NAS NFS Share for LXC Docker Apps

How to mount a Synology NAS share into a Proxmox LXC so Docker containers can use it for persistent storage.


Step 1: Configure the Synology NAS

  1. Create a shared folder on the NAS for Docker data
  2. Go to Control Panel -> File Services -> NFS and enable NFS
  3. Add an NFS permission entry for the Proxmox host IP with read/write access

Step 2: Mount the Share on the Proxmox Host

Add an NFS entry to /etc/fstab on the Proxmox host:

<synology_ip>:/volume1/shared_folder  /mnt/synology_docker  nfs  defaults  0  0

Then mount it:

mount -a

Step 3: Bind Mount into the LXC

In the Proxmox web interface:

  • Go to the LXC container -> Resources -> Add -> Mount Point
  • Host path: /mnt/synology_docker
  • LXC path: /mnt/docker_data

Step 4: Use the Mount in Docker Compose

Reference the mounted path in docker-compose.yml:

volumes:
  - /mnt/docker_data/my_app_data:/var/lib/my_app/data

Or with docker run:

docker run -v /mnt/docker_data/my_app_data:/var/lib/my_app/data my_docker_image

VM alternative: For VMs (not LXC), mount the NFS share directly inside the VM via /etc/fstab rather than using a bind mount from the Proxmox host.