Stuck on Docker image version (23.0.3.2)

Nextcloud version 23.0.3.2
Operating system and version: Ubuntu 20.04.6 LTS
Apache or nginx version: 2.4.41
PHP version: 8.2.15

The issue you are facing: Every time I try to update my docker image, through the web interface, or manually, or even starting from scratch, I get the same error which eventually does not allow my next cloud to load. It seems my Docker image is always stuck on 23.0.3.2.

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

  1. Running web update or
  2. Running manual update or
  3. Starting new docker image from scratch

The output of your Nextcloud log in Admin > Logging:

Can't start Nextcloud because the version of the data (23.0.12.2) is higher than the docker image version (23.0.3.2) and downgrading is not supported. Are you sure you have pulled the newest image version?

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocybd3gf745v',
  'passwordsalt' => 'XXXXXX',
  'secret' => 'XXXXXX',
  'trusted_domains' => 
  array (
    0 => 'XXXXXXXXX',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'sqlite3',
  'version' => '23.0.3.2',
  'overwrite.cli.url' => 'XXXXXXXXX',
  'installed' => true,
);

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

 cat nextcloud.log 
{"reqId":"4Ypil1PhpjrGpKR0Qg78","level":2,"time":"2024-02-25T06:44:01+00:00","remoteAddr":"XXXXX","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3.1 Safari/605.1.15","version":""}

Here is my docker-compose.yml:

version: '3'

volumes:
  nextcloud-data:
  nextcloud-db:
  npm-data:
  npm-ssl:
  npm-db:

networks:
  frontend:
  backend:

services:

  nextcloud-app:
    build: 
      context: . 
      dockerfile: Dockerfile
    restart: always
    volumes:
      - nextcloud-data:/var/www/html
    environment:
      - MYSQL_PASSWORD=xxx
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=nextcloud-db
    networks:
      - frontend
      - backend

  nextcloud-db:
    image: mariadb:10.5
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    volumes:
      - nextcloud-db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=xxx
      - MYSQL_PASSWORD=xxx
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - OVERWRITEPROTOCOL=https
    networks:
      - backend

  npm-app:
    image: jc21/nginx-proxy-manager:latest
    restart: always
    ports:
      - "80:80"
      - "81:81"
      - "443:443"
    environment:
      - DB_MYSQL_HOST=npm-db
      - DB_MYSQL_PORT=3306
      - DB_MYSQL_USER=npm
      - DB_MYSQL_PASSWORD=xxx
      - DB_MYSQL_NAME=npm
    volumes:
      - npm-data:/data
      - npm-ssl:/etc/letsencrypt
    networks:
      - frontend
      - backend

  npm-db:
    image: jc21/mariadb-aria:latest
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=xxx
      - MYSQL_DATABASE=npm
      - MYSQL_USER=npm
      - MYSQL_PASSWORD=xxx
    volumes:
      - npm-db:/var/lib/mysql
    networks:
      - backend
  • It appears you’re using a custom image you’re building yourself. You’ll need to check your Dockerfile content (it references the actual image base you’re using), as well as make sure you’re pulling and rebuilding your local image in order to upgrade.
  • Don’t use the web updater (at least in most of the various Nextcloud images that exist today; always just change the image tag to the target version then do standard docker compose pull followed by docker compose up -d.
  • The error you’re getting combined with the update approach you described, suggests you did a web update or command-line update, which updated the data in your volumes but did not actually upgrade the Nextcloud image (see above).
  • Bare very careful about versioning; best practice is to include one of the supported version tags for your chosen image that is more specific than just latest / nothing. Otherwise you may accidentally upgrade across major versions or unexpected upgrade when it’s not your intention.

I inherited this install and am trying to figure it out. cat Dockerfile gives me:

FROM nextcloud 
RUN apt-get update && apt-get install -y bash 
RUN apt install smbclient -y bash

When I inspect the package, I see this line for “NEXTCLOUD_VERSION=23.0.3” but I do not see this line in /config/config.php.

  "Config": {
            "Hostname": "7ab04e669574",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "80/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "MYSQL_PASSWORD=XXXXX",
                "MYSQL_DATABASE=nextcloud",
                "MYSQL_USER=nextcloud",
                "MYSQL_HOST=nextcloud-db",
                "PHP_UPLOAD_LIMIT=200G",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "PHPIZE_DEPS=autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c",
                "PHP_INI_DIR=/usr/local/etc/php",
                "APACHE_CONFDIR=/etc/apache2",
                "APACHE_ENVVARS=/etc/apache2/envvars",
                "PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
                "PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
                "PHP_LDFLAGS=-Wl,-O1 -pie",
                "GPG_KEYS=1729F83938DA44E27BA0F4D3DBDB397470D12172 BFDDD28642824F8118EF77909B67A5C12229118F",
                "PHP_VERSION=8.0.17",
                "PHP_URL=https://www.php.net/distributions/php-8.0.17.tar.xz",
                "PHP_ASC_URL=https://www.php.net/distributions/php-8.0.17.tar.xz.asc",
                "PHP_SHA256=4e7d94bb3d144412cb8b2adeb599fb1c6c1d7b357b0d0d0478dc5ef53532ebc5",
                "PHP_MEMORY_LIMIT=512M",
                "NEXTCLOUD_VERSION=23.0.3"
            ],

Do you know how I can make sure I actually update the docker image?? Thanks so much!

In any case, make sure that you update to the latest Nextcloud version 24, then 25 and so on.

And maybe it makes sense to migrate to Releases · nextcloud/all-in-one · GitHub in order to get a clean installation.

I have done this, and upgraded manually, but as soon as I restart, I get the error that my version is too new, and upon inspection, it says my Docker image is still 23.0.3.2 so that’s where I’m confused.

I’ll try one of the clean installations that you listed and see where that gets me. Thanks again.

edit: just want to say thanks, starting from scratch is way better, and would have saved me hours of my life. I just need to figure out why I can’t point it to my fqdn, and why I can’t access letsencrypt and a couple sites. Having some dns issues it seems.