FreeNAS as external storage in Nextcloud


I’m trying to add a SMB share hosted on my FreeNAS filer as external storage to my Nextcloud on UCS.

UCS and FreeNAS are members of the same active directory domain and a user can browse the SMB share from a Windows client.

But I cannot mount it as external storage in Nextcloud

I already played around with enabling SMB1 and NTLMv1, but it didn’t help.

FreeNAS Version: 11.2 U6
UCS Version: 4.4.2
Nextcloud version 16.0.4-0

cheers and thanks in advance

For some reason NetBIOS alias was set to the workgourp name in SMB service configuration on FreeNAS

Not sure if I added the alias by mistake or it came during a freenas upgrade because I cannot remember the setting at all…

Anyways : after removing the alias nextcloud can connect to freenas.

I am facing a similar problem, whereby I am trying to mount a samba share as external storage to nextcloud.
Did you have to open any ports on your docker host UCS server and/or add any NAT rules to the UCS firewall to allow connection to the external SAMBA server?
thanks, L.

Hi Lleo,
nope, the issue was only caused by the incorrect SAMBA settings on the freenas.
Although, there were lots of similar problems described in forums concerning incompatible Samba and SMB versions.
You are trying to add the external storage via the nextcloud web UI? I would recommend to do so and not to try to mount shares on the cli of UCS because I think nextcloud needs to keep track of file changes and it can’t do so if you bypass it by meddling in the file system.


Hi Michael,
thanks for getting back to me question.
Yes, I am trying to add a SMB/CIFS share in the nextcloud management UI to all my users and not succeeding.
The share host can be pinged from within the nextcloud docker shell and the share accessed with smbclient
When I try to mount it in the nextcloud UI, I get a red exclamation point. There is no record in the SAMBA logs of any attempt made from the nextcloud docker network or the docker host network. Obviously, when I use the smbclient, I get the logs on the SAMBA server and all is OK. I tried editing the smb.conf to specify the domain in the nextcloud to no avail. The SAMBA server is a member of the domain and accessible from other clients and or from Kopano, running on the same docker host.

Hi Lleo,
I felt a little bit helpless troubleshooting the issue. I also got the red ! and nothing else and I wasn’t able to find any good logs for troubleshooting. In the end it was trial and error until I found the configuration error. :expressionless:


Hm. Fun Fact: After the last update in NextCloud (to external storage seems stopped working for me as well.
I can used my already configured storages but I cannot add a new one. When I click on the ones I already have I get the red !. Nevertheless they are still working. But I cannot add new ones. Even to the same share as the ones that are still working.
I’ve rebooted all the hosts (FreeNAS, NextCloud, Client) -> didn’t help

Seems to me like a bug in Nextcloud on UCS… :frowning:

There is another thread with a link to the bug report for nextcloud and the workaround posted as well. You basically have to add a line to a php file to get it working again.

Hi Kevo! Thanks a lot!

This is the solution (or at least the workarround)

Just a little addion: Romanji had a little typo in the path of the SMB.php