-
Also a simple setup for Permanent NFS Setup for UNA APP on Debian
NFS Server Setup
- Install NFS server:
sudo apt update sudo apt install -y nfs-kernel-server
- Create shared storage folder:
sudo mkdir -p /mnt/storage sudo chown -R nobody:nogroup /mnt/storage sudo chmod 775 /mnt/storage
- Configure exports:
Edit
/etc/exports
:/mnt/storage 10.0.0.0/24(rw,sync,no_subtree_check,all_squash,anonuid=33,anongid=33)
10.0.0.0/24
→ your private networkall_squash, anonuid=33, anongid=33
→ maps all files towww-data
(uid 33) for proper UNA APP permissions
- Export the folder and start NFS:
sudo exportfs -a sudo systemctl enable nfs-server sudo systemctl restart nfs-server
- Optional firewall:
sudo ufw allow from 10.0.0.0/24 to any port nfs
NFS Client Setup (UNA APP Server)
- Install NFS client:
sudo apt update sudo apt install -y nfs-common
- Create mount point for UNA APP:
sudo mkdir -p /var/www/una/storage sudo chown www-data:www-data /var/www/una/storage sudo chmod 775 /var/www/una/storage
- Test manual mount:
sudo mount -t nfs <NFS_SERVER_IP>:/mnt/storage /var/www/una/storage
Check:
df -h | grep storage
Make NFS Mount Permanent
- Edit
/etc/fstab
:
<NFS_SERVER_IP>:/mnt/storage /var/www/una/storage nfs defaults,_netdev,auto 0 0
_netdev
→ ensures mount waits for networkauto
→ mounts automatically on boot
- Test fstab:
sudo mount -a
No errors → mount will survive reboots.
Summary
- NFS storage mounted permanently at
/var/www/una/storage
- Fully compatible with UNA APP
- Permissions mapped to
www-data
- No other services included – simple, scalable, and persistent
💡 Recommendations for NFS Setup
- Use a dedicated disk
- Always allocate a separate, empty disk for NFS storage.
- Avoid using the same disk as the operating system.
- This prevents I/O bottlenecks and ensures better performance.
- Keep workloads separate
- Do not mount NFS on the OS disk.
- Mixing operating system and storage workloads will slow down the entire system.
- Configure file descriptor limits
- NFS and applications like UNA may open thousands of files simultaneously.
- Increase
nofile
limits to avoid errors such as “Too many open files”.
- Use a private network
- Isolate NFS traffic from public traffic (VLAN, VPN, or dedicated NIC).
- This prevents slowdowns for your users and improves security.
- Plan for scalability
- NFS is suitable for temporary or small-scale setups.
- For long-term growth and higher performance, migrate to OpenStack Cinder or another distributed storage backend.
⚠️ Note:
NFS is a simple and functional solution for temporary storage or basic setups. However, it does not scale well with multiple volumes or high traffic. If you want a cloud-ready setup, NFS can be a starting point, but the recommended long-term approach is OpenStack with a dedicated storage backend for performance and scalability.
👉 In short: dedicate hardware for NFS, configure limits, isolate storage traffic, and use NFS as a stepping stone toward a scalable cloud infrastructure.
⚠️ IMPORTANT NOTICE
- 🚨 These commands and configuration changes are for informational purposes or development.
- 💾 They DO NOT represent an official setup guide.
- ⚙️ Run them ONLY if you fully understand what they do.
- ❗ Use at your own risk. Adjust if necessary.
- 👉 This example is intended for advanced users only.
✨ Happy coding!