Nextcloud: Difference between revisions
m (Text replacement - "<source" to "<syntaxhighlight") |
|||
Line 4: | Line 4: | ||
==BASH alias== | ==BASH alias== | ||
< | <syntaxhighlight lang=bash> | ||
alias occ='sudo --user=www-data /usr/bin/php -f /var/www/nextcloud/occ' | alias occ='sudo --user=www-data /usr/bin/php -f /var/www/nextcloud/occ' | ||
</source> | </source> | ||
< | <syntaxhighlight lang=bash> | ||
# occ status | # occ status | ||
- installed: true | - installed: true | ||
Line 19: | Line 19: | ||
Set the EventRemindersMode to occ: | Set the EventRemindersMode to occ: | ||
< | <syntaxhighlight lang=bash> | ||
# occ config:app:set dav sendEventRemindersMode --value occ | # occ config:app:set dav sendEventRemindersMode --value occ | ||
</source> | </source> | ||
and add a cronjob for the user running he webserver: | and add a cronjob for the user running he webserver: | ||
< | <syntaxhighlight lang=bash> | ||
# crontab -u www-data -e | # crontab -u www-data -e | ||
Line 35: | Line 35: | ||
Caution when upgrading from Nextcloud 20.0.9 to Nextcloud 21.0.1! | Caution when upgrading from Nextcloud 20.0.9 to Nextcloud 21.0.1! | ||
If you are using APCu as <i>memcache.local</i> | If you are using APCu as <i>memcache.local</i> | ||
< | <syntaxhighlight lang=bash> | ||
# occ config:system:get memcache.local | # occ config:system:get memcache.local | ||
\OC\Memcache\APCu | \OC\Memcache\APCu | ||
Line 43: | Line 43: | ||
otherwise you will get in memory trouble during upgrade and in my case the server was down because out of memory. | otherwise you will get in memory trouble during upgrade and in my case the server was down because out of memory. | ||
< | <syntaxhighlight lang=bash> | ||
# cd /var/www/nextcloud/updater && sudo -u www-data php updater.phar | # cd /var/www/nextcloud/updater && sudo -u www-data php updater.phar | ||
# occ db:add-missing-indices | # occ db:add-missing-indices | ||
</source> | </source> | ||
and since version 19: | and since version 19: | ||
< | <syntaxhighlight lang=bash> | ||
# occ db:add-missing-columns | # occ db:add-missing-columns | ||
# occ db:add-missing-primary-keys | # occ db:add-missing-primary-keys | ||
Line 56: | Line 56: | ||
If you have an own theme proceed with this steps: | If you have an own theme proceed with this steps: | ||
< | <syntaxhighlight lang=bash> | ||
# occ config:system:set theme --value <your theme> | # occ config:system:set theme --value <your theme> | ||
# occ maintenance:theme:update | # occ maintenance:theme:update | ||
Line 62: | Line 62: | ||
And the apps: | And the apps: | ||
< | <syntaxhighlight lang=bash> | ||
# occ app:update --all | # occ app:update --all | ||
</source> | </source> | ||
=Some tweaks for the theme to disable several things= | =Some tweaks for the theme to disable several things= | ||
< | <syntaxhighlight lang=css> | ||
/* remove quota */ | /* remove quota */ | ||
#quota { | #quota { | ||
Line 115: | Line 115: | ||
You can import one of the following versions of configfile with | You can import one of the following versions of configfile with | ||
< | <syntaxhighlight lang=shell-session> | ||
# occ config:import /your_memcache_config_file_like_below.json | # occ config:import /your_memcache_config_file_like_below.json | ||
Config successfully imported from: /your_memcache_config_file_like_below.json | Config successfully imported from: /your_memcache_config_file_like_below.json | ||
</source> | </source> | ||
== ip:port == | == ip:port == | ||
< | <syntaxhighlight lang=JSON> | ||
{ | { | ||
"system": { | "system": { | ||
Line 135: | Line 135: | ||
== socket == | == socket == | ||
< | <syntaxhighlight lang=JSON> | ||
{ | { | ||
"system": { | "system": { |
Revision as of 22:18, 25 November 2021
Nextcloud
BASH alias
<syntaxhighlight lang=bash> alias occ='sudo --user=www-data /usr/bin/php -f /var/www/nextcloud/occ' </source>
<syntaxhighlight lang=bash>
- occ status
- installed: true - version: 19.0.2.2 - versionstring: 19.0.2 - edition:
</source>
Send calendar events
Set the EventRemindersMode to occ: <syntaxhighlight lang=bash>
- occ config:app:set dav sendEventRemindersMode --value occ
</source> and add a cronjob for the user running he webserver:
<syntaxhighlight lang=bash>
- crontab -u www-data -e
- send calendar events every 5 minutes
- /5 * * * * php -f /var/www/nextcloud/occ dav:send-event-reminders
</source>
Manual upgrade
Caution when upgrading from Nextcloud 20.0.9 to Nextcloud 21.0.1! If you are using APCu as memcache.local <syntaxhighlight lang=bash>
- occ config:system:get memcache.local
\OC\Memcache\APCu </source> you have to put this in your php apcu.ini (e.g. /etc/php/7.4/mods-available/apcu.ini):
apc.enable_cli=1
otherwise you will get in memory trouble during upgrade and in my case the server was down because out of memory.
<syntaxhighlight lang=bash>
- cd /var/www/nextcloud/updater && sudo -u www-data php updater.phar
- occ db:add-missing-indices
</source> and since version 19: <syntaxhighlight lang=bash>
- occ db:add-missing-columns
- occ db:add-missing-primary-keys
- occ db:convert-filecache-bigint
</source> Answer the questions...
If you have an own theme proceed with this steps: <syntaxhighlight lang=bash>
- occ config:system:set theme --value <your theme>
- occ maintenance:theme:update
</source>
And the apps: <syntaxhighlight lang=bash>
- occ app:update --all
</source>
Some tweaks for the theme to disable several things
<syntaxhighlight lang=css> /* remove quota */
- quota {
border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px;
}
/* remove lost password */
.lost-password-container #lost-password, .lost-password-container #lost-password-back {
display: none;
}
/* remove contacts menu */
- contactsmenu { display: none; }
/* remove contacts button */
li[data-id="contacts"] {
display: none; visibility : hidden; height : 0px; width : 0px; margin : 0px; padding : 0px; overflow : hidden;
}
/* remove user button */ li[data-id="core_users"] {
display: none; visibility : hidden; height : 0px; width : 0px; margin : 0px; padding : 0px; overflow : hidden;
} </source>
Memcached
You can import one of the following versions of configfile with <syntaxhighlight lang=shell-session>
- occ config:import /your_memcache_config_file_like_below.json
Config successfully imported from: /your_memcache_config_file_like_below.json </source>
ip:port
<syntaxhighlight lang=JSON> {
"system": { "memcache.distributed": "\\OC\\Memcache\\Memcached", "memcached_servers": [ [ '127.0.0.1', 1121 ] ] }
} </source>
socket
<syntaxhighlight lang=JSON> {
"system": { "memcache.distributed": "\\OC\\Memcache\\Memcached", "memcached_servers": [ [ "\/run\/memcached\/memcached.sock", 0 ] ] }
} </source>