Stuck on Docker image version (

Nextcloud version
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

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 ( is higher than the docker image version ( 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!):

$CONFIG = array (
  'instanceid' => 'ocybd3gf745v',
  'passwordsalt' => 'XXXXXX',
  'secret' => 'XXXXXX',
  'trusted_domains' => 
  array (
    0 => 'XXXXXXXXX',
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'sqlite3',
  'version' => '',
  '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'




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

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

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

    image: jc21/mariadb-aria:latest
    restart: always
      - MYSQL_DATABASE=npm
      - MYSQL_USER=npm
      - MYSQL_PASSWORD=xxx
      - npm-db:/var/lib/mysql
      - 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": [
                "PHPIZE_DEPS=autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c",
                "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",

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 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.