Skip to content

Instantly share code, notes, and snippets.

@mysticaltech
Last active October 23, 2022 23:38
Show Gist options
  • Save mysticaltech/89204c7ec3dff2da1609505c55005525 to your computer and use it in GitHub Desktop.
Save mysticaltech/89204c7ec3dff2da1609505c55005525 to your computer and use it in GitHub Desktop.
How to share an external drive via NFS on Fedora Linux for Kodi as a client
1/ Install nfs-utils
sudo dnf install nfs-utils
2/ Enable the needed services
sudo systemctl enable rpcbind
sudo systemctl enable nfs-server
sudo service rpcbind start
sudo service nfs-server start
3/ Edit the exports file with your share
sudo vim /etc/exports
<path to your drive> 192.168.1.0/255.255.255.0(rw,sync,no_all_squash,root_squash,insecure,fsid=0,no_subtree_check,crossmnt)
4/ Give your drive the correct permissions
sudo chmod -R 777 /run/media/karim/Videos
sudo chown -R nobody: /run/media/karim/Videos
5/ Open the firewall for nfs
sudo firewall-cmd --permanent --add-service=nfs
sudo firewall-cmd --permanent --add-service=rpc-bind
sudo firewall-cmd --permanent --add-service=mountd
sudo firewall-cmd --permanent --add-service=mountd
sudo firewall-cmd --reload
6/ Apply the changes
sudo service nfs-server restart
sudo service nfs-server status
Only if errors:
sudo rm /run/systemd/system/*.mount
sudo systemctl daemon-reload
sudo service nfs-server restart
sudo service nfs-server status
7/ Verify that all is good
sudo exportfs -v
8/ Grab your IP
ifconfig
9/ Connect in Kodi
Choose source "nfs"
nfs://<your local ip>/<path to your drive>
Say ok to the warnings, and continue, you will see your files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment