Nextcloud error after migration from NS7

I think the issue is that NC 1.1.9 didn’t work correctly when the next update to 1.2.1 was done. Maybe some app causes issues and Nextcloud can’t update or is stuck in maintenance mode which are known issues.
In these cases one needs to occ upgrade or disable maintenance mode manually before the next upgrade.

No, it isn’t updating because:

Here is a solution that worked:

You can check the NC and ns8 app versions at the Nextcloud releases page

To check the version in the config file:

podman unshare cat $(podman volume inspect nextcloud-app-data --format={{.Mountpoint}})/config/config.php | grep version

Edit the config file:

podman unshare nano $(podman volume inspect nextcloud-app-data --format={{.Mountpoint}})/config/config.php | grep version
1 Like

I’ll try that. But first, a question : why isn’t nextcloud working just after the migration ?

1 Like

The migration is also an upgrade.
It’s a long time known issue in Nextcloud that upgrades are not working sometimes, which can have different causes which are hard to catch as there are many possibilities due to many different apps and settings.

1 Like

After some tries I discovered that setting the version field to “27.1.11.3” in config.php was somewhat working. It was empty after migration :thinking: Setting it to 28.0.4 (which is supposed to be the version installed with app 1.1.9) didn’t worked at all.

after setting to 27.1.11.3, occ upgrade was not needed, I just had to disable the maintenance mode.

However I can’t log in: Can't contact LDAP server

The only line related to ldap in config.php says 'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory'

What would you recommend ? Upgrading to next version using software center ?

Please check the Nextcloud app settings if the right ldap domain is selected and click save to reconfigure Nextcloud.

I’d first try to solve the ldap issue, I don’t think it’s solved by an upgrade.

I tried to reapply the User domain setting and also tried “Internal Nextcloud database”. All the users are “deactivated” ?

When logging with ldap auth activated :

All the users were correctly imported into the directory though.

Also I see that the background picture was not imported. I believe the migration failed :slightly_frowning_face:

Expected :

Migrated instance :

Sometimes also Nextcloud upgrades remove/unset pictures.

Is this the server with the failed openldap migration without correct domain?

Let’s check LDAP:

[root@ns8rockytest ~]# cat /home/openldap2/.config/state/environment | grep LDAP_PORT
LDAP_PORT=20015
[root@ns8rockytest ~]# curl ldap://127.0.0.1:20015
DN: 
	objectClass: top
	objectClass: OpenLDAProotDSE

You could check the users, enable them and reset password using occ:

Enter app env:

runagent -m nextcloud1

List users:

occ user:list

To see the other possible commands:

occ user

Thanks, that helped much.

Things are not looking so good. Not that bad but I’m concerned about the integrity of the data.

  • LDAP is working; however all the users are marked as “deactivated”, no idea why since they are active in ns8
$ occ user:info 00db7576-3bfb-1038-89f0-d38a1c9957ea
  - user_id: 00db7576-3bfb-1038-89f0-d38a1c9957ea
  - display_name: admin (admin)
  - email: redacted
  - cloud_id: 00db7576-3bfb-1038-89f0-d38a1c9957ea@http://localhost
  - enabled: true
  - groups:
    - admin
    - administrators
    - locals
  - quota: none
  - storage:
    - free: 31322193920
    - used: 0
    - total: 31322193920
    - relative: 0
    - quota: -3
  - last_seen: 2025-07-25T08:14:35+00:00
  - user_directory: /var/www/html/data/00db7576-3bfb-1038-89f0-d38a1c9957ea
  - backend: LDAP
  • if manually activated I can log though.
  • apps were not migrated along the core. Actually they are marked as “active” but not showing in the toolbar. Disabling them an re-enabling back is working though.

Now trying to upgrade.

1 Like

Good luck for upgrading!

Could it be that brute-force protection is active and the sync clients login using wrong credentials and therefore the users get disabled? Is there something in the logs?

Which apps are installed in your Nextcloud instance?

runagent -m nextcloud1 occ app:list

Again a good idea :blush:

$ occ app:list
Enabled:
  - activity: 2.19.0
  - admin_audit: 1.17.0
  - bruteforcesettings: 2.7.0
  - calendar: 4.7.18
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contactsinteraction: 1.8.0
  - dashboard: 7.7.0
  - dav: 1.27.1
  - deck: 1.11.7
  - federatedfilesharing: 1.17.0
  - files: 1.22.0
  - files_pdfviewer: 2.8.0
  - files_reminders: 1.0.0
  - files_rightclick: 1.6.0
  - files_sharing: 1.19.0
  - files_trashbin: 1.17.0
  - files_versions: 1.20.0
  - firstrunwizard: 2.16.0
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - nextcloud_announcements: 1.16.0
  - notifications: 2.15.0
  - oauth2: 1.15.2
  - password_policy: 1.17.0
  - photos: 2.3.0
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - recommendations: 1.6.0
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - support: 1.10.1
  - survey_client: 1.15.0
  - systemtags: 1.17.0
  - text: 3.8.1
  - theming: 2.2.0
  - twofactor_backupcodes: 1.16.0
  - updatenotification: 1.17.0
  - user_ldap: 1.17.0
  - user_status: 1.7.0
  - viewer: 2.1.0
  - weather_status: 1.7.0
  - workflowengine: 2.9.0
Disabled:
  - circles: 27.0.1 (installed 27.0.1)
  - contacts: 5.5.3 (installed 5.5.3)
  - encryption: 2.15.0 (installed 2.4.0)
  - federation: 1.17.0 (installed 1.6.0)
  - files_external: 1.19.0 (installed 1.7.0)
  - mail: 3.7.24 (installed 3.7.24)
  - related_resources: 1.2.0 (installed 1.2.0)
  - suspicious_login: 5.0.0
  - twofactor_totp: 9.0.0

Brute force protection could not happen because DNS are not pointing to it (yet) and I changed the virtual host.

1 Like

Updates worked well.

Toolbare reappeared automagically.

At version 31, a warning appeared of the format of the rows in the database, similar to this : Upgrade to Nextcloud Hub 10 (31.0.0) Incorrect row format found in your database · Issue #125 · hoellen/docker-nextcloud · GitHub

How do I enter the database container to apply the proposed fix ?

Txs

1 Like

It’s explained here:

1 Like