Nextcloud: Difference between revisions
From Lolly's Wiki
Jump to navigationJump to search
m (Text replacement - "<source" to "<syntaxhighlight") |
m (Text replacement - "</source" to "</syntaxhighlight") |
||
Line 6: | Line 6: | ||
<syntaxhighlight lang=bash> | <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' | ||
</ | </syntaxhighlight> | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
Line 14: | Line 14: | ||
- versionstring: 19.0.2 | - versionstring: 19.0.2 | ||
- edition: | - edition: | ||
</ | </syntaxhighlight> | ||
==Send calendar events== | ==Send calendar events== | ||
Line 21: | Line 21: | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
# occ config:app:set dav sendEventRemindersMode --value occ | # occ config:app:set dav sendEventRemindersMode --value occ | ||
</ | </syntaxhighlight> | ||
and add a cronjob for the user running he webserver: | and add a cronjob for the user running he webserver: | ||
Line 29: | Line 29: | ||
# send calendar events every 5 minutes | # send calendar events every 5 minutes | ||
*/5 * * * * php -f /var/www/nextcloud/occ dav:send-event-reminders | */5 * * * * php -f /var/www/nextcloud/occ dav:send-event-reminders | ||
</ | </syntaxhighlight> | ||
=Manual upgrade= | =Manual upgrade= | ||
Line 38: | Line 38: | ||
# occ config:system:get memcache.local | # occ config:system:get memcache.local | ||
\OC\Memcache\APCu | \OC\Memcache\APCu | ||
</ | </syntaxhighlight> | ||
you have to put this in your php apcu.ini (e.g. /etc/php/7.4/mods-available/apcu.ini): | you have to put this in your php apcu.ini (e.g. /etc/php/7.4/mods-available/apcu.ini): | ||
apc.enable_cli=1 | apc.enable_cli=1 | ||
Line 46: | Line 46: | ||
# 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 | ||
</ | </syntaxhighlight> | ||
and since version 19: | and since version 19: | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
Line 52: | Line 52: | ||
# occ db:add-missing-primary-keys | # occ db:add-missing-primary-keys | ||
# occ db:convert-filecache-bigint | # occ db:convert-filecache-bigint | ||
</ | </syntaxhighlight> | ||
Answer the questions... | Answer the questions... | ||
Line 59: | Line 59: | ||
# occ config:system:set theme --value <your theme> | # occ config:system:set theme --value <your theme> | ||
# occ maintenance:theme:update | # occ maintenance:theme:update | ||
</ | </syntaxhighlight> | ||
And the apps: | And the apps: | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
# occ app:update --all | # occ app:update --all | ||
</ | </syntaxhighlight> | ||
=Some tweaks for the theme to disable several things= | =Some tweaks for the theme to disable several things= | ||
Line 111: | Line 111: | ||
overflow : hidden; | overflow : hidden; | ||
} | } | ||
</ | </syntaxhighlight> | ||
= Memcached = | = Memcached = | ||
Line 118: | Line 118: | ||
# 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 | ||
</ | </syntaxhighlight> | ||
== ip:port == | == ip:port == | ||
<syntaxhighlight lang=JSON> | <syntaxhighlight lang=JSON> | ||
Line 132: | Line 132: | ||
} | } | ||
} | } | ||
</ | </syntaxhighlight> | ||
== socket == | == socket == | ||
Line 147: | Line 147: | ||
} | } | ||
} | } | ||
</ | </syntaxhighlight> |
Revision as of 04:49, 26 November 2021
Nextcloud
BASH alias
alias occ='sudo --user=www-data /usr/bin/php -f /var/www/nextcloud/occ'
# occ status
- installed: true
- version: 19.0.2.2
- versionstring: 19.0.2
- edition:
Send calendar events
Set the EventRemindersMode to occ:
# occ config:app:set dav sendEventRemindersMode --value occ
and add a cronjob for the user running he webserver:
# crontab -u www-data -e
# send calendar events every 5 minutes
*/5 * * * * php -f /var/www/nextcloud/occ dav:send-event-reminders
Manual upgrade
Caution when upgrading from Nextcloud 20.0.9 to Nextcloud 21.0.1! If you are using APCu as memcache.local
# occ config:system:get memcache.local
\OC\Memcache\APCu
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.
# cd /var/www/nextcloud/updater && sudo -u www-data php updater.phar
# occ db:add-missing-indices
and since version 19:
# occ db:add-missing-columns
# occ db:add-missing-primary-keys
# occ db:convert-filecache-bigint
Answer the questions...
If you have an own theme proceed with this steps:
# occ config:system:set theme --value <your theme>
# occ maintenance:theme:update
And the apps:
# occ app:update --all
Some tweaks for the theme to disable several things
/* 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;
}
Memcached
You can import one of the following versions of configfile with
# occ config:import /your_memcache_config_file_like_below.json
Config successfully imported from: /your_memcache_config_file_like_below.json
ip:port
{
"system": {
"memcache.distributed": "\\OC\\Memcache\\Memcached",
"memcached_servers": [
[
'127.0.0.1',
1121
]
]
}
}
socket
{
"system": {
"memcache.distributed": "\\OC\\Memcache\\Memcached",
"memcached_servers": [
[
"\/run\/memcached\/memcached.sock",
0
]
]
}
}