Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

New Plugin Request. Custom NFS shares...

Featured Replies

@zapbranagann
PM as they are the owners of the samba version..
https://forums.unraid.net/topic/195826-plugin-custom-smb-shares/

By using their GitHub and example plugin code project...

By using the smb custom github as a base for the plugin...
https://github.com/cslemieux/unraid-custom-smb-shares

Here is a generic base setup to redeploy a similar plugin... I made a first-pass Unraid Custom NFS Shares scaffold based on the GitHub page SMB plugin:

What it does now:

  • Adds a new plugin namespace: custom.nfs.shares

  • Adds Unraid pages:

    • NFSShares.page

    • NFSSharesAdd.page

    • NFSSharesUpdate.page

    • NFSSharesSettings.page

  • Stores persistent share definitions here:

/boot/config/plugins/custom.nfs.shares/shares.json
  • Generates a persistent export file here:

/boot/config/plugins/custom.nfs.shares/custom-nfs-shares.exports
  • Mirrors the runtime export drop-in here:

/etc/exports.d/custom-nfs-shares.exports
  • Applies changes with:

exportfs -ra
  • Shows status with:

exportfs -v

That matches the NFS-utils behavior: after /etc/exports, exportfs also reads extra export tables from /etc/exports.d, but only files ending in .exports are considered. The exportfs -ra reload path is also the right mechanism for re-exporting definitions without a full service restart.

Some Important caveats before this touches a real Unraid box:

  1. Treat this as a development scaffold, not a release-ready plugin.
    I ported the core CRUD/config/reload shape, but the full test suite from the SMB plugin is not ported.

  2. Test quoted export paths.
    The generator currently emits paths using PHP escapeshellarg(), like:

'/mnt/user/media' 192.168.1.0/24(rw,sync,no_subtree_check,root_squash)

If Unraid’s NFS-utils rejects quoted paths in /etc/exports.d, we should switch that function to backslash-escape spaces instead.

  1. Confirm Unraid NFS service behavior.
    The scaffold assumes NFS service is enabled already. If NFS is disabled in Unraid Settings, exportfs -ra may fail or do nothing useful.

  2. The plugin XML still has placeholder release metadata.
    In custom.nfs.shares.plg, replace:

<!ENTITY github    "YOUR_GITHUB_USER/unraid-custom-nfs-shares">
<!ENTITY md5       "00000000000000000000000000000000">

*For Deployment...

  1. Build script included.
    From the scaffold root:

./build.sh 2026.05.17-dev

The core file to review first is:

source/usr/local/emhttp/plugins/custom.nfs.shares/include/lib.php

That is where the NFS export line generation, validation, /etc/exports.d writing, exportfs -ra, and exportfs -v status logic live...

This is more to add custom sub folder sharing to nfs by adding to the /etc/exports.d/ ...

....

On modern Linux systems, you cannot use a direct "include" directive within the /etc/exports file itself. Instead, the NFS server automatically supports multiple configuration files via a drop-in directory located at /etc/exports.d/

Using the /etc/exports.d/ Directory
The exportfs command, which maintains the kernel's export table, is designed to read both the master /etc/exports file and any files ending in .exports within the /etc/exports.d/ directory.

How to use it: Create a new file in that directory (e.g., /etc/exports.d/additional_shares.exports) and add your share definitions there using the standard exports syntax.

  1. Applying changes: After adding or modifying files in this directory, run the following command to refresh the export table without restarting the service:

    bash

    exportfs -ra
    

    Use code with caution.

    The -r flag re-exports all directories, synchronizing the kernel's table with /etc/exports and everything under /etc/exports.d/


I really don't want to support a plugin repo... but think that nfs should have a similar option as samba does on unraid...

Hey @bmartino1, I replied via PM but I'll mention it here as well, I'll use your skeleton as a base and roll out a NFS version as well as a separate plugin.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.