Nextcloud server not working after update 30.0.2-fpm-alpine via CasaOS

Hello! The configured Next cloud not working after upgrading to 30.2-fpm-alpine (via CasaOS), the web interface page does not open and synchronization via the windows and android application is not available. It’s a shame that after setting up, I lost access to the server and its database and do not know how to restore it. Please help me.

Removed docker, reinstalled NextCloud manually on a clean server. I won’t mess with CasaOS and the like anymore. In general, the best backup method is to copy it manually to several different drives. It’s good that I have all the information not only on the server, this experience will serve as a lesson for me in the future.

I’m facing the same issue. Any ideas?

You need to check the container logs. Otherwise we’re just guessing.

Also, there are other factors since the OP mentioned using the fpm version of the image. That means there is a separate web server running somewhere. That is what needs to be checked, but there’s not enough information in this post to troubleshoot that.

Those are, however, some clues about where to look to isolate the problem.

I have the same problem. Looks to me like insufficient file permissions for the web server. However, I have no idea how I can recover the upgrade in this situation. I would be very grateful for any tips! Here is my container log:

nextcloud  | Initializing nextcloud 30.0.2.2 ...
nextcloud  | Upgrading nextcloud from 29.0.0.19 ...
nextcloud  | {"reqId":"JtoM4KR3TfbypzApUQmZ","level":3,"time":"2024-12-14T00:30:32+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fopen(/var/www/html/config/config.php): Failed to open stream: Permission denied at /var/www/html/lib/private/Config.php#225","userAgent":"--","version":"","data":{"app":"PHP"}}
nextcloud  | => Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/pre-upgrade
nextcloud  | Cannot write into "config" directory!
nextcloud  | This can usually be fixed by giving the web server write access to the config directory.
nextcloud  | 
nextcloud  | But, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.
nextcloud  | See https://docs.nextcloud.com/server/30/go.php?to=admin-config
nextcloud  | {"reqId":"srJL2KL0KHCDVs5mBOd0","level":3,"time":"2024-12-14T00:31:04+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fopen(/var/www/html/config/config.php): Failed to open stream: Permission denied at /var/www/html/lib/private/Config.php#190","userAgent":"--","version":"","data":{"app":"PHP"}}
nextcloud  | {"reqId":"GVTb4qt0xmVTQtBUezBX","level":3,"time":"2024-12-14T00:31:04+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fopen(/var/www/html/config/config.php): Failed to open stream: Permission denied at /var/www/html/lib/private/Config.php#190","userAgent":"--","version":"","data":{"app":"PHP"}}
nextcloud  | The following apps have been disabled:
nextcloud  | => Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/post-upgrade
nextcloud  | Initializing finished
nextcloud  | Warning: /var/www/html/config/redis.config.php differs from the latest version of this image at /usr/src/nextcloud/config/redis.config.php
nextcloud  | Warning: /var/www/html/config/reverse-proxy.config.php differs from the latest version of this image at /usr/src/nextcloud/config/reverse-proxy.config.php
nextcloud  | Warning: /var/www/html/config/s3.config.php differs from the latest version of this image at /usr/src/nextcloud/config/s3.config.php
nextcloud  | Warning: /var/www/html/config/smtp.config.php differs from the latest version of this image at /usr/src/nextcloud/config/smtp.config.php
nextcloud  | => Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/before-starting
nextcloud  | [14-Dec-2024 00:31:04] NOTICE: fpm is running, pid 1
nextcloud  | [14-Dec-2024 00:31:04] NOTICE: ready to handle connections
nextcloud  | [14-Dec-2024 01:03:17] NOTICE: Finishing ...
nextcloud  | [14-Dec-2024 01:03:17] NOTICE: exiting, bye-bye!
nextcloud  | Warning: /var/www/html/config/redis.config.php differs from the latest version of this image at /usr/src/nextcloud/config/redis.config.php
nextcloud  | Warning: /var/www/html/config/reverse-proxy.config.php differs from the latest version of this image at /usr/src/nextcloud/config/reverse-proxy.config.php
nextcloud  | Warning: /var/www/html/config/s3.config.php differs from the latest version of this image at /usr/src/nextcloud/config/s3.config.php
nextcloud  | Warning: /var/www/html/config/smtp.config.php differs from the latest version of this image at /usr/src/nextcloud/config/smtp.config.php
nextcloud  | => Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/before-starting
nextcloud  | [14-Dec-2024 01:03:28] NOTICE: fpm is running, pid 1
nextcloud  | [14-Dec-2024 01:03:28] NOTICE: ready to handle connections
nextcloud  | [14-Dec-2024 01:03:53] NOTICE: Finishing ...
nextcloud  | [14-Dec-2024 01:03:53] NOTICE: exiting, bye-bye!
nextcloud  | Warning: /var/www/html/config/redis.config.php differs from the latest version of this image at /usr/src/nextcloud/config/redis.config.php
nextcloud  | Warning: /var/www/html/config/reverse-proxy.config.php differs from the latest version of this image at /usr/src/nextcloud/config/reverse-proxy.config.php
nextcloud  | Warning: /var/www/html/config/s3.config.php differs from the latest version of this image at /usr/src/nextcloud/config/s3.config.php
nextcloud  | Warning: /var/www/html/config/smtp.config.php differs from the latest version of this image at /usr/src/nextcloud/config/smtp.config.php
nextcloud  | => Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/before-starting
nextcloud  | [14-Dec-2024 01:03:54] NOTICE: fpm is running, pid 1
nextcloud  | [14-Dec-2024 01:03:54] NOTICE: ready to handle connections

You appear to be using an FPM image. NC runs within FPM in that case. Are your Docker volumes bind mounts perhaps? If so, you may need to manually fix your permissions.

Please post your Compose file.

This is the compose file of the working NC docker volume:

name: nextcloud
services:
  nextcloud:
    cpu_shares: 90
    command: []
    container_name: nextcloud
    deploy:
      resources:
        limits:
          memory: 3791M
        reservations:
          memory: "536870912"
    environment:
      - NEXTCLOUD_TRUSTED_DOMAINS='<edited>'
    hostname: nextcloud
    image: nextcloud:29.0.0
    labels:
      icon: https://cdn.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/Nextcloud/icon.png
    ports:
      - target: 80
        published: "10081"
        protocol: tcp
      - target: 443
        published: "10443"
        protocol: ""
    restart: unless-stopped
    volumes:
      - type: bind
        source: /DATA/AppData/nextcloud/var/www/html
        target: /var/www/html
    x-casaos:
      ports:
        - container: "80"
          description:
            en_us: WebUI HTTP Port
            zh_cn: WebUI HTTP 端口
        - container: "443"
          description:
            en_us: WebUI HTTPS Port
            zh_cn: WebUI HTTPS 端口
      volumes:
        - container: /var/www/html
          description:
            en_us: Nextcloud config directory.
            zh_cn: Nextcloud 配置目录。
    devices: []
    cap_add: []
    network_mode: bridge
    privileged: false
x-casaos:
  architectures:
    - amd64
    - arm
    - arm64
    - "386"
    - mips64le
    - ppc64le
    - s390x
  author: CasaOS Team
  category: Cloud
  description:
    ar_sa: يضع Nextcloud بياناتك في أصابعك، تحت سيطرتك. احفظ مستنداتك والتقويم وجهات
      الاتصال والصور على خادم في المنزل أو في أحد مزودينا أو في مركز بيانات تثق
      به.
    de_de: Nextcloud stellt Ihre Daten in Ihren Händen, unter Ihrer Kontrolle.
      Speichern Sie Ihre Dokumente, Kalender, Kontakte und Fotos auf einem
      Server zu Hause, bei einem unserer Anbieter oder in einem von Ihnen
      vertrauten Datenzentrum.
    en_us: >
      Discover the ultimate solution for remote collaboration with Nextcloud.
      Unlike traditional office software, Nextcloud seamlessly integrates files,
      communication, and productivity tools into one platform, enhancing
      teamwork and streamlining your workflow. Say goodbye to the limitations of
      conventional tools and embrace a new era of collaboration.


      Nextcloud stands out with its robust features tailored for every need. Enjoy secure file storage, real-time communication via Talk, comprehensive groupware, and powerful office integration, all in one place. Experience these top-notch features at an affordable price, making it accessible for everyone to elevate their collaboration game.


      Deploying Nextcloud on a Zima private cloud device brings unparalleled convenience. Benefit from unlimited storage, secure data privacy, local network speeds, and multi-device access, ensuring you have everything you need at your fingertips.
    es_es: Nextcloud pone sus datos a su alcance, bajo su control. Almacene sus
      documentos, calendario, contactos y fotos en un servidor en casa, en uno
      de nuestros proveedores o en un centro de datos que confíe.
    fr_fr: Nextcloud met vos données à votre portée, sous votre contrôle. Stockez
      vos documents, calendriers, contacts et photos sur un serveur à la maison,
      chez l'un de nos fournisseurs ou dans un centre de données que vous pouvez
      faire confiance.
    hu_hu: A Nextcloud adatait a saját kezében tartja, saját irányítása alatt.
      Tárolja dokumentumait, naptárát, kapcsolatait és fényképeit otthoni
      szerverén, szolgáltatóink egyikén vagy megbízható adatközpontjában.
    it_it: Nextcloud mette i tuoi dati a portata di mano, sotto il tuo controllo.
      Memorizza i tuoi documenti, calendario, contatti e foto su un server in
      casa tua, su uno dei nostri fornitori o in un data center che ti fidi.
    pl_pl: Nextcloud umożliwia przechowywanie danych w Twoim domu, w Twoim zakresie
      kontroli. Przechowuj dokumenty, kalendarz, kontakty i zdjęcia na serwerze
      w domu, u jednego z naszych dostawców lub w zaufanym centrum danych.
    pt_br: O Nextcloud coloca seus dados nas suas mãos, sob o seu controle. Armazene
      seus documentos, calendário, contatos e fotos em um servidor em casa, em
      um de nossos provedores ou em um centro de dados que você confia.
    ru_ru: Nextcloud помещает ваши данные под вашим контролем. Храните свои
      документы, календарь, контакты и фотографии на сервере дома, у одного из
      наших поставщиков или в доверенном вам центре данных.
    sv_se: Nextcloud ger dig kontroll över dina data. Lagra dina dokument, kalender,
      kontakter och foton på en server hemma, hos en av våra leverantörer eller
      i ett datacenter du litar på.
    uk_ua: Nextcloud розташовує ваші дані під вашим контролем. Зберігайте свої
      документи, календар, контакти та фотографії на сервері вдома, у одного з
      наших постачальників або у довіреному центрі даних.
    zh_cn: >
      发现远程协作的终极解决方案——Nextcloud。不同于传统的办公软件,Nextcloud
      将文件、通信和生产力工具无缝整合到一个平台中,增强团队合作并简化您的工作流程。告别传统工具的局限,迎接协作新时代。


      Nextcloud 以其强大的功能脱颖而出,满足各种需求。享受安全的文件存储,通过 Talk 实现实时通信,综合群件以及强大的办公集成,一切尽在一个平台。体验这些一流功能,以实惠的价格,使每个人都能提升协作水平。


      在 Zima 私有云设备上部署 Nextcloud 带来无与伦比的便利。享受无限存储、安全的数据隐私、本地网络速度和多设备访问,确保您所需的一切触手可及。
  developer: Nextcloud
  hostname: ""
  icon: https://cdn.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/Nextcloud/icon.png
  index: /
  is_uncontrolled: false
  main: nextcloud
  port_map: "10081"
  scheme: http
  screenshot_link:
    - https://cdn.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/Nextcloud/screenshot-1.png
    - https://cdn.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/Nextcloud/screenshot-2.png
    - https://cdn.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/Nextcloud/screenshot-3.png
    - https://cdn.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/Nextcloud/screenshot-4.png
    - https://cdn.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/Nextcloud/screenshot-5.png
  store_app_id: nextcloud
  tagline:
    ar_sa: منصة الإنتاجية التي تبقيك تحت سيطرتك
    de_de: Die Produktivitätsplattform, die Sie unter Kontrolle hält
    en_us: Content collaboration platform
    es_es: La plataforma de productividad que te mantiene en control
    fr_fr: La plate-forme de productivité qui vous permet de rester en contrôle
    hu_hu: A termelékenységi platform, amely megőrzi a kontrollot
    it_it: La piattaforma di produttività che ti mantiene in controllo
    pl_pl: Platforma produktywności, która utrzymuje cię w kontroli
    pt_br: A plataforma de produtividade que mantém você sob controle
    ru_ru: Платформа производительности, которая держит вас под контролем
    sv_se: Produktivitetsplattformen som håller dig i kontroll
    uk_ua: Платформа продуктивності, яка дозволяє вам залишатися під контролем
    zh_cn: 内容协作平台
  thumbnail: https://cdn.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/Nextcloud/thumbnail.png
  tips: {}
  title:
    custom: ""
    en_us: Nextcloud

Same issue. In fact this is the third (and last) time Nextcloud stops working after updating it from CasaOS forcing me to reinstall.
Moving to docker compose or other method because CasaOs / nextcloud combination has not been reliable for me.

From looking at how CasaOS packages Nextcloud, they switched from the default image to the fpm-based image when they bumped to v30.0.2. However I see no other changes made to their package to accommodate running Nextcloud under FPM. That will not work as-is. I suggest reporting it as a potential bug to CasaOS.

As an aside, if I’m reading that right: the CasaOS provided package was never updated in-between… so it was stuck on NC v29.0.0 without any maintenance releases ever in between?

Ouch. Maybe one of you wants to volunteer to help out the CasaOS maintainer(s) with keeping the package up-to-date whenever new maintenance releases are published of Nextcloud? :wink: