Nextcloud: Difference between revisions

No edit summary
No edit summary
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
Nextcloud is a self-hosted cloud solution.
Nextcloud is a self-hosted cloud storage and file sharing solution.  
It is a fork of ownCloud by the original founder.


It is open-source under AGPL-3.
It is open-source under AGPL-3.


==Administration==
==Administration==
===Configuration===
The primary configuration file is <code>config/config.php</code>. 
You can view a list of configuation parameters [https://docs.nextcloud.com/server/19/admin_manual/configuration_server/config_sample_php_parameters.html here].
I recommend adding the following to your configuation file:
* <code>'simpleSignUpLink.shown' => false,</code> disables some sign up links which direct to nextcloud.com.
===Moving data directory===
===Moving data directory===
See [https://help.nextcloud.com/t/howto-change-move-data-directory-after-installation/17170 https://help.nextcloud.com/t/howto-change-move-data-directory-after-installation/17170]
See [https://help.nextcloud.com/t/howto-change-move-data-directory-after-installation/17170 https://help.nextcloud.com/t/howto-change-move-data-directory-after-installation/17170]
Line 13: Line 19:


The '''easy''' way is to create a symlink:
The '''easy''' way is to create a symlink:
<pre>
<syntaxhighlight lang="bash">
sudo -u www-data php /path/to/nextcloud/occ maintenance:mode --on
sudo -u www-data php /path/to/nextcloud/occ maintenance:mode --on
mkdir -p /new/path/to/data
mkdir -p /new/path/to/data
Line 22: Line 28:
chown -R www-data:www-data /new/path/to/data # To set actual data dir ownership
chown -R www-data:www-data /new/path/to/data # To set actual data dir ownership
sudo -u www-data php /path/to/nextcloud/occ maintenance:mode --off
sudo -u www-data php /path/to/nextcloud/occ maintenance:mode --off
</pre>
</syntaxhighlight>
 
===Caching===
See [https://docs.nextcloud.com/server/19/admin_manual/configuration_server/caching_configuration.html?highlight=caching Caching configuration].
 
You should use caching to achieve a reasonable performance. 
NextCloud recommends APCu for local caching and Redis for lock caching:
<syntaxhighlight lang="php">
'memcache.local' => '\OC\Memcache\APCu',
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => [
    'host' => 'localhost',
    'port' => 6379,
],
</syntaxhighlight>
 
===Troubleshooting===
 
====Large Files====
Rclone is useful for transferring large files over Webdav. However, you need to make sure the server is set up for it.
 
To transfer large files, double check the following:
* Apache body limit is at least 512 MB. Set the following in your Dockerfile:
*: <syntaxhighlight lang="Dockerfile">
RUN echo "LimitRequestBody 0" > /etc/apache2/conf-enabled/nextcloud-apache.conf
</syntaxhighlight>
* Nginx does not have a body limit and is not proxying requests or responses. In ingress-nginx, set the following annotations:
*:<syntaxhighlight lang="yaml">
annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: "0"
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "86400"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "86400"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "86400"
    nginx.ingress.kubernetes.io/proxy-buffering: "off"
    nginx.ingress.kubernetes.io/proxy-request-buffering: "off"
</syntaxhighlight>


==Markdown==
==Markdown==
NextCloud comes with its own WSYWIG markdown editor.   
NextCloud comes with its own WYSIWYG markdown editor.   
If you prefer to type markdown yourself, do the following:
If you prefer to type markdown yourself, do the following:
# Disable the "Text" app
# Disable the "Text" app