howto:nextcloud

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
howto:nextcloud [2021/03/21 17:18]
Marc Internal Server Error
howto:nextcloud [2021/04/02 21:38] (current)
Marc occ wrapper
Line 1: Line 1:
 ====== Nextcloud ====== ====== Nextcloud ======
  
-**Information applies to:** NethServer 7.x, Nextcloud >=16.x  (for previous versions check old revisions of this document)\\+**Information applies to:** NethServer 7.x, Nextcloud >=19.x  (for previous versions check old revisions of this document)\\
  
 [[https://nextcloud.com/|Nextcloud]] provides a safe, secure, and compliant file synchronization and sharing solution on servers that you control. NethServer 7 provides a preconfigured Nextcloud instance integrated with other NethServer services. [[https://nextcloud.com/|Nextcloud]] provides a safe, secure, and compliant file synchronization and sharing solution on servers that you control. NethServer 7 provides a preconfigured Nextcloud instance integrated with other NethServer services.
Line 24: Line 24:
 ''%%occ%%'' command should be run as the HTTP user (apache) and with the same php version used by your Nextcloud instance. One method to call ''%%occ%%'' command is: ''%%occ%%'' command should be run as the HTTP user (apache) and with the same php version used by your Nextcloud instance. One method to call ''%%occ%%'' command is:
 <file>sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ</file> <file>sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ</file>
 +An easier way is to make use of the occ wrapper (''%%/usr/local/sbin/occ%%'') provided by NethServer:
 +<file>occ</file>
 \\ \\
 **After updating/upgrading Nextcloud, the apps are disabled**\\ **After updating/upgrading Nextcloud, the apps are disabled**\\
Line 29: Line 31:
 <file> <file>
 # example: enabling calendar app # example: enabling calendar app
-sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ app:enable calendar+occ app:enable calendar
 </file> </file>
 \\ \\
Line 54: Line 56:
 ==== How to reset Nextcloud's admin password ==== ==== How to reset Nextcloud's admin password ====
  
-<file>sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ user:resetpassword admin</file>+<file>occ user:resetpassword admin</file>
  
 \\ \\
 ==== Nextcloud remains in maintenance mode after an upgrade ==== ==== Nextcloud remains in maintenance mode after an upgrade ====
  
-<file>sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ maintenance:mode --off</file>+<file>occ maintenance:mode --off</file>
  
 \\ \\
Line 65: Line 67:
  
 This could be due to a partial upgrade done by the rpm packages. The specific issue might have been reflected on server logs. By running ''%%occ upgrade%%'' command you'll either finish the upgrade process or get some errors showing the problem:\\ This could be due to a partial upgrade done by the rpm packages. The specific issue might have been reflected on server logs. By running ''%%occ upgrade%%'' command you'll either finish the upgrade process or get some errors showing the problem:\\
-<file>sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ upgrade</file>+<file>occ upgrade</file>
  
 \\ \\
Line 89: Line 91:
 Fix it as instructed by the warning message: Fix it as instructed by the warning message:
  
-    sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ db:add-missing-columns+    occ db:add-missing-columns
  
 \\ \\
Line 98: Line 100:
 Fix it as instructed by the warning message: Fix it as instructed by the warning message:
  
-    sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ db:add-missing-primary-keys+    occ db:add-missing-primary-keys
  
  
Line 109: Line 111:
 Under some circumstances, a file could remain inaccessible due to an unreleased lock. To manually release the locks: Under some circumstances, a file could remain inaccessible due to an unreleased lock. To manually release the locks:
  
-    sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ maintenance:mode --on+    occ maintenance:mode --on
          
     mysql nextcloud     mysql nextcloud
Line 115: Line 117:
     \q     \q
          
-    sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ maintenance:mode --off+    occ maintenance:mode --off
  
 \\ \\
Line 187: Line 189:
 While ''%%Next Version%%'' is different from ''%%Already at latest migration step%%'',  get next version: While ''%%Next Version%%'' is different from ''%%Already at latest migration step%%'',  get next version:
 <file> <file>
-sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ migrations:status core+occ migrations:status core
 </file> </file>
  
 Execute migration specifying the value of next version: Execute migration specifying the value of next version:
 <file> <file>
-sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ migrations:execute core nextversiongoeshere+occ migrations:execute core nextversiongoeshere
 </file> </file>
  
Line 200: Line 202:
 Then execute occ upgrade command: Then execute occ upgrade command:
 <file> <file>
-sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ upgrade+occ upgrade
 </file> </file>
  
Line 210: Line 212:
 Get installed version: Get installed version:
 <file> <file>
-sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ --version+occ --version
 </file> </file>
  
 Get migration status: Get migration status:
 <file> <file>
-sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ migrations:status core+occ migrations:status core
 </file> </file>
  
 Migrate Nextcloud to latest version (migration scripts): Migrate Nextcloud to latest version (migration scripts):
 <file> <file>
-sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ migrations:migrate core+occ migrations:migrate core
 </file> </file>
  
Line 231: Line 233:
 Upgrade Nextcloud and disable maintenance mode: Upgrade Nextcloud and disable maintenance mode:
 <file> <file>
-sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ upgradeĀ +occ upgradeĀ 
-sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ maintenance:mode --off+occ maintenance:mode --off
 </file> </file>
  
  • howto/nextcloud.txt
  • Last modified: 2021/04/02 21:38
  • by Marc