“Internal server error” or "Page not found" for admin login after changing mysql database location

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.5.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 22.04
  • Web server and version (e.g, Apache 2.4.25):
    • Not sure but the latest docker image
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx proxy manager
  • PHP version (e.g, 8.3):
    • PHP 8.1.2-1ubuntu2.20
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • Today
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Docker Portainer Stack (docker.io library nextcloud:latest)
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Cloudflare

Summary of the issue I am facing:

12 hours ago I moved the volume folder of nextcloud_db container from the default docker volume folder (/var/lib/docker/volumes/[nextcloud_db_id]/_data)
to my custom location (/root/nextcloud_data/db_volume)

for safety issue

I first stopped the stack using Portainer, then used rsync -av to copy the db_volume, then added the below command in docker-compose file and deployed in Portainer again.

volumes:
  - "/root/nextcloud_data/db_volume:/var/lib/mysql"

However, after deployment, I am not able to access my admin account after logging in.

for example: [domain]/index.php/apps/deck/ shows
The page could not be found on the server or you may not be allowed to view it.

and : [domain]/index.php/apps/dashboard/ shows
“Internal Server Error. The server was unable to complete your request.”.

However, the two other guest accounts are working as usual.

Steps to replicate it:

  1. Create a Portainer stack with nextcloud app container and MariaDB container together, not set up volume parameter for MariaDB
  2. After deployment, create an admin account and a guest account, then stop the stack, rsync the MariaDB volume folder from /var/lib/docker/volumes to any folder under /root folder
  3. Add the new volume path in the Portainer stack file for the MariaDB container, and start the stack again, you will see that the admin account is not able to access webpages anymore while the guest account works fine.

Log entries

when starting the stack after movement the docker log will show “New Nextcloud Instance” and tried to use occ maintenance:install but failed many times.

A bunch of 401 & 404 errors after login

127.0.0.1 - - [08/Feb/2025:09:07:40 +0800] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.62 (Debian) PHP/8.2.27 (internal dummy connection)"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /index.php/csrftoken HTTP/1.1" 200 855 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:17 +0800] "GET /index.php/apps/deck/ HTTP/1.1" 404 6558 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:34 +0800] "REPORT /remote.php/dav/files/undefined/ HTTP/1.1" 401 1197 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/index-DtTpkYe5.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/index-CJ7wDv5l.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /css/public-BffjDTy3.chunk.css HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/_plugin-vue2_normalizer-DLE8eHQU.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/public-CX3DIv4G.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/vue.runtime.esm-BrouV0Mr.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /css/_plugin-vue2_normalizer-hk4lAjcj.chunk.css HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/index-jVSJWteM.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/modulepreload-polyfill-DCUwxYMh.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/emoji-picker-Coav-X6q.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/FilesSettings-CUrsDOeW.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/logger.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/Activity.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/api.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/_commonjsHelpers.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/index.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/ActivityTab.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /css/NotificationsApp-DxAdg8d_.chunk.css HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/NcCheckboxRadioSwitch-D2GbHtCS.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /css/_plugin-vue2_normalizer-hZkPxjsJ.chunk.css HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/BrowserStorage-DJ68uFBL.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /css/BrowserStorage-CGfDtmoH.chunk.css HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /css/style-YXBskS14.chunk.css HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/NotificationsApp-DV09BU4a.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/style-CmLvDuwV.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /js/_plugin-vue2_normalizer-IVCPCvfq.chunk.mjs HTTP/1.1" 404 656 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "GET /ocs/v2.php/search/providers?from=%2Fapps%2Ffiles%2Ffiles HTTP/1.1" 200 1292 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:35 +0800] "POST /index.php/contactsmenu/contacts HTTP/1.1" 412 756 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:34 +0800] "GET /ocs/v2.php/apps/files/api/v1/folder-tree?path=%2F&depth=1 HTTP/1.1" 412 756 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:33 +0800] "GET /index.php/apps/files/files HTTP/1.1" 500 20806 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
104.28.237.111 - - [08/Feb/2025:09:09:16 +0800] "GET /index.php/apps/deck/ HTTP/1.1" 302 960 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
127.0.0.1 - - [08/Feb/2025:09:07:39 +0800] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.62 (Debian) PHP/8.2.27 (internal dummy connection)"
127.0.0.1 - - [08/Feb/2025:09:07:38 +0800] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.62 (Debian) PHP/8.2.27 (internal dummy connection)"
127.0.0.1 - - [08/Feb/2025:09:07:37 +0800] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.62 (Debian) PHP/8.2.27 (internal dummy connection)"

Web Browser

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

Configuration

Nextcloud

{
    "system": {
        "simpleSignUpLink.shown": false,
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "upgrade.disable-web": true,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "[domain]",
            "[serverip : port]"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.5.1",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance_window_start": 0,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "maintenance": false,
        "allow_local_remote_servers": true,
        "loglevel": 2,
        "app_install_overwrite": [
            "timetracker"
        ],
        "data-fingerprint": "9838afbcea6c4d38d917bf4de188c765",
        "instanceid": "***REMOVED SENSITIVE VALUE***"
    }
}

Apps

The output of occ app:list.

root@21abfb8b6b99:/var/www/html# sudo -u www-data php occ app:list
Enabled:
  - activity: 3.0.0
  - admin_audit: 1.20.0
  - app_api: 4.0.5
  - bruteforcesettings: 3.0.0
  - circles: 30.0.0
  - cloud_federation_api: 1.13.0
  - comments: 1.20.1
  - contactsinteraction: 1.11.0
  - dashboard: 7.10.0
  - dav: 1.31.1
  - federatedfilesharing: 1.20.0
  - federation: 1.20.0
  - files: 2.2.0
  - files_downloadlimit: 3.0.0
  - files_external: 1.22.0
  - files_pdfviewer: 3.0.0
  - files_reminders: 1.3.0
  - files_sharing: 1.22.0
  - files_trashbin: 1.20.1
  - files_versions: 1.23.0
  - logreader: 3.0.0
  - lookup_server_connector: 1.18.0
  - nextcloud_announcements: 2.0.0
  - notifications: 3.0.0
  - oauth2: 1.18.1
  - password_policy: 2.0.0
  - photos: 3.0.2
  - privacy: 2.0.0
  - provisioning_api: 1.20.0
  - recommendations: 3.0.0
  - related_resources: 1.5.0
  - serverinfo: 2.0.0
  - settings: 1.13.0
  - sharebymail: 1.20.0
  - support: 2.0.0
  - survey_client: 2.0.0
  - suspicious_login: 8.0.0
  - systemtags: 1.20.0
  - text: 4.1.0
  - theming: 2.5.0
  - twofactor_backupcodes: 1.19.0
  - updatenotification: 1.20.0
  - user_status: 1.10.0
  - viewer: 3.0.0
  - weather_status: 1.10.0
  - webhook_listeners: 1.1.0-dev
  - workflowengine: 2.12.0
Disabled:
  - encryption: 2.18.0
  - firstrunwizard: 3.0.0 (installed 2.17.0)
  - twofactor_nextcloud_notification: 4.0.0
  - twofactor_totp: 12.0.0-dev
  - user_ldap: 1.21.0

I have tried the following methods but not working:

  1. deploy using merely the db_volume and /var/www/html/data(to general new config file), it asked me to create another admin account, and yet still not able to access after logging in the original admin account.
  2. try
    • maintenance:repair
    • maintenance:data-fingerprint
    • occ files:scan-app-data
    • maintenance:mimetype:update-db
      and none of these works
  3. try to repair the MariaDB manually but no errors or clues.

I managed to solve it myself!

Proud of me!

It turns out that sudo -u www-data php occ app:disable deck helps me get rid of the default welcome page after login, and strangely

all the manually installed apps were gone!

and I have to recover them one by one.

This must be a huge bug!


Thankfully all the app-related data are all saved and I can keep my work progress tracked again.

If someone can kindly reply to me and let me know about what the hack I have been through and figure out the reason, I will be so grateful!

Thank you! :innocent:

Please post your entire Compose file (preferably before and after).

The config before:

{
    "system": {
        "simpleSignUpLink.shown": false,
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "upgrade.disable-web": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "...<IP>...:.<port>.....",
            "...<domain_name>...",
            "localhost"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.5.1",
        "overwrite.cli.url": "http:\/\/localhost",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance_window_start": 0,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpport": "465",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "maintenance": false,
        "allow_local_remote_servers": true,
        "loglevel": 2,
        "app_install_overwrite": [
            "timetracker"
        ],
        "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\PDF",
            "OC\\Preview\\MSOffice2003",
            "OC\\Preview\\MSOfficeDoc",
            "OC\\Preview\\PDF",
            "OC\\Preview\\Image",
            "OC\\Preview\\Photoshop",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\SVG",
            "OC\\Preview\\Font",
            "OC\\Preview\\MP3",
            "OC\\Preview\\Movie",
            "OC\\Preview\\MKV",
            "OC\\Preview\\MP4",
            "OC\\Preview\\AVI"
        ],
        "data-fingerprint": "71cde796......"
    }
}

The config afterward:

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "upgrade.disable-web": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "...<IP>...:.<port>.....",
            "...<domain_name>..."
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.5.1",
        "overwrite.cli.url": "http:\/\/cloud.wesker.cc",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance_window_start": 18,
        "overwriteprotocol": "https",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpport": "465",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\Movie",
            "OC\\Preview\\MP4",
            "OC\\Preview\\JPG"
        ],
        "maintenance": false
    }
}

The docker-compose file before:

version: '3'
<Remove sensitive>
services:
  nextcloud_db:
    container_name: nextcloud_db
    image: mariadb:latest
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
    volumes:
     - "/root/db_volume_copy/:/var/lib/mysql"
    environment:
      MYSQL_ROOT_PASSWORD: <Remove sensitive>
      MYSQL_PASSWORD: <Remove sensitive>
      MYSQL_DATABASE: nextcloud_db
      MYSQL_USER: nextcloud

  nextcloud_app:
    container_name: nextcloud
    image: nextcloud:latest
    restart: always
    ports:
      - <Remove sensitive>

    links:
      - nextcloud_db
      - redis
    depends_on:
      - nextcloud_db
      - redis
    volumes:
      - "/root/data/docker_data/nextcloud/config:/var/www/html/config"
      - "/root/data/docker_data/nextcloud/data:/var/www/html/data"

    environment:
      - PUID=1000
      - PGID=1000
      - NEXTCLOUD_ADMIN_USER=<Remove sensitive>
      - NEXTCLOUD_ADMIN_PASSWORD=<Remove sensitive>
      - MYSQL_PASSWORD=<Remove sensitive>
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=root
      - MYSQL_HOST=nextcloud_db
      - NEXTCLOUD_TRUSTED_DOMAINS=<Remove sensitive>
      - REDIS_HOST=redis
      - REDIS_PORT=6379
      - REDIS_HOST_PASSWORD=<Remove sensitive>
      - PHP_MEMORY_LIMIT=1024M

  redis:
    container_name: ncredis
    image: redis
    restart: unless-stopped
    command: redis-server --requirepass <Remove sensitive>


The docker-compose file after:

version: '3'

services:
  nextcloud_db:
    container_name: nextcloud_db2025
    image: mariadb:11.4
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
    volumes:
       - "/root/data/docker_data/nextcloud2025/db_volume:/var/lib/mysql"
    environment:
      MYSQL_ROOT_PASSWORD: <Remove sensitive>
      MYSQL_DATABASE: nextcloud_db

  nextcloud_app:
    container_name: nextcloud2025
    image: nextcloud:30.0.5-apache
    restart: always

    links:
      - nextcloud_db
      - redis
    depends_on:
      - nextcloud_db
      - redis
    volumes:
      #- "/root/data/docker_data/nextcloud2025:/var/www/html"
      - "/root/data/docker_data/nextcloud2025/config:/var/www/html/config"
   
      - "/root/data/docker_data/nextcloud2025/data:/var/www/html/data"
  
      - "/root/data/docker_data/nextcloud2025/custom_apps:/var/www/html/custom_apps"
    
      - "/root/data/docker_data/nextcloud2025/theme:/var/www/html/themes"
      
    environment:
      - PUID=1000
      - PGID=1000
      - REDIS_HOST=redis
      - REDIS_PORT=6379
      - REDIS_HOST_PASSWORD=<Remove sensitive>
      - PHP_MEMORY_LIMIT=1024M

  redis:
    container_name: ncredis2025
    image: redis
    restart: unless-stopped
    command: redis-server --requirepass <Remove sensitive>

Thank you for your help!

And as far as I know, the compose file before has a typo which cause the nextcloud app to set-up another mariadb named “nextcloud” instead of “nextcloud_db”, but it is not a very big problem.

And if you find anything that can be improved, please let me know for sure!
For example, which address should I use for overwriting ?

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