# Add the following lines into {{ic|/etc/httpd/conf/httpd.conf}} (php5 should have been configured during the LAMP stack setup):

Include /etc/httpd/conf/extra/owncloud.conf

Include /etc/httpd/conf/extra/owncloud.conf

LoadModule php5_module modules/libphp5.so

LoadModule php5_module modules/libphp5.so

Include conf/extra/php5_module.conf

Include conf/extra/php5_module.conf

−

Uncomment extensions in '''/etc/php/php.ini'''

+

Uncomment extensions in {{ic|/etc/php/php.ini}}:

gd.so

gd.so

+

intl.so

+

openssl.so

xmlrpc.so

xmlrpc.so

zip.so

zip.so

iconv.so

iconv.so

−

Depending on which database backend you are going to use uncomment either one of the following extensions in '''/etc/php/php.ini'''

+

Depending on which database backend you are going to use uncomment either one of the following extensions in {{ic|/etc/php/php.ini}}:

sqlite.so

sqlite.so

sqlite3.so

sqlite3.so

pdo_sqlite.so

pdo_sqlite.so

−

OR

+

'''or''':

mysql.so

mysql.so

mysqli.so

mysqli.so

pdo_mysql.so

pdo_mysql.so

−

now [[Daemons#Restarting|restart]] httpd (Apache)

+

Now [[Daemons#Restarting|restart]] httpd (Apache) and open [http://localhost http://localhost] in your browser. You should now be able to create a user account and follow the installation wizard.

−

and open [http://localhost http://localhost] in your browser. You should now be able to create a user account and follow the installation wizard.

== Custom configurations ==

== Custom configurations ==

−

=== Filesize Limitations ===

+

=== Filesize limitations ===

+

With the default configuration ownCloud only allows the upload of filesizes less than 2MB.

With the default configuration ownCloud only allows the upload of filesizes less than 2MB.

−

This can be changed by changing the following line in '''/etc/php/php.ini''' to your liking.

+

This can be changed by changing the following line in {{ic|/etc/php/php.ini}} to your liking.

'''As of version 4.0 this is no longer necessary! The maximum upload size is now set via the ownCloud gui'''

'''As of version 4.0 this is no longer necessary! The maximum upload size is now set via the ownCloud gui'''

upload_max_filesize = 2M

upload_max_filesize = 2M

−

As of version 4.5, upload limits are set in '''/usr/share/webapps/owncloud/.htaccess'''. This won't work if [[LAMP#Using_php5_with_apache2-mpm-worker_and_mod_fcgid|PHP is set up to run as CGI]], so you need to change the limits in '''/etc/php/php.ini'''. You also need to change open_basedir.

+

As of version 4.5, upload limits are set in {{ic|/usr/share/webapps/owncloud/.htaccess}}. This won't work if [[LAMP#Using_php5_with_apache2-mpm-worker_and_mod_fcgid|PHP is set up to run as CGI]], so you need to change the limits in {{ic|/etc/php/php.ini}}. You also need to change open_basedir.

By including the default '''owncloud.conf''' in '''httpd.conf''', owncloud will take control of port 80 and your localhost domain. If you would like to have owncloud run in a subdirectory, then skip the 'Include /etc/httpd/conf/extra/owncloud.conf' line altogether and just use a symbolic link like so:

By including the default '''owncloud.conf''' in '''httpd.conf''', owncloud will take control of port 80 and your localhost domain. If you would like to have owncloud run in a subdirectory, then skip the 'Include /etc/httpd/conf/extra/owncloud.conf' line altogether and just use a symbolic link like so:

−

ln -s /usr/share/webapps/owncloud/ /srv/http/

+

# ln -s /usr/share/webapps/owncloud/ /srv/http/

+

+

In that case, you'll also have to ensure /usr/share/webapps is in the open_basedir line of php.ini, and that per-directory .htaccess files are read by apache.

+

+

Alternatively, you could follow the standard procedure, but comment out the VirtualHost part of the include file, and skip the symlink/basedir/htaccess part.

== Filling ownCloud with data ==

== Filling ownCloud with data ==

−

=== Small Files ===

+

+

=== Small files ===

+

+

==== WebDav ====

+

Always use [[WebDAV]] or the web interface to add new files to your ownCloud. Otherwise they will not show up correctly, as they do not get indexed right.

Always use [[WebDAV]] or the web interface to add new files to your ownCloud. Otherwise they will not show up correctly, as they do not get indexed right.

+

No further configuration is necessary to enable [[WebDAV]] uploads in ownCloud.

−

Consider installing and enabling php-apc to speed up WebDAV.

+

Consider installing and enabling [[php-apc]] to speed up WebDAV.

+

+

==== SABnzbd ====

When using [[SABnzbd]], you might want to set

When using [[SABnzbd]], you might want to set

Line 57:

Line 76:

in your sabnzbd.ini file, because ownCloud will scan the files as soon as they get uploaded, preventing SABnzbd from removing UNPACKING prefixes etc.

in your sabnzbd.ini file, because ownCloud will scan the files as soon as they get uploaded, preventing SABnzbd from removing UNPACKING prefixes etc.

−

=== Big Files ===

+

=== Big files ===

+

WebDAV isn't suitable for big files, because it fills up all the RAM and CPU.

WebDAV isn't suitable for big files, because it fills up all the RAM and CPU.

With the current version, it looks like, there is no good way of copying huge amounts of data to your ownCloud.

With the current version, it looks like, there is no good way of copying huge amounts of data to your ownCloud.

−

Here's a Workaround:

Here's a Workaround:

−

copy the files directly to your ownCloud and do a full re-scan of your database (you could use the [http://apps.owncloud.com/content/show.php?content=151948&forumpage=0&PHPSESSID=37b915160effcc0f37cc761ad2ab88be Re-scan filesystem] add-on for example).

+

Copy the files directly to your ownCloud and do a full re-scan of your database (you could use the [http://apps.owncloud.com/content/show.php?content=151948&forumpage=0&PHPSESSID=37b915160effcc0f37cc761ad2ab88be Re-scan filesystem] add-on for example).

+

But beware that this will not work as easily in the future, when end-to-end encryption gets added to ownCloud (this is a planned feature).

−

But beware that this will not work as easily in the future, when end-to-end encryption gets added to ownCloud (this is a planned feature).

+

== Important notes ==

−

== Important Notes ==

+

* 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.

−

* When using a subdomain (like cloud.example.xxx), 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 [[Network_Time_Protocol_daemon|NTP]] installed and running on your OwnCloud server, otherwise the sync-clients will fail.

+

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

# only allow these php files, I don't want to inadvertently run something else

# only allow these php files, I don't want to inadvertently run something else

php-allowed-ext = /index.php

php-allowed-ext = /index.php

+

php-allowed-ext = /public.php

php-allowed-ext = /remote.php

php-allowed-ext = /remote.php

php-allowed-ext = /cron.php

php-allowed-ext = /cron.php

php-allowed-ext = /status.php

php-allowed-ext = /status.php

php-allowed-ext = /settings/apps.php

php-allowed-ext = /settings/apps.php

+

php-allowed-ext = /core/ajax/update.php

php-allowed-ext = /core/ajax/share.php

php-allowed-ext = /core/ajax/share.php

php-allowed-ext = /core/ajax/requesttoken.php

php-allowed-ext = /core/ajax/requesttoken.php

Line 130:

Line 161:

php-allowed-ext = /settings/ajax/setquota.php

php-allowed-ext = /settings/ajax/setquota.php

php-allowed-ext = /settings/ajax/userlist.php

php-allowed-ext = /settings/ajax/userlist.php

+

php-allowed-ext = /settings/ajax/createuser.php

+

php-allowed-ext = /settings/ajax/removeuser.php

+

php-allowed-ext = /settings/ajax/enableapp.php

php-allowed-ext = /core/ajax/appconfig.php

php-allowed-ext = /core/ajax/appconfig.php

Line 137:

Line 171:

processes = 10

processes = 10

cheaper = 2

cheaper = 2

−

</pre>

+

cron = -1 -1 -1 -1 -1 /usr/bin/curl -H https://localhost/cron.php

+

+

</nowiki>}}

Finally, a simple systemd unit file to start the uwsgi instance can be (this is without using the emperor):

Finally, a simple systemd unit file to start the uwsgi instance can be (this is without using the emperor):

−

<pre>

+

{{bc|<nowiki>

[Unit]

[Unit]

Description=OwnCloud service via uWSGI-PHP

Description=OwnCloud service via uWSGI-PHP

Line 152:

Line 188:

[Install]

[Install]

WantedBy=multi-user.target

WantedBy=multi-user.target

−

</pre>

+

</nowiki>}}

+

+

== Sync Clients ==

+

+

The offical clients can be found in this page : [http://owncloud.org/install/ Sync Clients]

+

Also take notice that while the offical owncloud android app is a payed app on the play store, it is not a payed app on [https://f-droid.org/ F-Droid].

+

+

== Troubleshooting ==

+

+

=== Self-signed certificate not accepted ===

+

+

OwnCloud uses [[Wikipedia:cURL]] and [[Wikipedia:SabreDAV]] to check if [[WebDAV]] is enabled. If you use a SSL/TLS with a self-signed certificate, e.g. as shown in [[LAMP]] and access ownClouds admin panel, you will see the following error message:

+

+

Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.

+

+

In order to circumvent this problem a few solutions are available. One is to turn off the {{Ic|VERYFIPEER}}-parameter in cURL which is strongly discouraged as it will effectively render any encryption useless (see: https://github.com/owncloud/core/issues/1909#issuecomment-14107259).

+

+

A better way is to trust your own certificate. Assuming that you followed the [[LAMP]]-tutorial, execute the following steps:

+

+

Create local directory for non-distribution certificates and copy [[LAMP]]s certificate there. This will prevent {{Ic|ca-certificates}}-updates to overwrite it.

Most probably a certificate issue, recreate it, and don't leave the common name empty or you will see the error again.

+

+

openssl genrsa -out server.key 2048

+

openssl req -new -key server.key -x509 -days 365 -out server.crt

+

+

=== Seeing white page after login ===

+

+

The cause is probably a new app that you installed, to fix that you can either use phpMyAdmin by editing the oc_appconfig table(in the case you got lucky and the table has edit option) or do it by hand with mysql:

Depending on which database backend you are going to use uncomment either one of the following extensions in /etc/php/php.ini:

sqlite.so
sqlite3.so
pdo_sqlite.so

or:

mysql.so
mysqli.so
pdo_mysql.so

Now restart httpd (Apache) and open http://localhost in your browser. You should now be able to create a user account and follow the installation wizard.

Custom configurations

Filesize limitations

With the default configuration ownCloud only allows the upload of filesizes less than 2MB.
This can be changed by changing the following line in /etc/php/php.ini to your liking.

As of version 4.0 this is no longer necessary! The maximum upload size is now set via the ownCloud gui

upload_max_filesize = 2M

As of version 4.5, upload limits are set in /usr/share/webapps/owncloud/.htaccess. This won't work if PHP is set up to run as CGI, so you need to change the limits in /etc/php/php.ini. You also need to change open_basedir.

Running ownCloud in a subdirectory

By including the default owncloud.conf in httpd.conf, owncloud will take control of port 80 and your localhost domain. If you would like to have owncloud run in a subdirectory, then skip the 'Include /etc/httpd/conf/extra/owncloud.conf' line altogether and just use a symbolic link like so:

# ln -s /usr/share/webapps/owncloud/ /srv/http/

In that case, you'll also have to ensure /usr/share/webapps is in the open_basedir line of php.ini, and that per-directory .htaccess files are read by apache.

Alternatively, you could follow the standard procedure, but comment out the VirtualHost part of the include file, and skip the symlink/basedir/htaccess part.

Filling ownCloud with data

Small files

WebDav

Always use WebDAV or the web interface to add new files to your ownCloud. Otherwise they will not show up correctly, as they do not get indexed right.
No further configuration is necessary to enable WebDAV uploads in ownCloud.

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,

Nginx + uwsgi_php alternative

You can avoid the use of Apache, and run owncloud in it's own process by using the wsgi_php application server. uWSGI itself has a wealth of features to limit the resource use, and to harden the security of the application, and by being a separate process it can run under its own user.

Sync Clients

The offical clients can be found in this page : Sync Clients
Also take notice that while the offical owncloud android app is a payed app on the play store, it is not a payed app on F-Droid.

Troubleshooting

Self-signed certificate not accepted

OwnCloud uses Wikipedia:cURL and Wikipedia:SabreDAV to check if WebDAV is enabled. If you use a SSL/TLS with a self-signed certificate, e.g. as shown in LAMP and access ownClouds admin panel, you will see the following error message:

Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.

Seeing white page after login

The cause is probably a new app that you installed, to fix that you can either use phpMyAdmin by editing the oc_appconfig table(in the case you got lucky and the table has edit option) or do it by hand with mysql: