Skip to content

Instantly share code, notes, and snippets.

@brunneis
Last active December 14, 2019 13:00
Show Gist options
  • Save brunneis/f14ca6614fcf2fa07152dfaeac7a3704 to your computer and use it in GitHub Desktop.
Save brunneis/f14ca6614fcf2fa07152dfaeac7a3704 to your computer and use it in GitHub Desktop.
Useful commands for dockerized Nextcloud / OwnCloud instances

Fix internal error after moving data

MariaDB [(none)]> use nextcloud;
MariaDB [nextcloud]> truncate oc_filecache;

Fix permissions

chown -R 33:33 config data

Rescan users' directories

su -s /bin/bash -c 'php /var/www/html/occ files:scan --all' www-data

Manual upgrade

su www-data -c "/var/www/html/occ upgrade" -s /bin/bash

Enable maintenance mode

su www-data -c "/var/www/html/occ maintenance:mode --on" -s /bin/bash

Delete locks

MariaDB [(none)]> use nextcloud;
MariaDB [nextcloud]> delete from oc_file_locks where 1;

Disable maintenance mode

su www-data -c "/var/www/html/occ maintenance:mode --off" -s /bin/bash

Manual cron task

su -s /bin/bash -c 'php -f /var/www/html/cron.php' www-data

Problems with login from apps

nano config.php

'overwrite.cli.url' => 'https://your-url.com',
'overwriteprotocol' => 'https',
'forcessl' => true,
'forceSSLforSubdomains' => true,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment