NAS folders on Home Assistant

Hi, in “Media” I would like to be able to see the folder of my NAS server, but I can not find any method to connect my server, in my Windows computer I just add this in the bar: “\” then I enter the username and password and I see all my server folders, I want the same thing on HomeAssistant, so I can finally play all multimedia content anywhere in my house, is it possible?

So currently it is not possible to put somewhere in the file “configuration.yaml” or something like that the ip of my server with username and password to see my multimedia files inside “Media”?

There’s currently a Feature Request to allow mounting of a NAS share on HA:

That’s probably a good first step toward getting your media in HA. Please up-vote that FR if you agree.


But are we sure that it is not possible to just put a string like smb:\admin:[email protected] somewhere and then see the contents inside “Media”? it seems strange to me, there are many apps like Plex and many others that give access to specific folders of the NAS server, there is also the Synology app

(unfortunately it is not my NAS model)

Yes absolutely positive. Or everyone wouldn’t keep asking for it in Feature Requests.

I was wrong. See Mischa’s post below.


I’m running it, followed this video.

1 Like

Interesting. Do you have to exclude that mount from your backups to prevent them becoming huge?

I wonder why he uses CIFS instead of SMB?

not that i know, i never did and have no problems…

1 Like

Cifs is the newer form of smbfs

It’s an MS implementation of SMB from what I was reading. I don’t know enough about it to say if that is good or bad. I just look at what they did to web standards with internet exploder and judge them harshly :slight_smile:

1 Like

Don’t we all!

That’s just naming, it has nothing to do with Microsoft.
man mount.cifs

mount.cifs mounts a CIFS or SMB3 filesystem from Linux. It is usually invoked indirectly by the mount(8) command when using the “-t cifs” option. This command only works in Linux, and the kernel must support the cifs filesystem. The SMB3 protocol is the successor to the CIFS (SMB) protocol and is supported by most Windows servers, Azure (cloud storage), Macs and many other commercial servers and Network Attached Storage appliances as well as by the popular Open Source server Samba.

1 Like

Because if you want to mount a Windows filesystem (here I guess it is NTFS) on Linux you have to tell about it. SMB is the protocol, by using cifs or ext2/4 you’re telling mount which filesystem has to be handled.
If you don’t tell mount about the filesystem it’ll guess it and this might hit the wall.
See here at -t, --types vfstype

He also uses -o vers=3.0 which tells mount to use SMB version 3. If some has an older NAS or trying to mount a directory from an older Windows machine, this might not work. Try to find out which SMB version the NAS/Server is using or try with using -o vers=2.2 (2.1, 2.0)

smb and cifs are network implementations, nothing to do with ext2, ext3 or ntfs. They go back to netbios, an implementation of networking that windows adopted when they wete trying to dominate computing by reinventing shit that proper oses had done successfully fir years.

samba is an open source implementation of smb and cifs.

I didn’t say that.

But I expressed it like this, because Tom asked why cifs is used and not smb.

SMB is used - but here -t cifs is a parameter of the mount command and tells how the shared folder should be accessed.
Since we are not trying to mount a directory with a smb or nfs filesystem, but a shared folder presented by a Windows Server or NAS we have to use the -t cifs parameter or use mount.cifs (and not -t smbfs or -t nfs4) , right?

-t, --types vfstype
For most types all the mount program has to do is issue a simple mount system call, and no detailed knowledge of the filesystem type is required. For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) ad hoc code is necessary. The nfs, nfs4, cifs, smbfs, and ncpfs filesystems have a separate mount program. In order to make it possible to treat all types in a uniform way, mount will execute the program /sbin/mount.TYPE (if that exists) when called with type TYPE.

1 Like

Correct, and a good explanation.

It would be very, very helpful. I’m using a NAS with 8Tb of storage. There are also movies and series on this. It would be nice if I could use the Plex add-on. Now I need to run a Plex server separately. But it would also be nice if the cameras could save video to NAS. Or automatically back up to the NAS. These are just ideas, but I would love to have at least access to the media folder.

I believe this is possible as long you mount your NAS directory into your share directory.

Ok, did I copy down his command line wrong?
I’ve done all of the following, with no success.

mount_nas_media: mkdir -p /media/nasmedia;mount -t cifs -o vers=3.0,noserverino,username=***,password=****,domain=WORKGROUP //192.168.1.***/Media_Library
mount_nas_media: mkdir -p /media/nasmedia;mount -t cifs -o vers=3.0,noserverino,username=***,password=**** //192.168.1.***/Media_Library
mount_nas_media: mkdir -p /media/nasmedia;mount -t cifs -o vers=2.2,noserverino,username=***,password=**** //192.168.1.***/Media_Library
mount_nas_media: mkdir -p /media/nasmedia;mount -t cifs,noserverino,username=***,password=**** //192.168.1.***/Media_Library
mount_nas_media: mkdir -p /media/nasmedia;mount -t cifs username=***,password=**** //192.168.1.***/Media_Library

I removed the domain after the first attempt because my synology doesn’t have a domain
All except the last one get an error code 1 and the last one gets an error code 255.

Any ideas??