Nextcloud Docker Compose Won't Update

Nextcloud version: 29.0.1.1
Operating system and version : Ubuntu 22.04.4 LTS
Apache or nginx version: Apache/2.4.59 (Debian)
PHP version: PHP/8.2.20

Okay, I’m wildly confused. My docker based nextcloud install simply won’t update.

docker compose pull
docker compose up -d

Doesn’t appear to change anything. Even the /usr/src/nextcloud inside the image has the same version 29.0.1.1 instead of the 29.0.2 which is supposed to be the latest. My docker-compose.yaml is almost identical to the example in all important aspects, but I’m obviously missing something.

I’ll replace any instance of my public hostname with publichostname.com

docker-compose.yaml

version: "3"

services:
  db:
    image: mariadb:10.6
    container_name: nextcloud-db
    command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
    restart: unless-stopped
    volumes:
      - db:/var/lib/mysql:z
    environment:
      - MARIADB_ROOT_PASSWORD=<CENSORED>
      - MARIADB_AUTO_UPGRADE=1
      - MARIADB_DISABLE_UPGRADE_BACKUP=1
    env_file:
      db.env

  redis:
    image: redis:alpine
    container_name: nextcloud-redis
    restart: unless-stopped

  app:
    image: nextcloud:apache
    container_name: nextcloud-app
    restart: unless-stopped
    volumes:
      - nextcloud:/var/www/html:z
      - /mnt/archive/NextCloud:/var/www/html/data
    ports:
      - 4380:80
    environment:
      - APACHE_DISABLE_REWRITE_IP=1
      - VIRTUAL_HOST=publichostname.com
      - NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.publichostname.com
      - MYSQL_HOST=db
      - REDIS_HOST=redis
      - OVERWRITEHOST=nextcloud.publichostname.com
      - OVERWRITEPROTOCOL=https
      - OVERWRITECLIURL=https://nextcloud.publichostname.com
      - PHP_MEMORY_LIMIT=4096M
    env_file:
      - db.env
    extra_hosts:
      - "host.docker.internal:host-gateway"
      - "mail.publichostname.com:host-gateway"
    depends_on:
      - db
      - redis
    networks:
      - default

  cron:
    image: nextcloud:apache
    container_name: nextcloud-cron
    restart: unless-stopped
    volumes:
      - nextcloud:/var/www/html:z
      - /mnt/archive/NextCloud:/var/www/html/data
    entrypoint: /cron.sh
    environment:
      - PHP_MEMORY_LIMIT=4096M
    extra_hosts:
      - "host.docker.internal:host-gateway"
      - "mail.publichostname.com:host-gateway"
    depends_on:
      - db
      - redis

volumes:
  db:
  nextcloud:

db.env

MYSQL_PASSWORD=<CENSORED>
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud

/var/www/html/config/config.php

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'redis',
    'password' => '',
    'port' => 6379,
  ),
  'upgrade.disable-web' => true,
  'instanceid' => '<CENSORED>',
  'passwordsalt' => '<CENSORED>',
  'secret' => '<CENSORED>',
  'trusted_domains' =>
  array (
    0 => 'nextcloud.abramearly.com',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '29.0.1.1',
  'overwrite.cli.url' => 'https://nextcloud.publichostname.com',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '<CENSORED>',
  'installed' => true,
  'overwritehost' => 'nextcloud.publichostname.com',
  'overwriteprotocol' => 'https',
  'loglevel' => 0,
  'maintenance' => false,
  'mail_from_address' => 'no-reply',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'publichostname.com',
  'mail_smtpport' => '25',
  'mail_smtphost' => 'mail.publichostname.com',
  'mail_smtpdebug' => true,
  'maintenance_window_start' => 1,
  'default_phone_region' => 'US',
);

HTTPS is supplied by an nginx server running directly on my local machine that acts as a proxy for multiple subdomains, and forwards any requests to nextcloud.* to the docker container.

Incidentally, I’m also realized that I might have forgotten to return loglevel back to normal after figuring out the smtp server settings.

Any recommendations will be highly appreciated.

there is no 29.0.2 image so far. community docker is usually delayed few days…

https://hub.docker.com/_/nextcloud/tags?page=&page_size=&ordering=&name=29.0

1 Like

Oh good grief, I should have thought of that. I’m so sorry for wasting your time on this then! Thank you.

1 Like

Why is nextcloud update process so unreliable? Every new version has some sort of upgrade issue.

I can confirm trying to upgrade to 29.0.2 causes Forbidden error. Same upgrade process as before:

  1. docker compose pull
  2. docker compose up -d
  3. Forbidden Message in the Dashboard page and Upgrade needed message using occ through command line.

Without more context, we can’t help you. Provide the exact error. Also probably best not to take over a thread covering an entirely different topic. :slight_smile:

Post your Compose file.

there is still no 29.0.2 docker community image - please spend a second to educate yourself!

image
if that is the case why is this flashing across ? educate me…


please …do educated me since you apparently know best…

1st rule of system administration: Dont release something that is not ready

taking over? upgrade from 29.0 to 29.0.1 did absolutely nothing which is the same issue as the OP , going from 29.0 to 29.0.2 is failing as well. hence me stating a simple fact Nextcloud cannot reliably perform upgrades…circa NC22

here is the docker compose:

services:
  db:
    image: mariadb:10.6
    command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
    restart: always
    volumes:
      - db:/var/lib/mysql:Z
    environment:
      - MYSQL_ROOT_PASSWORD=something
      - MARIADB_AUTO_UPGRADE=1
      - MARIADB_DISABLE_UPGRADE_BACKUP=1
    env_file:
      - db.env

  redis:
    image: redis:alpine
    restart: always

  app:
    image: nextcloud:apache
    restart: always
    ports:
      - 0.0.0.0:8080:80
    volumes:
      - nextcloud:/var/www/html:z
    environment:
      - MYSQL_HOST=db
      - REDIS_HOST=redis
    env_file:
      - db.env
    depends_on:
      - db
      - redis

  cron:
    image: nextcloud:apache
    restart: always
    volumes:
      - nextcloud:/var/www/html:z
    entrypoint: /cron.sh
    depends_on:
      - db
      - redis

volumes:
  db:
  nextcloud:

also to whomever commented about images not being available yet:
why is docker literally pulling new images … following their logic I should not be able to pull images…since they’re not there

there is no 29.0.2 Docker image now. The upgrade check in the web-interface is generic and has nothing to do with docker image you are running (but it not expected on Docker community image). I would recommend you disable web updater for docker using occ config:system:set upgrade.disable-web --value=true

if that is the case why is this flashing across ? educate me…

Downstream images are not released at the same time as new Server releases. Obviously a new Server release will usually trigger downstream images releases, but they’re not 100% in sync for various reasons.

Forbidden Message in the Dashboard page and Upgrade needed message using occ through command line.

You’ll need to elaborate on the “Forbidden Message” you’re seeing. A log entry or screenshot or whatever it is you’re seeing would be helpful.

Though if you’re being told to run finish the upgrade via occ at the command line, it’s an indication something is very wrong. occ upgrade is automatically ran by the Docker entrypoint.sh at start-up after it deploys the updated code successfully. You will likely find clues as to what is going wrong in your app container’s Docker log (and, in turn, also your nextcloud.log or equivalent).

For the record, that Docker image (the micro-services one), doesn’t use Nextcloud’s Updater. It deploys all the code changes in its own way (via the entrypoint.sh). However, it does trigger the occ upgrade (note: not the updater) on its own (automatically) once that part finishes to trigger the standard db migrations and app updates. You should never have to run occ upgrade manually on a Docker image (other than in some recovery scenarios). Again, check your app container logs. There is no reason for us to be guessing about what is going on or why updates are failing in your environment.

also to whomever commented about images not being available yet:
why is docker literally pulling new images … following their logic I should not be able to pull images…since they’re not there

Because the images are updated for other reasons, not just with new Server versions. The latest image updates (a few days ago) were automated builds because the base underlying images (e.g. Debian base OS and Alpine OS) images were updated. These are in no way tied to Nextcloud Server versions.

1 Like

To be fair, it appears they already have that set. And recently installed containers (since late last year) using that image have that option set to true already as the default.

That option, however, merely prevents the built-in Nextcloud Updater from being triggered (which is good because that should never be used in a container running that image). The update availability screen under Admin settings->overview (and related notifications) regarding new versions still take place.

Unfortunately at the moment there is no means for Nextcloud Server to be aware how it was installed precisely (and thus adjust it’s overview screen or notifications based specifically on that). That is, in part, I believe by the AIO Docker image maintainers chose to disable the notifier as well (provided by the updatenotification app for those curious). That, however, is not presently appropriate for the micro-services image (since there is no management wrapper around it like there is for AIO).

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.