Installation of nextcloud 18.0.3 in Docker mode, the SMB / CIFS option does not appear in the External Storage option

Hi everything OK?

I installed Nextcloud 18.0.3, in Docker mode, on Ubuntu Arm64. On a Raspberry Pi 4 computer.

The problem is that the option External Storage does not appear the option “smb / cifs”: See message below:

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

Despite having installed the necessary SWs. See below:

"
ubuntu @ ubuntu: / $ sudo dpkg --list | grep ‘samba \ | smb’
ii libsmbclient: arm64 2: 4.7.6 + dfsg ~ ubuntu-0ubuntu2.15 arm64 shared library for communication with SMB / CIFS servers
ii php-smbclient 0.8.0-3build2 arm64 PHP wrapper for libsmbclient
ii python-samba 2: 4.7.6 + dfsg ~ ubuntu-0ubuntu2.15 arm64 Python bindings for Samba
ii samba 2: 4.7.6 + dfsg ~ ubuntu-0ubuntu2.15 arm64 SMB / CIFS file, print, and login server for Unix
ii samba-common 2: 4.7.6 + dfsg ~ ubuntu-0ubuntu2.15 all common files used by both the Samba server and client
ii samba-common-bin 2: 4.7.6 + dfsg ~ ubuntu-0ubuntu2.15 arm64 Samba common files used by both the server and the client
ii samba-dsdb-modules 2: 4.7.6 + dfsg ~ ubuntu-0ubuntu2.15 arm64 Samba Directory Services Database
ii samba-libs: arm64 2: 4.7.6 + dfsg ~ ubuntu-0ubuntu2.15 arm64 Samba core libraries
ii samba-vfs-modules 2: 4.7.6 + dfsg ~ ubuntu-0ubuntu2.15 arm64 Samba Virtual FileSystem plugins
ii smbclient 2: 4.7.6 + dfsg ~ ubuntu-0ubuntu2.15 arm64 command-line SMB / CIFS clients for Unix
"
"
ubuntu@ubuntu:/$ sudo dpkg --list|grep ‘cifs’
ii cifs-utils 2:6.8-1 arm64 Common Internet File System utilities
"

Any idea?

Thanks in advance for your help.

Do you run this command inside the container or on your host? Asking because of the “strange” prompt.

On The Host.

Thanks.

Any idea?

Thanks in advance for your help.

which image are you using?

I don’t know if I understood your question well, but I installed nextcloud via docker-compose together with mariadb.

Software installed on the host not visible by the container?

Thanks.

in time.

Something strange about the “dpkg —list” command output. See: “php-smbclient 0.8.0-3build2 arm64 PHP wrapper for libsmbclient”.

It seems to me that it is not installed properly. Note that the output does not show the string “+ dfsg ~”.

Thanks.

yes. that’s the way it work’s. the container containes just what is needed to run the “application” (e.g. nextcloud, mariadb, nginx).

the docker file defines the content of the image. the image is pulled from a registry by the docker-compose file and started as a container.

in your docker-compose file is a line like image: nextcloud:latest

that leads to the following docker file

in line 45 starts the installation of the smb/cifs php modules.

three ways to add these module:

  • you log into the container and run an docker-php-ext-install -j .... that work’s till you update the the container with a new image. e.g. 18.0.4. then you have to rerun this command.
  • you clone the nextcloud-docker git repo, add the module to line 55, and build the image locally on your server.
    in this case you have to track the git repo for updates as well.
  • or you write your own docker file starting with “FROM nextcloud:latest” and “RUN docker-php-ext-install -j …”. that would always take the latest image and add the needed php modules.

or you open an issue that nextcloud will add this module already to there image. but as far as i remember that was already discussed here in this forum.

or you look for another image wher someone did this job already. you may look at nextcloudpi from ownyourbits.

I’m finding it all a bit complicated.

Was this due to problems with the installation of Nextcloud or the software that was installed during the installation of the containers?

I can start all over again. I am currently installing in a testing environment.

So, what do I need to install BEFORE installing Nextcloud and Mariadb so that installing these containers? Samba, php-smbclient etc

Thanks again for the help.

Below is my YML file. Any suggestions for changes?
"
version: ‘2’
volumes:
nextcloud:
db:
services:
db:
image: mariadb
command: --transaction-isolation = READ-COMMITTED --binlog-format = ROW
restart: always
volumes:
- / media / data / mariadb: / var / lib / mysql
environment:
- MYSQL_ROOT_PASSWORD = xxxxxxxx
- MYSQL_PASSWORD = xxxxxxxx
- MYSQL_DATABASE = DBnextcloud
- MYSQL_USER = nextcloud
app:
image: nextcloud
ports:
- 8080: 80
links:
- db
volumes:
- / media / data / nextcloud: / var / www / html
- / media / data / nextcloud / apps: / var / www / html / custom_apps
- / media / data / nextcloud / config: / var / www / html / config
- / media / data / nextcloud / data: / var / www / html / data
- / media / data / nextcloud / themes: / var / www / html / themes
environment:
- NEXTCLOUD_TRUSTED_DOMAINS = 192.168.1.250
restart: always
"

indeed it is.

first use ``` to quote yaml files. better readable.

we start here:

you have to download the content of this folder https://github.com/nextcloud/docker/tree/master/18.0/apache and change your docker-compose file to

app:
  build: .

before you run docker-compose up -d you have to edit the Dockerfile and add around line 58 the installation of the smb/cifs php module. i don’t know docker-php-ext-install so I can’t tell you what to add.

maybe you’ll find some advice here:

how to update?

when a new version is release you have to edit the Dockerfile and rerun docker-compose run -d

of course you have to check if the Dockerfile and the other files in that folder are changed.

If you have a look at the Nextcloud Docker documentation under Adding Features they have an example and Dockerfile showing how to rebuild the Nextcloud image with SMB support.