Problem on first start-up: QLSTATE[42501]: Insufficient privilege: 7 ERROR: permission denied for table oc_migrations

System Specifics:

Nextcouud Version 33.0.0 Version 2.3.4

Operating system and version running on Trunas Scale

PostgreSQL DB

Dear all,

Im facting a problem installing Nextcloud on Trunas. At the initial startup, I do run into a problem (potentially with authorisations on the PostgreSQL DB)

Installation scrip was running with no problems - but it seams on the first startup on the UI dialog the initialisation on the PostgeSQL DB is failing

Has anyone run into this problem and found a solution for this problem?

Nextcloud_2026-02-22

Hey @Alexander_Jankovsky welcome to the nextcloud community :waving_hand:

forum search found this: Permission denied for table oc_migrations on startup

  • Set NC_setup_create_db_user to “false” via an environment variable.
  • Use another admin user, otherwise it would conflict with the existing one.
  • Run from within the container: ./occ files:scan --all to scan existing data.
  • Run from within the container: ./occ groupfolders:scanl --all to scan existing data.