For docker-compose based Nextcloud installations, this is the command to run the cron job manually:
docker-compose exec -u www-data nextcloud php cron.php
You need to run this from the directory where docker-compose.yml
is located.
For docker-compose based Nextcloud installations, this is the command to run the cron job manually:
docker-compose exec -u www-data nextcloud php cron.php
You need to run this from the directory where docker-compose.yml
is located.
Your Nextcloud CLI client fails for some files (upload or download) with an error message like this
"Server replied "413 Request Entity Too Large" to "PUT https://example.com/remote.php/dav/uploads/username/XXXXXXXX/YYYYYY" (skipped due to earlier error, trying again in 6 hour(s)) PATH/TO/FILE.bmp
The nextcloud CLI client nextcloudcmd
stores the sync SQLite database in ~/.local/share/nextcloudcmd/._sync_############.db
where ############
is a hex code. If you have multiple such files in ~/.local/share/nextcloudcmd
, try out this procedure for each of them:
While nextcloudcmd
is not running, use the SQLite3 command line tool to open the database, for example:
sqlite3 ~/.local/share/nextcloudcmd/._sync_bf15278da518.db
Then run this SQL command:
DELETE FROM 'blacklist';
and exit using Ctrl-D
. Now try re-running nextcloudcmd
, it should immediately retry syncing the file.
When upgrading your Nextcloud instance, you see an error message like
Migration step 'OCA\Files\Migration\Version11301Date20191205150729' is unknown
This error occurs because you just copied over multiple versions of the apps
directory, which resulted in
First, make a backup of your apps
directory (located inside your Nextcloud folder).
Then delete your current apps
directory and replace it by the apps
directory from the new version of Nextcloud you want to upgrade to.
After that, retry the upgrade.
In reverse-proxy setups forwarding requests to OnlyOffice like our reference setup there you might encounter issues like
Refused to frame 'http://onlyoffice.mydomain.com/' because it violates the following Content Security Policy directive: "frame-src https://onlyoffice.mydomain.com/".
Just add
proxy_set_header X-Forwarded-Proto $scheme;
directly after your proxy_pass
clause in your nginx
config, then run sudo service nginx reload
.
The reason for this issue is that OnlyOffice thinks it’s being loaded using HTTP, but the Nextcloud page prevents insecure content from being loaded.
Using a proxy other than nginx
? Just ensure that every proxied request (i.e. every request directed towards the OnlyOffice instance) has the X-Forwarded-Proto
header set to the protocol of the original request – which should be https
.
When trying to connect using the Nextcloud client, during the Flow v2 authorization step where you open a page in the browser to authorize the client, you see an error message in the JS console like
Refused to send form data to 'http://nextcloud.mydomain.com/login/v2/grant' because it violates the following Content Security Policy directive: "form-action 'self'".
Add
'overwriteprotocol' => 'https',
after this line:
'version' => '18.0.0.10',
in your nextcloud/config/config.php
.
Recently my Nextcloud 16 instance (running via PHP 7.2 FPM on Nginx) return HTTP status 500 (internal server error) when trying to access it.
Analyzin the webserver log revealed this error message:
FastCGI sent in stderr: "PHP message: PHP Fatal error: Class OC\Authentication\Token\PublicKeyToken contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (OC\Authentication\Token\IToken::setExpires) in /var/sites/nextcloud.mydomain.com/lib/private/Authentication/Token/PublicKeyToken.php on line 47" while reading response header from upstream, client: 2003:ea:b747:ee00:7491:f492:480:57a9, server: nextcloud.mydomain.com, request: "PROPFIND /remote.php/dav/files/admin/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "nextcloud.mydomain.com"
After some research, I found out that – at least in my case – the issue could be fixed by flushing the PHP opcache:
sudo service php7.2-fpm reload
After that, nextcloud started to work properly again.