2017-01-13

Move to Tips and tricks, clean-up

← Older revision

Revision as of 19:36, 13 January 2017

(4 intermediate revisions by the same user not shown)

Line 23:

Line 23:

* A web server: [[Apache]] or [[nginx]]

* A web server: [[Apache]] or [[nginx]]

* A database: [[MariaDB]] or [[PostgreSQL]]

* A database: [[MariaDB]] or [[PostgreSQL]]



* [[PHP]] with [[
PHP
#
gd]], [[
PHP
#MySQL/MariaDB]], {{pkg
|
php-intl}} and {{pkg|php-mcrypt}} as
additional modules.

+

* [[PHP]] with [[#PHP|additional modules
]]
.

Make sure the required components are correctly setup before configuring/installing OwnCloud/Nextcloud.

Make sure the required components are correctly setup before configuring/installing OwnCloud/Nextcloud.

Line 85:

Line 85:

{{Tip|For all prerequisite PHP modules, see upstream documentation: [https://doc.owncloud.org/server/9.2/admin_manual/installation/source_installation.html#prerequisites ownCloud 9.2] or [https://docs.nextcloud.com/server/11/admin_manual/installation/source_installation.html#prerequisites Nextcloud 11.0].}}

{{Tip|For all prerequisite PHP modules, see upstream documentation: [https://doc.owncloud.org/server/9.2/admin_manual/installation/source_installation.html#prerequisites ownCloud 9.2] or [https://docs.nextcloud.com/server/11/admin_manual/installation/source_installation.html#prerequisites Nextcloud 11.0].}}



In
{{
ic
|
/etc/
php
/php.ini
}}
, uncomment
{{
ic
|
gd.so
}}.

+

Install [[PHP#gd]],
{{
pkg
|php
-intl
}}
and
{{
pkg
|
php-mcrypt
}}
as additional modules
.



Depending on which database backend is
to be
used
, in {{ic|/etc/php/php.ini}}, uncomment the following extensions
:

+

Depending on which database backend is used:



* For [[MySQL]],
{{ic|mysqli.so}} and {{ic|pdo_mysql.so}}
.

+

* For [[MySQL]],
see [[PHP#MySQL/MariaDB]]
.



* For [[PostgreSQL]],
{{ic|pdo_pgsql.so}} and {{ic|pgsql.so}}, and install {{Pkg|php-pgsql}}
.

+

* For [[PostgreSQL]],
see [[PHP#PostgreSQL]]
.



* For [[SQLite]],
{{ic|pdo_sqlite.so}} and {{ic|sqlite3.so}}, and install {{Pkg|php-sqlite}}
.

+

* For [[SQLite]],
see [[PHP#Sqlite]]
.



Enhanced performance is achieved
through the
recommended
implementation of
PHP caching using
[[PHP#
APCu
]],
and
[
[PHP#OPCache]].  In {{ic|
/
etc
/
php/conf
.
d/apcu
.
ini}}, uncomment {{ic|apcu.so}}.

+

Performance may be improved
through the implementation of [[PHP#
Caching|caching
]],
see
[
https:
//
docs
.
nextcloud
.
com
/
server
/
11
/
admin_manual/configuration_server/caching_configuration
.
html Configuring Memory Caching] on the official documentation for details
.



+



In {{ic|
/
etc
/
php
/
php
.
ini}}, uncomment {{ic|opcache.so}}
.

+

=== Initialize owncloud/nextcloud ===

=== Initialize owncloud/nextcloud ===



On a fresh installation
,
an owncloud/nextcloud admin account needs to be created and the initial setup needs to occur
.
This is accomplished by pointing a browser to the FQDN defined in the webserver config:

+

Simple open the address OwnCloud/Nextcloud has been configured on
,
e.g
. https://www.
example
.com/.



https://www.
mydomain
.com

+



+



Enter the administrative account (username
/
password) and the name of the database, database user, and database user password to initialize the instance
.

+



+



Once completed, if you have chosen to enable PHP caching as optionally instructed above, add the following directive to {{ic|/usr/share/webapps/owncloud/config/config.php}} or to {{ic|/usr/share/webapps/nextcloud/config/config.php}}:

+



'memcache.local' => '\OC\Memcache\APCu',

+

== Security Hardening ==

== Security Hardening ==

=== Let's Encrypt ===

=== Let's Encrypt ===

==== nginx ====

==== nginx ====



1. Create the cloud configuration {{ic|/etc/nginx/conf.d/cloud-initial.conf}} using [https://github.com/graysky2/configs/blob/master/nginx/nextcloud-initial.conf this initial file] as a template. Substitute the literal "@@FQDN@@" in the template file with the actual [https://en.wikipedia.org/wiki/Fully_qualified_domain_name FQDN] to be used. The certs for the server need to be generated using this unencrypted configuration initially. Follow the steps outlined on [[
Let’s_Encrypt
]] to generate the server encryption certificates.

+

{{Move|Let's Encrypt|A simple example of configuring an 'empty' domain for Let's Encrypt should be created. The example file given is too big and could be far easier.}}

+

1. Create the cloud configuration {{ic|/etc/nginx/conf.d/cloud-initial.conf}} using [https://github.com/graysky2/configs/blob/master/nginx/nextcloud-initial.conf this initial file] as a template. Substitute the literal "@@FQDN@@" in the template file with the actual [https://en.wikipedia.org/wiki/Fully_qualified_domain_name FQDN] to be used. The certs for the server need to be generated using this unencrypted configuration initially. Follow the steps outlined on [[
Let’s Encrypt
]] to generate the server encryption certificates.

2. Upon successfully generating certificates, replace {{ic|/etc/nginx/conf.d/cloud-initial.conf}} (it may be safely renamed so long as it does not end in ".conf" or simply deleted) with a new file, {{ic|/etc/nginx/conf.d/cloud.conf}} using [https://github.com/graysky2/configs/blob/master/nginx/nextcloud.conf this file] as a template.  Again, substitute the literal "@@FQDN@@" in the template file with the actual [https://en.wikipedia.org/wiki/Fully_qualified_domain_name FQDN] to be used. [[Start]] and optionally [[enable]] {{ic|nginx.service}}.

2. Upon successfully generating certificates, replace {{ic|/etc/nginx/conf.d/cloud-initial.conf}} (it may be safely renamed so long as it does not end in ".conf" or simply deleted) with a new file, {{ic|/etc/nginx/conf.d/cloud.conf}} using [https://github.com/graysky2/configs/blob/master/nginx/nextcloud.conf this file] as a template.  Again, substitute the literal "@@FQDN@@" in the template file with the actual [https://en.wikipedia.org/wiki/Fully_qualified_domain_name FQDN] to be used. [[Start]] and optionally [[enable]] {{ic|nginx.service}}.

Line 354:

Line 347:

=== Desktop ===

=== Desktop ===



The official client can be installed with the {{Pkg|owncloud-client}} package. Alternative versions are avaiable in the [[AUR]]: {{AUR|owncloud-client-beta}}{{Broken package link|{{aur-mirror|owncloud-client-beta}}}}, {{AUR|owncloud-client-git}} and {{AUR|owncloud-client-qt5}}{{Broken package link|{{aur-mirror|owncloud-client-qt5}}}}. Its use is described in [http://doc.owncloud.org/server/7.0/user_manual/files/sync.html this page] of the documentation.

+

The official client can be installed with the {{Pkg|owncloud
-client}} or {{aur|nextcloud
-client}} package. Alternative versions are avaiable in the [[AUR]]: {{AUR|owncloud-client-beta}}{{Broken package link|{{aur-mirror|owncloud-client-beta}}}}, {{AUR|owncloud-client-git}} and {{AUR|owncloud-client-qt5}}{{Broken package link|{{aur-mirror|owncloud-client-qt5}}}}. Its use is described in [http://doc.owncloud.org/server/7.0/user_manual/files/sync.html this page] of the documentation.

==== Calendar ====

==== Calendar ====

Line 404:

Line 397:

* if using an Android version below 4.0 and favouring Free/Libre software solutions, give a try to [https://f-droid.org/repository/browse/?fdfilter=caldav&fdid=com.morphoss.acal aCal] for calendar and contacts sync or CalDAV Sync Adapter ([https://f-droid.org/repository/browse/?fdfilter=caldav&fdid=org.gege.caldavsyncadapter F-Droid]) for just calendar sync; if you are willing to use non-libre software, then the [http://doc.owncloud.org/server/7.0/user_manual/pim/contacts.html#synchronizing-with-android recommended solution] is to use [http://dmfs.org/ CardDAV-Sync and CalDAV-Sync].

* if using an Android version below 4.0 and favouring Free/Libre software solutions, give a try to [https://f-droid.org/repository/browse/?fdfilter=caldav&fdid=com.morphoss.acal aCal] for calendar and contacts sync or CalDAV Sync Adapter ([https://f-droid.org/repository/browse/?fdfilter=caldav&fdid=org.gege.caldavsyncadapter F-Droid]) for just calendar sync; if you are willing to use non-libre software, then the [http://doc.owncloud.org/server/7.0/user_manual/pim/contacts.html#synchronizing-with-android recommended solution] is to use [http://dmfs.org/ CardDAV-Sync and CalDAV-Sync].





== Important notes ==





{{Style|These notes should go in their appropriate sections.}}





* When using a subdomain (like cloud.example.net), make sure it is covered by your certificate. Otherwise, connection via the ownCloud client or webdav might fail.





* If you are planning on using ownCloud's [http://owncloud.org/sync-clients/ sync-clients], make sure to have [[ntpd]] installed and running on your ownCloud server, otherwise the sync-clients will fail.





* Add some [[LAMP#TLS/SSL|SSL encryption]] to your connection!



(If adding SSL encryption as above, be sure to edit /etc/httpd/conf/extra/httpd-ssl.conf and change DocumentRoot "/srv/http" to DocumentRoot "/usr/share/webapps/owncloud" )





* More Apps for ownCloud can be found [http://apps.owncloud.com/ here]





* To install an new application, download the zip from the apps store, extract it into  /srv/http/owncloud/apps/.



Afterwards restart httpd:





# systemctl restart httpd





log into your server go to the app sections you should see the new apps in there,





* If you are protecting access to your ownCloud location with HTTP basic auth, the file "status.php" must be excluded from auth and be publicly accessible. [https://github.com/owncloud/mirall/issues/734]

=== SABnzbd ===

=== SABnzbd ===

Line 627:

Line 598:

...</nowiki>}}

...</nowiki>}}



==
= Password not saved =
==

+

==
Tips and tricks
==



If the password are not saved and asked on every startup try to install {{Pkg|gnome-keyring}}, helped under xfce4.

+

=
== Upload and
share
from File Manager
=
==



+

[[
https://github.com/schiesbn/shareLinkCreator
shareLinkCreator]] provides the ability to upload a file to OwnCloud via a supported file manager and receive a link
to the
uploaded
file
which can then be emailed or shared in another way
.



Optional dependencies for gnome-keyring: {{Pkg|libgnome-keyring}}. This worked under {{grp|deepin}}

+



+



== Upload and
Share
from File Manager ==

+



You can use the following script to quickly upload and share files to your ownCloud installation from Thunar (and possibly other filemanagers):
https://github.com/schiesbn/shareLinkCreator

+



You need
to
edit
the file
with the proper configuration settings
.

+



'''Note: password is stored as plain text.'''

+



+



== Tips and tricks ==

+

=== Switch to Cron from AJAX ===

=== Switch to Cron from AJAX ===

Show more