Category Archives: nextcloud

Nextcloud broke SMB external shares again…do this to fix it

I’ve been running Nextcloud under Docker for a few years now. I use the nextcloud-stable-fpm-alpine image, pulled in with a Dockerfile to add some missing functionality: SMB external shares, ImageMagick, etc.

My Dockerfile looked something like this:

FROM nextcloud:stable-fpm-alpine

RUN apk add --no-cache procps samba-client imagemagick ffmpeg 

As of “Nextcloud Hub 26 Spring,” this no longer works. None of the shares work, and there’s a red notice under the external storage configuration that suggests using php-smbclient. This would now appear to be more than a mere suggestion.

To fix it, remove samba-client (which provides the CLI smbclient tool) and add the PHP smbclient extension:

FROM nextcloud:stable-fpm-alpine

RUN apk add --no-cache --virtual .build-deps g++ make autoconf shadow && apk add --no-cache samba-dev && pecl install smbclient && apk del --no-cache .build-deps && docker-php-ext-enable smbclient
RUN apk add --no-cache procps imagemagick ffmpeg