UB 18.04.2 LTS Nextcloud install (SMB and https:// .... config issues)

By the way try to use SMB connection test application https://apps.nextcloud.com/apps/smb_test

You need to fill in a Domain, e.g. IDONTLIKEBUGS

1 Like

Thank you:)

Sanok: That is impossible since my nextloud installation displays this error message

"smbclient" is not installed. Mounting of "SMB / CIFS", "SMB / CIFS using OC login" is not possible. Please ask your system administrator to install it.

and won’t even let me choose a SMB share as an option.

I somehow destroyed my installation and while doing so i found out ubuntu must be running apache2…

BUT… /var/www/… does not exist and i can’t control apache2 via service stop/start (etc) since the service is not known

This is not a manual installation of nextcloud… its the ?snap? installation that the ubuntu server dvd offers while installing unbuntu server …

Maybe installing nextcloud that way si not the best way?

Working installation:

dpkg --list|grep 'smb\|samba'

ii  libsmbclient:amd64                    2:4.7.6+dfsg~ubuntu-0ubuntu2.11            amd64        shared library for communication with SMB/CIFS servers
ii  php-smbclient                         0.8.0-3build2                              amd64        PHP wrapper for libsmbclient
ii  python-samba                          2:4.7.6+dfsg~ubuntu-0ubuntu2.11            amd64        Python bindings for Samba
ii  samba                                 2:4.7.6+dfsg~ubuntu-0ubuntu2.11            amd64        SMB/CIFS file, print, and login server for Unix
ii  samba-common                          2:4.7.6+dfsg~ubuntu-0ubuntu2.11            all          common files used by both the Samba server and client
ii  samba-common-bin                      2:4.7.6+dfsg~ubuntu-0ubuntu2.11            amd64        Samba common files used by both the server and the client
ii  samba-dsdb-modules                    2:4.7.6+dfsg~ubuntu-0ubuntu2.11            amd64        Samba Directory Services Database
ii  samba-libs:amd64                      2:4.7.6+dfsg~ubuntu-0ubuntu2.11            amd64        Samba core libraries
ii  samba-vfs-modules                     2:4.7.6+dfsg~ubuntu-0ubuntu2.11            amd64        Samba Virtual FileSystem plugins
ii  smbclient                             2:4.7.6+dfsg~ubuntu-0ubuntu2.11            amd64        command-line SMB/CIFS clients for Unix

Hi there,

what im loking for is a really easy noob proof guide to install nextcloud on ubuntu 18.04 that does not need additional knwowledge and doesn’t stop randomly in between or skips important steps to accomplish sidegoal that i’ ll never use or understand?

Maybe you know of such a guide?

How about this? For Ubuntu 18.04 is the same with snap.

Thank you ill try that out

Hi there, my output looks like this (After installing smbclient and php-smbclient):

It seems i’m missing additional plugins?

thank you for your support and patience :slight_smile:

Hi there tried that and i got it working right away, including https. I assume this is the same install procedure you can select directly from the live cd (you get the option to install nextcloud with the ubuntu server installation itself). Snap i guess?

Sadly the error with smb is still not gone

May be you can try to added it? Because it is not listed on your screenshot.

Tried adding it but even after a restart the problem is still there.The function smb in nextcloud snap is not working and still displaying thta smbclient is not installed.

Im currently trying to mount a smb share from linux. Got that working today but not permanently
How to i make shure this smb share is connected at boot and is listed in nextcloud? (fstab)

Try to added in /etc/fstab something like this if you are using guest account:

// /media/NAS cifs guest,uid=1000,iocharset=utf8 0 0

–> Source.
Or like this if you have to authorize yourself:

//server/share /pathto/mountpoint cifs credentials=/home/username/.smbcredentials,uid=shareuser,gid=sharegroup 0 0

With .smbcredentials file in your home directory:


–> Source.

Do not forget to rescan it periodically, e.g. via OS cronjob:

Otherwise it will be updated only when you accessing it.

Cool thank you very much i’ll try that:)

Tried it and it kinda works but now im unable to scan the data via

“sudo nextcloud.occ files:scan --all”

The outpot after runing that is:

“cannot stat path of the current working directory: Permission denied”

And it seems as if i do not have premissions to write to that folder.

Damn this is not easy and not user (especially noob) friendly…

Thank you for the help!

Check this out, looks like it is exatly the same issue was solved here:

Hi thank you i’ll try that out.

In the meantime im fighting with fstab which mounted my share once and i could even write to it but after a reboot (without changing fsatb) ist won’t mount again…

I edited fstab , rebooted , was able to create a folder and a file, did another reboot and it broke…?

Now its throwing error 22 at me. if i run this:

tail -f  /var/log/kern.log

It complains about the SMBversion i guess ?

I believe you have 2 problems:

  1. Apparmor (or snap) give no access to nextlcoud, so it is “protecting” your folder.
  2. CIFS you should specify version of SMB, e.g. vers=1.0 for old one, e.g. try to put credentials directly without file .smbcredentials if it does not work -o username=username,password=password,vers=3.0. To be honest, I never added Samba via fstab, so I have no working config on hands.

Thank you for helping anyways :slight_smile:

I’ll try that out…

I need to find out what apparmour is… Must be some sort of protection but what folder is it protecting the share or the mountpoint folder. Andy why im doing this as sudo user?

Would I be correct in my suspicion that you installed using the snap package? If so, there is a serious design flaw in the snap package where it does not include smbclient, and you can’t add it. Installing it via apt does not make it available to the snap installation. The snap installation also has a strange procedure for enabling SSL if I recall.

If you really want to use SMB, you’re going to want install a different way. After finding out snap won’t do SMB, I tried a manual installation, but I was having fits out of Collabora at the time and ultimately moved my setup to docker-compose. Although the docker image also doesn’t include smbclient, you can easily add it or rebuild the image to include it.

You could try the Nextcloud VM, everything is prepared and you just follow the on screen instructions to set it up.

Happy Nextclouding!