Difference between revisions of "Nextcloud"

From wiki
Jump to navigation Jump to search
Line 108: Line 108:
  
 
This solved the issue for me. More information may be available in the [https://github.com/nextcloud/server/issues/24401 related github issue].
 
This solved the issue for me. More information may be available in the [https://github.com/nextcloud/server/issues/24401 related github issue].
 +
 +
==App cannot be installed from the web interface==
 +
Find the correct appname using occ list, then update
 +
<nowiki>sudo -u http php74 /var/www/nextcloud/occ app:list</nowiki>
 +
<nowiki>sudo -u http php74 /var/www/nextcloud/occ app:upgrade <appname></nowiki>

Revision as of 12:20, 18 August 2021

An opensource private cloud solution [1].

Installation

Installation is as simple as deploying a new web-site. Tips for installing on Synology bit outdated using php7

  • The package can be installed in the root of a (virtual) webserver.
  • The configuration is in <webroot>/config/config.php. To (re)start the initialization:
  1. (re)move the config file
  2. delete all tables in the nextcloud database
  3. put a file named CAN_INSTALL in the config directory.
  4. browse to your nextcloud webserver
  • When you have unix-sockets enabled use localhost:<socketpath> as dbhost

Allow larger files to be uploaded

Change php settings:

upload_max_filesize = 16G

post_max_size = 16G As my nextcloud server is a synology diskstation:

vi /volume1/@appstore/PHP7.4/misc/php-fpm.ini

/usr/syno/sbin/synoservice --restart pkgctl-PHP7.4


Change nginx setting for the nextcloud server

client_max_body_size 0

This will disable the checking of body size. The php settings rule.

cronjob

*/5 * * * * sudo -u http php74 -f /var/www/nextcloud/cron.php
Configure this in your crontab or other job-scheduler

Client installation

sudo add-apt-repository ppa:nextcloud-devs/client
sudo apt update
sudo apt install nextcloud-client

config file

Located in the installation directory in ./config/config.php. Mine looks like:

 <?php
 $CONFIG = array (
   'maintenance' => false,
   'instanceid' => 'REMOVED',
   'passwordsalt' => 'REMOVED',
   'secret' => 'REMOVED',
   'trusted_domains' => 
   array (
     0 => 'nextcloud.local.antiperfect.org',
   ),
   'datadirectory' => '/volume1/nextcloud/',
   'dbtype' => 'mysql',
   'version' => '21.0.4.1',
   'overwrite.cli.url' => 'https://nextcloud.<mydomain>',
   'dbname' => 'nextcloud',
   'dbhost' => 'localhost:/run/mysqld/mysqld10.sock',
   'dbport' => '',
   'dbtableprefix' => 'oc_',
   'mysql.utf8mb4' => true,
   'dbuser' => 'nextcloud',
   'dbpassword' => 'REMOVED',
   'installed' => true,
   'mail_from_address' => 'nextcloud',
   'mail_smtpmode' => 'smtp',
   'mail_sendmailmode' => 'smtp',
   'mail_domain' => 'deridder.it',
   'mail_smtphost' => 'localhost',
   'mail_smtpport' => '25',
   'theme' => '',
   'loglevel' => 2,
 );

Tips and Troubleshooting

sudo -u http php74 /var/www/nextcloud/occ files:scan --all
Rescan all files (update database)
sudo -u http php74 /var/www/nextcloud/occ files:scan --path="/<username>/files/<dir to scan>"
Rescan all files in specified path
touch <file>
When everything looks OK, you fixed mounts and file permissions, try touch on the client.

A file is reported locked and it is not a file-protection issue

  1. put Nextcloud in maintenance mode: edit config/config.php and change this line:
'maintenance' => true,
  1. Empty table oc_file_locks (the default table prefix is oc_, this prefix can be different or even empty)
  2. disable maintenance mode (undo first step).
'maintenance' => false,

Nextcloud remains in maintenance mode after upgrade

Turn off maintenance mode from the commandline and retry the upgrade from the command line.

sudo -u http php74 /var/www/nextcloud/occ maintenance:mode --off
sudo -u http php74 /var/www/nextcloud/occ upgrade

Cronjob is running very long since a large number of files have been added

  1. Stop the cronjob schedule
  2. sudo -u http php74 /var/www/nextcloud/occ files:scan-app-data

This solved the issue for me. More information may be available in the related github issue.

App cannot be installed from the web interface

Find the correct appname using occ list, then update

sudo -u http php74 /var/www/nextcloud/occ app:list
sudo -u http php74 /var/www/nextcloud/occ app:upgrade <appname>