From e3b368849c3a4a4a9370330d846667118e1aa151 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 16:19:23 +0100 Subject: [PATCH 01/25] Move "apps management" to same level as "user management" Signed-off-by: Morris Jobke --- ...t_installation.rst => apps_management.rst} | 32 ++++++++---------- admin_manual/contents.rst | 1 + .../images/apps_overview.png | Bin .../{installation => }/images/apps_store.png | Bin admin_manual/installation/index.rst | 1 - 5 files changed, 15 insertions(+), 19 deletions(-) rename admin_manual/{installation/apps_management_installation.rst => apps_management.rst} (90%) rename admin_manual/{installation => }/images/apps_overview.png (100%) rename admin_manual/{installation => }/images/apps_store.png (100%) diff --git a/admin_manual/installation/apps_management_installation.rst b/admin_manual/apps_management.rst similarity index 90% rename from admin_manual/installation/apps_management_installation.rst rename to admin_manual/apps_management.rst index b8f6a0b6c..5c3a47428 100644 --- a/admin_manual/installation/apps_management_installation.rst +++ b/admin_manual/apps_management.rst @@ -1,6 +1,6 @@ -============================ -Installing and managing apps -============================ +=============== +Apps management +=============== Nextcloud apps can enhance, customize or even restrict the features and experience you and your users has with the Nextcloud server. Next to default enabled functions @@ -11,8 +11,8 @@ After installing the Nextcloud server, you might want to consider about enabling disabling or even restricting some apps to groups depending on your and your users needs. -Apps management ---------------- +Apps +---- .. figure:: images/apps_overview.png :alt: Apps page for enabling and disabling apps. @@ -21,7 +21,7 @@ During the Nextcloud server installation, some apps are enabled by default. To see which apps are enabled go to your Apps page. Those apps are supported and developed by Nextcloud GmbH directly and -have an **Official**-tag. See :doc:`apps_supported` for a list of supported apps. +have an **Official**-tag. See :doc:`installation/apps_supported` for a list of supported apps. .. note:: To get access to work-arounds, long-term-support, priority bug fixing and custom consulting for supported apps, contact our `sales team `_. @@ -76,20 +76,18 @@ in that folder. :: - array ( - 0 => array ( - "path" => OC::$SERVERROOT."/apps", + "apps_paths" => [ + [ + "path" => OC::$SERVERROOT . "/apps", "url" => "/apps", "writable" => false, - ), - 1 => array ( - "path" => OC::$SERVERROOT."/apps2", + ], + [ + "path" => OC::$SERVERROOT . "/apps2", "url" => "/apps2", "writable" => true, - ), - ), + ], + ], Using your own appstore ----------------------- @@ -110,7 +108,5 @@ To enable installation from your own apps store: :: - true, "appstoreurl" => "https://api.nextcloud.com/v1", diff --git a/admin_manual/contents.rst b/admin_manual/contents.rst index 265a8905d..f486c5f16 100644 --- a/admin_manual/contents.rst +++ b/admin_manual/contents.rst @@ -9,6 +9,7 @@ Table of contents release_notes installation/index configuration_server/index + apps_management configuration_user/index configuration_files/index file_workflows/index diff --git a/admin_manual/installation/images/apps_overview.png b/admin_manual/images/apps_overview.png similarity index 100% rename from admin_manual/installation/images/apps_overview.png rename to admin_manual/images/apps_overview.png diff --git a/admin_manual/installation/images/apps_store.png b/admin_manual/images/apps_store.png similarity index 100% rename from admin_manual/installation/images/apps_store.png rename to admin_manual/images/apps_store.png diff --git a/admin_manual/installation/index.rst b/admin_manual/installation/index.rst index 51fa20fd6..12a286bf7 100644 --- a/admin_manual/installation/index.rst +++ b/admin_manual/installation/index.rst @@ -10,7 +10,6 @@ Installation source_installation installation_wizard command_line_installation - apps_management_installation apps_supported php_70_installation selinux_configuration From a6d857732fc6d1f876d71d0c246de7ae841c6bc6 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 16:20:06 +0100 Subject: [PATCH 02/25] Remove unneeded links (they are in the navigation already) and fix little typos Signed-off-by: Morris Jobke --- admin_manual/index.rst | 4 +--- admin_manual/installation/source_installation.rst | 14 -------------- admin_manual/installation/system_requirements.rst | 2 +- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/admin_manual/index.rst b/admin_manual/index.rst index b216e25fe..20f9c897e 100644 --- a/admin_manual/index.rst +++ b/admin_manual/index.rst @@ -39,10 +39,8 @@ respective manuals: * `Nextcloud User Manual`_ * `Nextcloud Desktop Client`_ -* `Nextcloud Android App`_ -.. _`Nextcloud User Manual`: https://docs.nextcloud.com/server/14/user_manual/ +.. _`Nextcloud User Manual`: https://docs.nextcloud.com/server/latest/user_manual/ .. _`Nextcloud Desktop Client`: https://docs.nextcloud.com/desktop/2.3/ -.. _`Nextcloud Android App`: https://docs.nextcloud.com/android/ .. TODO ON RELEASE: Update version number above on release diff --git a/admin_manual/installation/source_installation.rst b/admin_manual/installation/source_installation.rst index ec6bce00c..159006124 100644 --- a/admin_manual/installation/source_installation.rst +++ b/admin_manual/installation/source_installation.rst @@ -12,20 +12,6 @@ This document provides a complete walk-through for installing Nextcloud on Ubuntu 16.04 LTS Server with Apache and MariaDB, using `the Nextcloud .tar archive `_. -* :ref:`vm_label` -* :ref:`snaps_label` -* :ref:`prerequisites_label` -* :ref:`ubuntu_installation_label` -* :ref:`centos7_installation_label` -* :ref:`apache_configuration_label` -* :ref:`pretty_urls_label` -* :ref:`enabling_ssl_label` -* :ref:`installation_wizard_label` -* :ref:`selinux_tips_label` -* :ref:`php_ini_tips_label` -* :ref:`php_fpm_tips_label` -* :ref:`other_HTTP_servers_label` - .. note:: Admins of SELinux-enabled distributions such as CentOS, Fedora, and Red Hat Enterprise Linux may need to set new rules to enable installing Nextcloud. See :ref:`selinux_tips_label` for a suggested configuration. diff --git a/admin_manual/installation/system_requirements.rst b/admin_manual/installation/system_requirements.rst index fca48e318..2cf216061 100644 --- a/admin_manual/installation/system_requirements.rst +++ b/admin_manual/installation/system_requirements.rst @@ -9,7 +9,7 @@ For best performance, stability and functionality we have documented some recomm The Nextcloud server is not compatible with Windows and macOS. .. note:: If you plan a setup for your organization and you rely on professional deployment consulting (e.g. efficient and - reliable scaling) and support, we strongly recommend you to check out our `**enterprise support** + reliable scaling) and support, we strongly recommend you to check out our `enterprise support `_. +------------------+-----------------------------------------------------------------------+ From 41a4bd9a0af756993a0b2d74cda6a72e6caa697b Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 16:23:38 +0100 Subject: [PATCH 03/25] Update memcache configuration to reflect the current status and recommendation for Redis Signed-off-by: Morris Jobke --- .../caching_configuration.rst | 148 ++++++++---------- 1 file changed, 65 insertions(+), 83 deletions(-) diff --git a/admin_manual/configuration_server/caching_configuration.rst b/admin_manual/configuration_server/caching_configuration.rst index 1fb521908..703c659dd 100644 --- a/admin_manual/configuration_server/caching_configuration.rst +++ b/admin_manual/configuration_server/caching_configuration.rst @@ -25,9 +25,9 @@ of memcache that best fits your needs. The supported caching backends are: * `APCu `_, APCu 4.0.6 and up required. A local cache for systems. -* `Memcached `_ - Distributed cache for multi-server Nextcloud installations. * `Redis `_, PHP module 2.2.6 and up required. + For local and distributed caching as well as transactional file locking. +* `Memcached `_ For distributed caching. Memcaches must be explicitly configured in Nextcloud by installing @@ -42,17 +42,9 @@ active by running :ref:`label-phpinfo`. APCu ---- -PHP 5.5 and up include the Zend OPcache in core, and on most Linux -distributions it is enabled by default. However, it does -not bundle a data cache. APCu is a data cache, and it is available in most +APCu is a data cache, and it is available in most Linux distributions. On Red Hat/CentOS/Fedora systems install ``php-pecl-apcu``. On Debian/Ubuntu/Mint systems install ``php-apcu``. -On Ubuntu 14.04 LTS, the APCu version (4.0.2) is too old to use with Nextcloud (requires 4.0.6+). -You may install 4.0.7 from Ubuntu backports with this command:: - - apt-get install php5-apcu/trusty-backports - -Then restart your Web server. After restarting your Web server, add this line to your ``config.php`` file:: @@ -60,51 +52,10 @@ After restarting your Web server, add this line to your ``config.php`` file:: Refresh your Nextcloud admin page, and the cache warning should disappear. -Memcached ---------- - -Memcached is a reliable oldtimer for shared caching on distributed servers, -and performs well with Nextcloud with one exception: it is not suitable to use -with :doc:`Transactional File Locking <../configuration_files/files_locking_transactional>` -because it does not store locks, and data can disappear from the cache at any time -(Redis is the best memcache for this). - -.. note:: Be sure to install the **memcached** PHP module, and not memcache, as - in the following examples. Nextcloud supports only the **memcached** PHP - module. - -Setting up Memcached is easy. On Debian/Ubuntu/Mint install ``memcached`` and -``php5-memcached``. The installer will automatically start ``memcached`` and -configure it to launch at startup. - -On Red Hat/CentOS/Fedora install ``memcached`` and -``php-pecl-memcached``. It will not start automatically, so you must use -your service manager to start ``memcached``, and to launch it at boot as a -daemon. - -You can verify that the Memcached daemon is running with ``ps ax``:: - - ps ax | grep memcached - 19563 ? Sl 0:02 /usr/bin/memcached -m 64 -p 11211 -u memcache -l - 127.0.0.1 - -Restart your Web server, add the appropriate entries to your -``config.php``, and refresh your Nextcloud admin page. This example uses APCu -for the local cache, Memcached as the distributed memcache, and lists all the -servers in the shared cache pool with their port numbers:: - - 'memcache.local' => '\OC\Memcache\APCu', - 'memcache.distributed' => '\OC\Memcache\Memcached', - 'memcached_servers' => array( - array('localhost', 11211), - array('server1.example.com', 11211), - array('server2.example.com', 11211), - ), - Redis ----- -Redis is an excellent modern memcache to use for both distributed caching, and +Redis is an excellent modern memcache to use for both local and distributed caching, and as a local cache for :doc:`Transactional File Locking <../configuration_files/files_locking_transactional>` because it guarantees that cached objects are available for as long as they are needed. @@ -128,13 +79,13 @@ You can verify that the Redis daemon is running with ``ps ax``:: Restart your Web server, add the appropriate entries to your ``config.php``, and refresh your Nextcloud admin page. This example ``config.php`` configuration uses -Redis for the local server cache:: +Redis for the distributed server cache:: - 'memcache.local' => '\OC\Memcache\Redis', - 'redis' => array( + 'memcache.distributed' => '\OC\Memcache\Redis', + 'redis' => [ 'host' => 'localhost', 'port' => 6379, - ), + ], For best performance, use Redis for file locking by adding this:: @@ -145,19 +96,62 @@ recommended if Redis is running on the same system as Nextcloud) use this exampl ``config.php`` configuration:: 'memcache.local' => '\OC\Memcache\Redis', - 'redis' => array( - 'host' => '/var/run/redis/redis.sock', - 'port' => 0, - 'dbindex' => 0, + 'memcache.distributed' => '\OC\Memcache\Redis', + 'redis' => [ + 'host' => '/var/run/redis/redis.sock', + 'port' => 0, + 'dbindex' => 0, 'password' => 'secret', - 'timeout' => 1.5, - ), + 'timeout' => 1.5, + ], Only "host" and "port" variables are required, the other ones are optional. Redis is very configurable; consult `the Redis documentation `_ to learn more. + +Memcached +--------- + +Memcached is a reliable oldtimer for shared caching on distributed servers, +and performs well with Nextcloud with one exception: it is not suitable to use +with :doc:`Transactional File Locking <../configuration_files/files_locking_transactional>` +because it does not store locks, and data can disappear from the cache at any time +(Redis is the best memcache for this). + +.. note:: Be sure to install the **memcached** PHP module, and not memcache, as + in the following examples. Nextcloud supports only the **memcached** PHP + module. + +Setting up Memcached is easy. On Debian/Ubuntu/Mint install ``memcached`` and +``php-memcached``. The installer will automatically start ``memcached`` and +configure it to launch at startup. + +On Red Hat/CentOS/Fedora install ``memcached`` and +``php-pecl-memcached``. It will not start automatically, so you must use +your service manager to start ``memcached``, and to launch it at boot as a +daemon. + +You can verify that the Memcached daemon is running with ``ps ax``:: + + ps ax | grep memcached + 19563 ? Sl 0:02 /usr/bin/memcached -m 64 -p 11211 -u memcache -l + 127.0.0.1 + +Restart your Web server, add the appropriate entries to your +``config.php``, and refresh your Nextcloud admin page. This example uses APCu +for the local cache, Memcached as the distributed memcache, and lists all the +servers in the shared cache pool with their port numbers:: + + 'memcache.local' => '\OC\Memcache\APCu', + 'memcache.distributed' => '\OC\Memcache\Memcached', + 'memcached_servers' => [ + [ 'localhost', 11211 ], + [ 'server1.example.com', 11211 ], + [ 'server2.example.com', 11211 ], + ], + Cache Directory location ------------------------ @@ -175,30 +169,18 @@ Only use APCu:: 'memcache.local' => '\OC\Memcache\APCu', -Small organization, single-server setup -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Use APCu for local caching, Redis for file locking:: - - 'memcache.local' => '\OC\Memcache\APCu', - 'memcache.locking' => '\OC\Memcache\Redis', - 'redis' => array( - 'host' => 'localhost', - 'port' => 6379, - ), - -Large organization, clustered setup -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Organizations with single-server and clustered setups +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use Redis for everything except local memcache:: + 'memcache.local' => '\OC\Memcache\APCu', 'memcache.distributed' => '\OC\Memcache\Redis', 'memcache.locking' => '\OC\Memcache\Redis', - 'memcache.local' => '\OC\Memcache\APCu', - 'redis' => array( + 'redis' => [ 'host' => 'localhost', 'port' => 6379, - ), + ], Additional notes for Redis vs. APCu on memory caching ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -212,7 +194,7 @@ Additional Redis installation help ---------------------------------- If your version of Mint or Ubuntu does not package the required version of -``php5-redis``, then try `this Redis guide on Tech and Me +``php-redis``, then try `this Redis guide on Tech and Me `_ for a complete Redis installation on Ubuntu 14.04 using PECL. These instructions are adaptable for any distro that does not package the supported version, or that does not package Redis at all, such as SUSE Linux @@ -225,9 +207,9 @@ For PHP 7.0 and PHP 7.1 use Redis PHP module 3.1.x or later. See ``_ On Debian/Mint/Ubuntu, use ``apt-cache`` to see the available -``php5-redis`` version, or the version of your installed package:: +``php-redis`` version, or the version of your installed package:: - apt-cache policy php5-redis + apt-cache policy php-redis On CentOS and Fedora, the ``yum`` command shows available and installed version information:: From 3d49e259b16d3f0a0ba367dc6584967d43718c49 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 16:23:52 +0100 Subject: [PATCH 04/25] Fix typo in chown Signed-off-by: Morris Jobke --- admin_manual/installation/source_installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_manual/installation/source_installation.rst b/admin_manual/installation/source_installation.rst index 159006124..6836adc60 100644 --- a/admin_manual/installation/source_installation.rst +++ b/admin_manual/installation/source_installation.rst @@ -349,7 +349,7 @@ During the install process, no data folder is created, so we will create one man Make sure that apache has read and write access to the whole nextcloud folder:: - chown -R apache.apache /var/www/html/nextcloud + chown -R apache:apache /var/www/html/nextcloud Restart apache:: From a6410160f1a271a26abee4e040c1d243e773cd21 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 16:24:05 +0100 Subject: [PATCH 05/25] Nextcloud 15 support PHP 7.3 as well Signed-off-by: Morris Jobke --- admin_manual/installation/system_requirements.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/admin_manual/installation/system_requirements.rst b/admin_manual/installation/system_requirements.rst index 2cf216061..bb3496e02 100644 --- a/admin_manual/installation/system_requirements.rst +++ b/admin_manual/installation/system_requirements.rst @@ -33,6 +33,7 @@ The Nextcloud server is not compatible with Windows and macOS. | PHP Runtime | - **7.0** | | | - **7.1** | | | - **7.2** | +| | - **7.3** | +------------------+-----------------------------------------------------------------------+ See :doc:`source_installation` for minimum PHP-modules and additional software for installing Nextcloud. From a44bfe69d6a89e6ba1a7d1a68cbc1ac2f0c8e90e Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 16:29:33 +0100 Subject: [PATCH 06/25] Cron jobs are fine to be executed every 5 minutes - added comment about automatic setting of cron mode Signed-off-by: Morris Jobke --- .../background_jobs_configuration.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/admin_manual/configuration_server/background_jobs_configuration.rst b/admin_manual/configuration_server/background_jobs_configuration.rst index a8d24e012..78e6daf76 100644 --- a/admin_manual/configuration_server/background_jobs_configuration.rst +++ b/admin_manual/configuration_server/background_jobs_configuration.rst @@ -12,7 +12,7 @@ shell-based scripts that are scheduled to run periodically at fixed times, dates, or intervals. ``cron.php`` is an Nextcloud internal process that runs such background jobs on demand. -Nextcloud plug-in applications register actions with ``cron.php`` automatically +Nextcloud apps register actions with ``cron.php`` automatically to take care of typical housekeeping operations, such as garbage collecting of temporary files or checking for newly updated files using ``filescan()`` for externally mounted file systems. @@ -64,17 +64,17 @@ Using the operating system cron feature is the preferred method for executing regular tasks. This method enables the execution of scheduled jobs without the inherent limitations the Web server might have. -To run a cron job on a \*nix system, every 15 minutes, under the default Web +To run a cron job on a \*nix system, every 5 minutes, under the default Web server user (often, ``www-data`` or ``wwwrun``), you must set up the following cron job to call the **cron.php** script:: # crontab -u www-data -e - */15 * * * * php -f /var/www/nextcloud/cron.php + */5 * * * * php -f /var/www/nextcloud/cron.php You can verify if the cron job has been added and scheduled by executing:: # crontab -u www-data -l - */15 * * * * php -f /var/www/nextcloud/cron.php + */5 * * * * php -f /var/www/nextcloud/cron.php .. note:: You have to replace the path ``/var/www/nextcloud/cron.php`` with the path to your current Nextcloud installation. @@ -109,21 +109,21 @@ Replace the user ``www-data`` with the user of your http server and ``/var/www/n **nextcloudcron.timer** should look like this:: [Unit] - Description=Run Nextcloud cron.php every 15 minutes + Description=Run Nextcloud cron.php every 5 minutes [Timer] OnBootSec=5min - OnUnitActiveSec=15min + OnUnitActiveSec=5min Unit=nextcloudcron.service [Install] WantedBy=timers.target -The important parts in the timer-unit are ``OnBootSec`` and ``OnUnitActiveSec``.``OnBootSec`` will start the timer 5 minutes after boot, otherwise you would have to start it manually after every boot. ``OnUnitActiveSec`` will set a 15 minute timer after the service-unit was last activated. +The important parts in the timer-unit are ``OnBootSec`` and ``OnUnitActiveSec``.``OnBootSec`` will start the timer 5 minutes after boot, otherwise you would have to start it manually after every boot. ``OnUnitActiveSec`` will set a 5 minute timer after the service-unit was last activated. Now all that is left is to start and enable the timer by running these commands:: systemctl start nextcloudcron.timer systemctl enable nextcloudcron.timer -.. note:: Select the option ``Cron`` in the admin menu for background jobs. if left on ``AJAX`` it would execute the AJAX job on every page load. +.. note:: Selecting the option ``Cron`` in the admin menu for background jobs is not mandatory, because once `cron.php` is executed from the command line or cron service it will set it automatically to ``Cron``.g From 379b267261a1e07d7c5623133460671e20de7e5e Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 16:32:54 +0100 Subject: [PATCH 07/25] Add header for multiple config files Signed-off-by: Morris Jobke --- .../configuration_server/config_sample_php_parameters.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/admin_manual/configuration_server/config_sample_php_parameters.rst b/admin_manual/configuration_server/config_sample_php_parameters.rst index 8838b9452..0d53e87f0 100644 --- a/admin_manual/configuration_server/config_sample_php_parameters.rst +++ b/admin_manual/configuration_server/config_sample_php_parameters.rst @@ -13,6 +13,9 @@ is usually not necessary to edit ``config/config.php``. use a special value for a parameter. **Do not copy everything from** ``config/config.sample.php`` **. Only enter the parameters you wish to modify!** +Multiple config.php file +------------------------ + Nextcloud supports loading configuration parameters from multiple files. You can add arbitrary files ending with :file:`.config.php` in the :file:`config/` directory, for example you could place your email server configuration From 9ed2166b903e21aec843762a94c5842528e1f5bc Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 16:44:34 +0100 Subject: [PATCH 08/25] Proofread the email configuration documentation Signed-off-by: Morris Jobke --- .../email_configuration.rst | 49 ++++--------------- 1 file changed, 10 insertions(+), 39 deletions(-) diff --git a/admin_manual/configuration_server/email_configuration.rst b/admin_manual/configuration_server/email_configuration.rst index f9a273aaa..7faf74ae2 100644 --- a/admin_manual/configuration_server/email_configuration.rst +++ b/admin_manual/configuration_server/email_configuration.rst @@ -13,7 +13,7 @@ or it may be a remote server. .. figure:: ../images/smtp-config-wizard.png -With the new wizard, connecting Nextcloud to your mail server is fast and easy. +With the wizard, connecting Nextcloud to your mail server is fast and easy. The wizard fills in the values in ``config/config.php``, so you may use either or both as you prefer. @@ -67,10 +67,7 @@ of your mail server options in one place, in your mail server configuration then Using email templates --------------------- -We removed the template editor in Nextcloud 12 because we changed how emails -are generated. While the customization capabilities offered by the template editor -were easy to use, they often resulted in broken emails. To fix this, we designed a -much easier mechanism that automatically generates emails which follow the theme +We designed a mechanism that generates emails which follow the theming settings and look the same in all the different email clients out there. .. note:: If, for some reason, you need text-only emails, consider simply configuring @@ -82,9 +79,9 @@ settings and look the same in all the different email clients out there. Modifying the look of emails beyond the theming app capabilities ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -You can now overwrite templates by writing a class that implements the template interface -(or extends it to not need to copy over everything). Easiest way is then put this class into -an app and load it (so you do not need to patch it on every update). +You can overwrite templates by writing a class that implements the template interface +(or extends it to not need to copy over everything). Easiest way is to then put this class into +an app and load it so you do not need to patch it on every update. This is the interface of the class that needs to be implemented: https://github.com/nextcloud/server/blob/master/lib/public/Mail/IEMailTemplate.php @@ -92,9 +89,9 @@ That is the implementation that could be extended and used to see how it works: An example from `a GitHub issue `_: -1. Look at the source code of extended class `OC\Mail\EMailTemplate::class `_ +1. Look at the source code of extended class `OC\\Mail\\EMailTemplate::class `_ -2. Then override what you need in your own `OC\Mail\EMailTemplate::class` extension +2. Then override what you need in your own `OC\\Mail\\EMailTemplate::class` extension **Example:** @@ -138,8 +135,6 @@ port 25/tcp will be used unless you change that by modifying the :: - "smtp", "mail_smtphost" => "smtp.server.dom:425", @@ -147,8 +142,6 @@ or :: - "smtp", "mail_smtphost" => "smtp.server.dom", "mail_smtpport" => 425, @@ -158,8 +151,6 @@ necessary that you increase the SMTP timeout to e.g. 30s: :: - 30, If the SMTP server accepts insecure connections, the default setting can be @@ -167,8 +158,6 @@ used: :: - '', If the SMTP server only accepts secure connections you can choose between @@ -182,8 +171,6 @@ which uses the port 465/tcp: :: - "smtp.server.dom:465", "mail_smtpsecure" => 'ssl', @@ -194,8 +181,6 @@ uses the default port 25/tcp: :: - "smtp.server.dom", "mail_smtpsecure" => 'tls', @@ -204,8 +189,6 @@ authentication, if not, the default values can be taken as is. :: - false, "mail_smtpname" => "", "mail_smtppassword" => "", @@ -216,8 +199,6 @@ and password and can optionally choose between the authentication types :: - true, "mail_smtpauthtype" => "LOGIN", "mail_smtpname" => "username", @@ -233,8 +214,6 @@ Nextcloud should be able to send email out of the box. :: - "sendmail", "mail_smtphost" => "127.0.0.1", "mail_smtpport" => 25, @@ -255,8 +234,6 @@ be able to send email out of the box. :: - "qmail", "mail_smtphost" => "127.0.0.1", "mail_smtpport" => 25, @@ -279,12 +256,10 @@ Troubleshooting --------------- If you are unable to send email, try turning on debugging. Do this by enabling -the ``mail_smtpdebug parameter`` in ``config/config.php``. +the ``mail_smtpdebug`` parameter in ``config/config.php``. :: - true; .. note:: Immediately after pressing the **Send email** button, as described @@ -294,14 +269,12 @@ the ``mail_smtpdebug parameter`` in ``config/config.php``. **Question**: Why is my web domain different from my mail domain? **Answer**: The default domain name used for the sender address is the hostname -where your Nextcloud installation is served. If you have a different mail domain +where your Nextcloud installation is served. If you have a different mail domain name you can override this behavior by setting the following configuration parameter: :: - "example.com", This setting results in every email sent by Nextcloud (for example, the password @@ -397,12 +370,10 @@ Enabling debug mode ------------------- If you are unable to send email, it might be useful to activate further debug -messages by enabling the mail_smtpdebug parameter: +messages by enabling the ``mail_smtpdebug`` parameter: :: - true, .. note:: Immediately after pressing the **Send email** button, as described From 656ee0dd7e7188c898ddd621bd6b1194ff008abe Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 16:52:12 +0100 Subject: [PATCH 09/25] Update external sites page to not mention Nextcloud 13 anymore and fix image scaling issues Signed-off-by: Morris Jobke --- admin_manual/configuration_server/external_sites.rst | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/admin_manual/configuration_server/external_sites.rst b/admin_manual/configuration_server/external_sites.rst index bd6d3f7ed..8011fc28d 100644 --- a/admin_manual/configuration_server/external_sites.rst +++ b/admin_manual/configuration_server/external_sites.rst @@ -2,11 +2,10 @@ Linking external sites ====================== -You can embed external websites or documents inside your Nextcloud pages with the External -sites app, as this screenshot shows. +You can embed external websites or documents inside your Nextcloud pages with the **External +sites** app, as this screenshot shows. .. figure:: ../images/external-sites-1.png - :scale: 70% *Click to enlarge* @@ -26,10 +25,9 @@ This allows you to have different documentation links for users depending on the It is also possible to add links for a special device (recognized by the user agent). Currently the following options are available: All devices, Android app, iOS app, Desktop client and all others (Browsers). -Starting with Nextcloud 13, it is also possible to add links only for members of a given group. +It is also possible to add links only for members of a given group. .. figure:: ../images/external-sites-2.png - :scale: 50% *Click to enlarge* @@ -65,5 +63,5 @@ On this page, X-Frame-Options prevents the embedding. .. figure:: ../images/external-sites-5.png -**New:** With Nextcloud 13 a redirect option was added, so such websites can still be added for quick access. -Instead of embedding the website the user will be redirected to it instead. +There is also a redirect option, which allows that those websites can still be added for quick access. +Instead of embedding the website the user will be redirected to it. From fa62e485b71e2662a7e841633a80cf5c302230ef Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 16:57:42 +0100 Subject: [PATCH 10/25] Remove unneeded code from language config docs Signed-off-by: Morris Jobke --- admin_manual/configuration_server/language_configuration.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/admin_manual/configuration_server/language_configuration.rst b/admin_manual/configuration_server/language_configuration.rst index f8beda4d2..204bbca1b 100644 --- a/admin_manual/configuration_server/language_configuration.rst +++ b/admin_manual/configuration_server/language_configuration.rst @@ -15,8 +15,6 @@ starts with a given language, you can set a **default_language** parameter in th :: - "en", @@ -29,8 +27,6 @@ in the :file:`config/config.php`. :: - "en", From 0c801bd90d4f3d867266a09cacd24c02f5eec9e3 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 17:00:07 +0100 Subject: [PATCH 11/25] Update syntax of log config page Signed-off-by: Morris Jobke --- .../configuration_server/logging_configuration.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/admin_manual/configuration_server/logging_configuration.rst b/admin_manual/configuration_server/logging_configuration.rst index 653de2c46..3911fe939 100644 --- a/admin_manual/configuration_server/logging_configuration.rst +++ b/admin_manual/configuration_server/logging_configuration.rst @@ -17,7 +17,7 @@ Logging levels range from **DEBUG**, which logs all activity, to **FATAL**, whic By default the log level is set to **2** (WARN). Use **DEBUG** when you have a problem to diagnose, and then reset your log level to a less-verbose level as **DEBUG** outputs a lot of information, and can affect your server performance. -Logging level parameters are set in the :file:`config/config.php` file, or on the Admin page of your Nextcloud Web GUI. +Logging level parameters are set in the :file:`config/config.php` file. Nextcloud ~~~~~~~~~ @@ -28,10 +28,10 @@ file named **nextcloud.log** will be created in the directory which has been configured by the **datadirectory** parameter in :file:`config/config.php`. The desired date format can optionally be defined using the **logdateformat** parameter in :file:`config/config.php`. -By default the `PHP date function`_ parameter "*c*" is used, and therefore the -date/time is written in the format "*2013-01-10T15:20:25+02:00*". By using the +By default the `PHP date function`_ parameter ``c`` is used, and therefore the +date/time is written in the format ``2013-01-10T15:20:25+02:00``. By using the date format in the example below, the date/time format will be written in the format -"*January 10, 2013 15:20:25*". +``January 10, 2013 15:20:25``. :: From df05c058b717cea5d3aab498c653cafd8bc2614e Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 17:10:03 +0100 Subject: [PATCH 12/25] Restructure log config docs headers Signed-off-by: Morris Jobke --- .../configuration_server/logging_configuration.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/admin_manual/configuration_server/logging_configuration.rst b/admin_manual/configuration_server/logging_configuration.rst index 3911fe939..cbca04f87 100644 --- a/admin_manual/configuration_server/logging_configuration.rst +++ b/admin_manual/configuration_server/logging_configuration.rst @@ -4,8 +4,8 @@ Logging configuration Use your Nextcloud log to review system status, or to help debug problems. You may adjust logging levels, and choose between using the Nextcloud log or your syslog. -Parameters ----------- +Log level +--------- Logging levels range from **DEBUG**, which logs all activity, to **FATAL**, which logs only fatal errors. @@ -19,8 +19,11 @@ By default the log level is set to **2** (WARN). Use **DEBUG** when you have a p Logging level parameters are set in the :file:`config/config.php` file. -Nextcloud -~~~~~~~~~ +Log type +-------- + +file +~~~~ All log information will be written to a separate log file which can be viewed using the log viewer on your Admin page. By default, a log @@ -35,7 +38,7 @@ date format in the example below, the date/time format will be written in the fo :: - "log_type" => "owncloud", + "log_type" => "file", "logfile" => "nextcloud.log", "loglevel" => "3", "logdateformat" => "F d, Y H:i:s", From 8cc9f203d21689640fd78cfdb4ffeaf79dc8eecd Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 17:15:16 +0100 Subject: [PATCH 13/25] Fix typo Signed-off-by: Morris Jobke --- admin_manual/installation/apps_supported.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_manual/installation/apps_supported.rst b/admin_manual/installation/apps_supported.rst index 49a621c21..2560abac5 100644 --- a/admin_manual/installation/apps_supported.rst +++ b/admin_manual/installation/apps_supported.rst @@ -6,7 +6,7 @@ Below is the list of apps supported for Nextcloud |version|. Supported here mean * Activity * Admin Audit Log -* AntiVirus +* Antivirus * Calendar * Circles * Collaborative Tags From 7fc77a0d672e4d81b82d9ff0796ea76862fbdf54 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 17:53:16 +0100 Subject: [PATCH 14/25] Antivirus configuration updates Signed-off-by: Morris Jobke --- .../antivirus_configuration.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/admin_manual/configuration_server/antivirus_configuration.rst b/admin_manual/configuration_server/antivirus_configuration.rst index 613cfd9e9..880820f4c 100644 --- a/admin_manual/configuration_server/antivirus_configuration.rst +++ b/admin_manual/configuration_server/antivirus_configuration.rst @@ -1,9 +1,9 @@ -======================================== -Configuring the ClamAV antivirus scanner -======================================== +=============================== +Antivirus scanner configuration +=============================== You can configure your Nextcloud server to automatically run a virus scan on -newly-uploaded files with the Antivirus App for Files. The Antivirus App for +newly-uploaded files with the Antivirus app for Files. The Antivirus app for Files integrates the open source anti-virus engine `ClamAV `_ with Nextcloud. ClamAV detects all forms of malware including Trojan horses, viruses, and worms, and it operates on all @@ -15,7 +15,7 @@ intervals. ClamAV runs on Linux and any Unix-type operating system, and Microsoft Windows. However, it has only been tested with Nextcloud on Linux, so these instructions are for Linux systems. You must first install ClamAV, and then install and -configure the Antivirus App for Files on Nextcloud. +configure the Antivirus app for Files on Nextcloud. Installing ClamAV ----------------- @@ -35,8 +35,8 @@ it's a good idea to review the ClamAV documentation and your settings in ``/etc/clamav/``. Enable verbose logging in both ``clamd.conf`` and ``freshclam.conf`` until you get any kinks worked out. -Red Hat 7, CentOS 7 - On Red Hat 7 and related systems you must install the Extra Packages for +RedHat Enterprise Linux 7, CentOS 7 + On RedHat Enterprise Linux 7 and related systems you must install the Extra Packages for Enterprise Linux (EPEL) repository, and then install ClamAV:: yum install epel-release From e23b3da182d93d61fa9fda8f23007a5f1998514a Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 17:53:32 +0100 Subject: [PATCH 15/25] Remove outdated config switches Signed-off-by: Morris Jobke --- admin_manual/configuration_server/index.rst | 1 - .../thirdparty_php_configuration.rst | 23 ------------------- 2 files changed, 24 deletions(-) delete mode 100644 admin_manual/configuration_server/thirdparty_php_configuration.rst diff --git a/admin_manual/configuration_server/index.rst b/admin_manual/configuration_server/index.rst index 8d67a8552..bb7496826 100644 --- a/admin_manual/configuration_server/index.rst +++ b/admin_manual/configuration_server/index.rst @@ -18,7 +18,6 @@ Server configuration harden_server antivirus_configuration reverse_proxy_configuration - thirdparty_php_configuration automatic_configuration server_tuning theming diff --git a/admin_manual/configuration_server/thirdparty_php_configuration.rst b/admin_manual/configuration_server/thirdparty_php_configuration.rst deleted file mode 100644 index 9d8dfebc4..000000000 --- a/admin_manual/configuration_server/thirdparty_php_configuration.rst +++ /dev/null @@ -1,23 +0,0 @@ -================================ -Using third party PHP components -================================ - -Nextcloud uses some third party PHP components to provide some of its functionality. These components are part of the software package and are contained in the **/3rdparty** folder. - -Managing third party parameters -------------------------------- - -When using third party components, keep the following parameters in mind: - -* **3rdpartyroot** -- Specifies the location of the 3rd-party folder. To change the default location of this folder, you can use this parameter to define the absolute file system path to the folder location. - -* **3rdpartyurl** -- Specifies the http web path to the 3rdpartyroot folder, starting at the Nextcloud web root. - -An example of what these parameters might look like is as follows: - -:: - - OC::$SERVERROOT."/3rdparty", - "3rdpartyurl" => "/3rdparty", From a774835e7136ab83bb57c1be543c8ab3d3b182de Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 18:00:53 +0100 Subject: [PATCH 16/25] Add netdata as performance tool Signed-off-by: Morris Jobke --- admin_manual/configuration_server/server_tuning.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin_manual/configuration_server/server_tuning.rst b/admin_manual/configuration_server/server_tuning.rst index 47104e7fe..192d83470 100644 --- a/admin_manual/configuration_server/server_tuning.rst +++ b/admin_manual/configuration_server/server_tuning.rst @@ -13,7 +13,8 @@ Reducing system load High system load will slow down Nextcloud and might also lead to other unwanted side effects. To reduce load you should first identify the source of the problem. -Tools such as htop, iotop or `glances `_ +Tools such as htop, iotop, `netdata `_ or +`glances `_ will help to identify the process or the drive that slows down your system. First you should make sure that you installed/assigned enough RAM. Swap usage should be prevented by all means. If you run your database inside a VM, you should not From 5cac6d1f9837b622d36e24146ca691ece38298f3 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 18:01:11 +0100 Subject: [PATCH 17/25] Proper syntax in autosetup docs Signed-off-by: Morris Jobke --- .../configuration_server/automatic_configuration.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/admin_manual/configuration_server/automatic_configuration.rst b/admin_manual/configuration_server/automatic_configuration.rst index 1eaae2e1e..09b31cddc 100644 --- a/admin_manual/configuration_server/automatic_configuration.rst +++ b/admin_manual/configuration_server/automatic_configuration.rst @@ -8,10 +8,10 @@ to set up each instance separately as described in For this reason, Nextcloud provides an automatic configuration feature. To take advantage of this feature, you must create a configuration file, called -:file:`../nextcloud/config/autoconfig.php`, and set the file parameters as required. +:file:`config/autoconfig.php`, and set the file parameters as required. You can specify any number of parameters in this file. Any unspecified parameters appear on the "Finish setup" screen when you first launch Nextcloud. -The :file:`../nextcloud/config/autoconfig.php` is automatically removed after the initial configuration has been applied. +The :file:`config/autoconfig.php` is automatically removed after the initial configuration has been applied. Parameters ---------- @@ -38,9 +38,9 @@ Using the following parameter settings, the "Finish setup" screen requests datab :: "/www/htdocs/nextcloud/data", - ); + ]; SQLite database @@ -51,11 +51,11 @@ Using the following parameter settings, the "Finish setup" screen requests data :: "sqlite", "dbname" => "nextcloud", "dbtableprefix" => "", - ); + ]; MySQL database ^^^^^^^^^^^^^^ From 15ae5dd990a134b94d9704dd0b93ab10878e1f47 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 18:05:24 +0100 Subject: [PATCH 18/25] Fix spelling of "theming app" Signed-off-by: Morris Jobke --- admin_manual/configuration_server/theming.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin_manual/configuration_server/theming.rst b/admin_manual/configuration_server/theming.rst index 7e47ddea9..1c1a6cfec 100644 --- a/admin_manual/configuration_server/theming.rst +++ b/admin_manual/configuration_server/theming.rst @@ -36,7 +36,7 @@ This requires the following additional dependencies: - PHP module ``imagick`` - SVG support for imagick (e.g. ``libmagickcore5-extra``) -.. note:: In the advanced options of the theming-app you are able to set a custom +.. note:: In the advanced options of the theming app you are able to set a custom favicon in case you do not want to use the same logo resources you have set above or you do not want to install the mentioned dependencies. @@ -48,7 +48,7 @@ Branded clients users get up and running in no time. If you are interested in our advanced branding & support subscription, `contact our sales team `_. -The theming-app supports to change the URLs to the mobile apps (Android & iOS) that +The theming app supports to change the URLs to the mobile apps (Android & iOS) that is shown when the webinterface is opened on one of those devices. Then there was a header shown, that redirects the user to the app in the app store. By default this redirects to the Nextcloud apps. In some cases it is wanted that this From 19f5161ead2738687050e9ca7068c8d105ac558b Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 18:08:29 +0100 Subject: [PATCH 19/25] Update syntax and layout of oauth docs Signed-off-by: Morris Jobke --- admin_manual/configuration_server/oauth2.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin_manual/configuration_server/oauth2.rst b/admin_manual/configuration_server/oauth2.rst index c358dfcce..36c676c26 100644 --- a/admin_manual/configuration_server/oauth2.rst +++ b/admin_manual/configuration_server/oauth2.rst @@ -20,10 +20,10 @@ You should now have a Client Identifier and Secret. Enter those into your ``OAut Please provide the OAuth2 application the following details: -Authorization endpoint: SERVER/apps/oauth2/authorize -Token endpoint: SERVER/apps/oauth2/api/v1/token +* Authorization endpoint: ``https://cloud.example.org/apps/oauth2/authorize`` +* Token endpoint: ``https://cloud.example.org/apps/oauth2/api/v1/token`` -Note that the SERVER portion must include `index.php` at the end if pretty URL is not configured. +Note that you must include ``index.php`` if pretty URL is not configured - i.e. ``https://cloud.example.org/index.php/apps/oauth2/api/v1/token``. The access token ---------------- From aefc10ffed1408898a93d3141094cae588c17860 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 18:13:07 +0100 Subject: [PATCH 20/25] Remove duplicate documentation of web server user from password reset docs Signed-off-by: Morris Jobke --- .../reset_admin_password.rst | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/admin_manual/configuration_user/reset_admin_password.rst b/admin_manual/configuration_user/reset_admin_password.rst index 1f817a450..9bbad3e9b 100644 --- a/admin_manual/configuration_user/reset_admin_password.rst +++ b/admin_manual/configuration_user/reset_admin_password.rst @@ -12,10 +12,10 @@ The normal ways to recover a lost password are: 2. Ask another Nextcloud server admin to reset it for you. If neither of these is an option, then you have a third option, and that is -using the ``occ`` command. ``occ`` is in the ``nextcloud`` directory, for -example ``/var/www/nextcloud/occ``. ``occ`` has a command for resetting all -user passwords, ``user:resetpassword``. It is best to run ``occ`` as the HTTP -user, as in this example on Ubuntu Linux:: +using the ``occ`` command. See :doc:`../configuration_server/occ_command` to +learn more about using the ``occ`` command. + +:: $ sudo -u www-data php /var/www/nextcloud/occ user:resetpassword admin Enter a new password: @@ -24,13 +24,3 @@ user, as in this example on Ubuntu Linux:: If your Nextcloud username is not ``admin``, then substitute your Nextcloud username. - -You can find your HTTP user in your HTTP configuration file. These are the -default Apache HTTP user:group on Linux distros: - -* Centos, Red Hat, Fedora: apache:apache -* Debian, Ubuntu, Linux Mint: www-data:www-data -* openSUSE: wwwrun:www - -See :doc:`../configuration_server/occ_command` to learn more about using the -``occ`` command. From 4d78dd344e42f164622cdf73e57796efdfe271bd Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 18:13:22 +0100 Subject: [PATCH 21/25] Fix syntax error in user config docs Signed-off-by: Morris Jobke --- admin_manual/configuration_user/user_configuration.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/admin_manual/configuration_user/user_configuration.rst b/admin_manual/configuration_user/user_configuration.rst index bc0017206..e824d5185 100644 --- a/admin_manual/configuration_user/user_configuration.rst +++ b/admin_manual/configuration_user/user_configuration.rst @@ -149,7 +149,9 @@ You now have a configurable option in ``config.php`` that controls whether external storage is counted against user's quotas. This is still experimental, and may not work as expected. The default is to not count external storage as part of user storage quotas. If you prefer to include it, -then change the default ``false`` to ``true``.:: +then change the default ``false`` to ``true``. + +:: 'quota_include_external_storage' => false, From 9a709cb5e92a0af32fc1fe837489d661aa4f1ee7 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 18:22:05 +0100 Subject: [PATCH 22/25] Update external user management docs Signed-off-by: Morris Jobke --- .../user_auth_ftp_smb_imap.rst | 74 +++++++++---------- 1 file changed, 33 insertions(+), 41 deletions(-) diff --git a/admin_manual/configuration_user/user_auth_ftp_smb_imap.rst b/admin_manual/configuration_user/user_auth_ftp_smb_imap.rst index 97ecc6259..56622779e 100644 --- a/admin_manual/configuration_user/user_auth_ftp_smb_imap.rst +++ b/admin_manual/configuration_user/user_auth_ftp_smb_imap.rst @@ -8,22 +8,20 @@ syntax: :: - array ( - 0 => array ( - "class" => ..., - "arguments" => array ( - 0 => ... - ), - ), - ), + "user_backends" => [ + [ + "class" => ..., + "arguments" => [ + ... + ], + ], + ], .. note:: A non-blocking or correctly configured SELinux setup is needed for these backends to work. Please refer to the :ref:`selinux-config-label`. Currently the “External user support” (user_external) app, which you need to -enable first (See :doc:`../installation/apps_management_installation`) +enable first (See :doc:`../apps_management`) provides the following user backends: IMAP @@ -37,16 +35,14 @@ Provides authentication against IMAP servers :: - array ( - 0 => array ( - "class" => "OC_User_IMAP", - "arguments" => array ( - 0 => '{imap.gmail.com:993/imap/ssl}' - ), - ), - ), + "user_backends" => [ + [ + "class" => "OC_User_IMAP", + "arguments" => [ + '{imap.gmail.com:993/imap/ssl}' + ], + ], + ], SMB --- @@ -60,16 +56,14 @@ Provides authentication against Samba servers :: - array ( - 0 => array ( - "class" => "OC_User_SMB", - "arguments" => array ( - 0 => 'localhost' - ), - ), - ), + "user_backends" => [ + [ + "class" => "OC_User_SMB", + "arguments" => [ + 'localhost' + ], + ], + ], FTP --- @@ -83,13 +77,11 @@ Provides authentication against FTP servers :: - array ( - 0 => array ( - "class" => "OC_User_FTP", - "arguments" => array ( - 0 => 'localhost' - ), - ), - ), + "user_backends" => [ + [ + "class" => "OC_User_FTP", + "arguments" => [ + 'localhost' + ], + ], + ], From fb2814af2000c396321c7483be5468ccfa5d1d4e Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 18:27:15 +0100 Subject: [PATCH 23/25] Fix layout of LDAP API docs Signed-off-by: Morris Jobke --- .../configuration_user/user_auth_ldap_api.rst | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/admin_manual/configuration_user/user_auth_ldap_api.rst b/admin_manual/configuration_user/user_auth_ldap_api.rst index 6dfd8712d..50d54f71f 100644 --- a/admin_manual/configuration_user/user_auth_ldap_api.rst +++ b/admin_manual/configuration_user/user_auth_ldap_api.rst @@ -18,7 +18,10 @@ basic HTTP authentication header. Example ^^^^^^^ -* POST ``https://admin:secret@example.com/ocs/v2.php/apps/user_ldap/api/v1/config`` -H "OCS-APIREQUEST: true" +:: + + $ curl -X POST https://admin:secret@example.com/ocs/v2.php/apps/user_ldap/api/v1/config -H "OCS-APIREQUEST: true" + * Creates a new, empty configuration XML output @@ -51,7 +54,10 @@ Deletes a given LDAP configuration. Authentication is done by sending a basic HT Example ^^^^^^^ -* DELETE ``https://admin:secret@example.com/ocs/v2.php/apps/user_ldap/api/v1/config/s02 -H "OCS-APIREQUEST: true"`` +:: + + $ curl -X DELETE ``https://admin:secret@example.com/ocs/v2.php/apps/user_ldap/api/v1/config/s02 -H "OCS-APIREQUEST: true" + * deletes the LDAP configuration XML output @@ -83,7 +89,10 @@ Returns all keys and values of the specified LDAP configuration. Authentication Example ^^^^^^^ -* GET ``https://admin:secret@example.com/ocs/v2.php/apps/user_ldap/api/v1/config/s02?showPassword=1 -H "OCS-APIREQUEST: true"`` +:: + + $ curl -X GET https://admin:secret@example.com/ocs/v2.php/apps/user_ldap/api/v1/config/s02?showPassword=1 -H "OCS-APIREQUEST: true" + * fetches the LDAP configuration XML output @@ -169,8 +178,11 @@ Updates a configuration with the provided values. Authentication is done by send Example ^^^^^^^ -* PUT ``https://admin:secret@example.com/ocs/v2.php/apps/user_ldap/api/v1/config/s01 -H "OCS-APIREQUEST: true" -d "configData[ldapHost]=ldap%3A%2F%2Fldap.server.tld &configData[ldapPort]=389"`` -* fetches the LDAP configuration +:: + + $ curl -X PUT https://admin:secret@example.com/ocs/v2.php/apps/user_ldap/api/v1/config/s01 -H "OCS-APIREQUEST: true" -d "configData[ldapHost]=ldap%3A%2F%2Fldap.server.tld &configData[ldapPort]=389" + +* updates the LDAP configuration XML output ^^^^^^^^^^ From 24a3161df27ebdb56dafb9ce01b073a1a27f7854 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 18:31:48 +0100 Subject: [PATCH 24/25] Style fix for provisioning API Signed-off-by: Morris Jobke --- admin_manual/configuration_user/user_provisioning_api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_manual/configuration_user/user_provisioning_api.rst b/admin_manual/configuration_user/user_provisioning_api.rst index 458546a59..74f7d01f3 100644 --- a/admin_manual/configuration_user/user_provisioning_api.rst +++ b/admin_manual/configuration_user/user_provisioning_api.rst @@ -11,7 +11,7 @@ info, and to enable or disable an app remotely. HTTP requests can be used via a Basic Auth header to perform any of the functions listed above. The Provisioning API app is enabled by default. -The base URL for all calls to the share API is **nextcloud_base_url/ocs/v1.php/cloud**. +The base URL for all calls to the share API is ``https://cloud.example.com/ocs/v1.php/cloud``. All calls to OCS endpoints require the ``OCS-APIRequest`` header to be set to ``true``. From 3b5f25aacc13dd59fb2377e837b32502e10b3a84 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 30 Nov 2018 18:47:54 +0100 Subject: [PATCH 25/25] Fix layout of user provisioning API Signed-off-by: Morris Jobke --- .../instruction_set_for_apps.rst | 24 ++-- .../instruction_set_for_groups.rst | 32 +++-- .../instruction_set_for_users.rst | 113 +++++++++++------- 3 files changed, 108 insertions(+), 61 deletions(-) diff --git a/admin_manual/configuration_user/instruction_set_for_apps.rst b/admin_manual/configuration_user/instruction_set_for_apps.rst index 5f109b373..1379ae2de 100644 --- a/admin_manual/configuration_user/instruction_set_for_apps.rst +++ b/admin_manual/configuration_user/instruction_set_for_apps.rst @@ -21,9 +21,11 @@ Status codes: Example ^^^^^^^ +:: - * GET ``http://admin:secret@example.com/ocs/v1.php/cloud/apps?filter=enabled`` - * Gets enabled apps + $ curl -X GET http://admin:secret@example.com/ocs/v1.php/cloud/apps?filter=enabled + +* Gets enabled apps XML output ^^^^^^^^^^ @@ -60,9 +62,11 @@ Status codes: Example ^^^^^^^ +:: - * GET ``http://admin:secret@example.com/ocs/v1.php/cloud/apps/files`` - * Get app info for the ``files`` app + $ curl -X GET http://admin:secret@example.com/ocs/v1.php/cloud/apps/files + +* Get app info for the ``files`` app XML output ^^^^^^^^^^ @@ -114,9 +118,11 @@ Status codes: Example ^^^^^^^ +:: - * POST ``http://admin:secret@example.com/ocs/v1.php/cloud/apps/files_texteditor`` - * Enable the ``files_texteditor`` app + $ curl -X POST http://admin:secret@example.com/ocs/v1.php/cloud/apps/files_texteditor + +* Enable the ``files_texteditor`` app XML output ^^^^^^^^^^ @@ -148,9 +154,11 @@ Status codes: Example ^^^^^^^ +:: - * DELETE ``http://admin:secret@example.com/ocs/v1.php/cloud/apps/files_texteditor`` - * Disable the ``files_texteditor`` app + $ curl -X DELETE http://admin:secret@example.com/ocs/v1.php/cloud/apps/files_texteditor + +* Disable the ``files_texteditor`` app XML output ^^^^^^^^^^ diff --git a/admin_manual/configuration_user/instruction_set_for_groups.rst b/admin_manual/configuration_user/instruction_set_for_groups.rst index 287721031..6fa6225f4 100644 --- a/admin_manual/configuration_user/instruction_set_for_groups.rst +++ b/admin_manual/configuration_user/instruction_set_for_groups.rst @@ -21,9 +21,11 @@ Status codes: Example ^^^^^^^ +:: - * GET ``http://admin:secret@example.com/ocs/v1.php/cloud/groups?search=adm`` - * Returns list of groups matching the search string. + $ curl -X GET http://admin:secret@example.com/ocs/v1.php/cloud/groups?search=adm + +* Returns list of groups matching the search string. XML output ^^^^^^^^^^ @@ -63,10 +65,11 @@ Status codes: Example ^^^^^^^ +:: - * POST ``http://admin:secret@example.com/ocs/v1.php/cloud/groups -d - groupid="newgroup"`` - * Adds a new group called ``newgroup`` + $ curl -X POST http://admin:secret@example.com/ocs/v1.php/cloud/groups -d groupid="newgroup" + +* Adds a new group called ``newgroup`` XML output ^^^^^^^^^^ @@ -98,9 +101,11 @@ Status codes: Example ^^^^^^^ +:: - * POST ``http://admin:secret@example.com/ocs/v1.php/cloud/groups/admin`` - * Returns a list of users in the ``admin`` group + $ curl -X POST http://admin:secret@example.com/ocs/v1.php/cloud/groups/admin + +* Returns a list of users in the ``admin`` group XML output ^^^^^^^^^^ @@ -138,10 +143,11 @@ Status codes: Example ^^^^^^^ +:: - * GET - ``https://admin:secret@example.com/ocs/v1.php/cloud/groups/mygroup/subadmins`` - * Return the subadmins of the group: ``mygroup`` + $ curl -X GET https://admin:secret@example.com/ocs/v1.php/cloud/groups/mygroup/subadmins + +* Return the subadmins of the group: ``mygroup`` XML output ^^^^^^^^^^ @@ -178,9 +184,11 @@ Status codes: Example ^^^^^^^ +:: - * DELETE ``http://admin:secret@example.com/ocs/v1.php/cloud/groups/mygroup`` - * Delete the group ``mygroup`` + $ curl -X DELETE http://admin:secret@example.com/ocs/v1.php/cloud/groups/mygroup + +* Delete the group ``mygroup`` XML output ^^^^^^^^^^ diff --git a/admin_manual/configuration_user/instruction_set_for_users.rst b/admin_manual/configuration_user/instruction_set_for_users.rst index b9b5adb0b..c0cc11ec6 100644 --- a/admin_manual/configuration_user/instruction_set_for_users.rst +++ b/admin_manual/configuration_user/instruction_set_for_users.rst @@ -27,9 +27,10 @@ Status codes: Example ^^^^^^^ +:: + + $ curl -X POST http://admin:secret@example.com/ocs/v1.php/cloud/users -d userid="Frank" -d password="frankspassword" -* POST ``http://admin:secret@example.com/ocs/v1.php/cloud/users -d - userid="Frank" -d password="frankspassword"`` * Creates the user ``Frank`` with password ``frankspassword`` * optionally groups can be specified by one or more ``groups[]`` query parameters: ``URL -d groups[]="admin" -D groups[]="Team1"`` @@ -68,8 +69,10 @@ Status codes: Example ^^^^^^^ +:: + + $ curl -X GET http://admin:secret@example.com/ocs/v1.php/cloud/users?search=Frank -* GET ``http://admin:secret@example.com/ocs/v1.php/cloud/users?search=Frank`` * Returns list of users matching the search string. XML output @@ -107,8 +110,11 @@ Status codes: Example ^^^^^^^ - * GET ``http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank`` - * Returns information on the user ``Frank`` +:: + + $ curl -X GET http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank + +* Returns information on the user ``Frank`` XML output ^^^^^^^^^^ @@ -171,13 +177,17 @@ Status codes: Examples ^^^^^^^^ - * PUT ``http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank -d - key="email" -d value="franksnewemail@example.org"`` - * Updates the email address for the user ``Frank`` - - * PUT ``http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank -d - key="quota" -d value="100MB"`` - * Updates the quota for the user ``Frank`` +:: + + $ curl -X PUT http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank -d key="email" -d value="franksnewemail@example.org" + +* Updates the email address for the user ``Frank`` + +:: + + $ curl -X PUT http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank -d key="quota" -d value="100MB" + +* Updates the quota for the user ``Frank`` XML output ^^^^^^^^^^ @@ -211,8 +221,11 @@ Statuscodes: Example ^^^^^^^ - * PUT ``http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/disable`` - * Disables the user ``Frank`` +:: + + $ curl -X PUT http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/disable + +* Disables the user ``Frank`` XML output ^^^^^^^^^^ @@ -247,8 +260,11 @@ Statuscodes: Example ^^^^^^^ - * PUT ``http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/enable`` - * Enables the user ``Frank`` +:: + + $ curl -X PUT http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/enable + +* Enables the user ``Frank`` XML output ^^^^^^^^^^ @@ -283,8 +299,11 @@ Statuscodes: Example ^^^^^^^ - * DELETE ``http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank`` - * Deletes the user ``Frank`` +:: + + $ curl -X DELETE http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank + +* Deletes the user ``Frank`` XML output ^^^^^^^^^^ @@ -317,8 +336,11 @@ Status codes: Example ^^^^^^^ - * GET ``http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/groups`` - * Retrieves a list of groups of which ``Frank`` is a member +:: + + $ curl -X GET http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/groups + +* Retrieves a list of groups of which ``Frank`` is a member XML output ^^^^^^^^^^ @@ -362,9 +384,11 @@ Status codes: Example ^^^^^^^ - * POST ``http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/groups - -d groupid="newgroup"`` - * Adds the user ``Frank`` to the group ``newgroup`` +:: + + $ curl -X POST http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/groups -d groupid="newgroup" + +* Adds the user ``Frank`` to the group ``newgroup`` XML output ^^^^^^^^^^ @@ -403,10 +427,11 @@ Status codes: Example ^^^^^^^ - * DELETE - ``http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/groups -d - groupid="newgroup"`` - * Removes the user ``Frank`` from the group ``newgroup`` +:: + + $ curl -X DELETE http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/groups -d groupid="newgroup" + +* Removes the user ``Frank`` from the group ``newgroup`` XML output ^^^^^^^^^^ @@ -444,10 +469,11 @@ Status codes: Example ^^^^^^^ - * POST - ``https://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/subadmins - -d groupid="group"`` - * Makes the user ``Frank`` a subadmin of the ``group`` group +:: + + $ curl -X POST https://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/subadmins -d groupid="group" + +* Makes the user ``Frank`` a subadmin of the ``group`` group XML output ^^^^^^^^^^ @@ -485,10 +511,11 @@ Status codes: Example ^^^^^^^ - * DELETE - ``https://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/subadmins - -d groupid="oldgroup"`` - * Removes ``Frank's`` subadmin rights from the ``oldgroup`` group +:: + + $ curl -X DELETE https://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/subadmins -d groupid="oldgroup" + +* Removes ``Frank's`` subadmin rights from the ``oldgroup`` group XML output ^^^^^^^^^^ @@ -523,9 +550,11 @@ Status codes: Example ^^^^^^^ - * GET - ``https://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/subadmins`` - * Returns the groups of which ``Frank`` is a subadmin +:: + + $ curl -X GET https://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/subadmins + +* Returns the groups of which ``Frank`` is a subadmin XML output ^^^^^^^^^^ @@ -562,9 +591,11 @@ Status codes: Example ^^^^^^^ - * POST - ``https://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/welcome`` - * Sends the welcome email to ``Frank`` +:: + + $ curl -X POST https://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/welcome + +* Sends the welcome email to ``Frank`` XML output ^^^^^^^^^^