Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:services:nas:owncloud [2020/04/25 16:48] – Added OwnCloud background jobs cron. goncaloapsdocs:guide-user:services:nas:owncloud [2020/04/26 15:13] – links fixed tmomas
Line 1: Line 1:
-====== OwnCloud or NextCloud ======+====== ownCloud or NextCloud ======
  
-Owncloud/Nextcloud is very heavy and requires devices with relatively powerful processors, while it will run well even on weak PC and servers, it is too heavy for low-power devices like a router or a NAS.\\+ownCloud/Nextcloud is very heavy and requires devices with relatively powerful processors, while it will run well even on weak PC and servers, it is too heavy for low-power devices like a router or a NAS.\\
  
 It's recommended to have at least a dualcore ARMv7 processor if you are not running OpenWrt on PC/server hardware. It's recommended to have at least a dualcore ARMv7 processor if you are not running OpenWrt on PC/server hardware.
  
-I've installed OwnCloud on an TP-Link [[toh/tp-link/tl-wr2543nd|TL-WR2543ND]], using lighttpd and sorry, it's dead slow! :-(+I've installed ownCloud on an TP-Link [[toh:tp-link:tl-wr2543nd|TL-WR2543ND]], using lighttpd and sorry, it's dead slow! :-(
  
  --- //unknown//  --- //unknown//
  
-I've also installed it on a more powerful TP_Link [[toh/tp-link/tl-wdr3500|TL-WDR3500]] but it's still very slow, 4-5 secs per page...+I've also installed it on a more powerful TP_Link [[toh:tp-link:tl-wdr3500|TL-WDR3500]] but it's still very slow, 4-5 secs per page...
  
  --- //motherjoker 2014/06/05 15:41//  --- //motherjoker 2014/06/05 15:41//
Line 46: Line 46:
 ===== Install & configure webserver ===== ===== Install & configure webserver =====
  
-OwnCloud can't be installed on uhttpd (default web server on OpenWRT). You need to install and configure lighttpd.+ownCloud can't be installed on uhttpd (default web server on OpenWrt). You need to install and configure lighttpd.
  
-I had trouble moving Luci from uhttpd to lighttpd so I recommend keeping uhttpd running for Luci on a different port and assign port 80 to lighttpd for OwnCloud.+I had trouble moving Luci from uhttpd to lighttpd so I recommend keeping uhttpd running for Luci on a different port and assign port 80 to lighttpd for ownCloud.
  
 ==== Change uhttpd port ==== ==== Change uhttpd port ====
-Edit /etc/config/uhttpd file and change http port to 81 and https port to 8443:+Edit ''/etc/config/uhttpd'' file and change http port to 81 and https port to 8443:
  
-  config uhttpd main                                   +  config uhttpd main 
-    list listen_http  0.0.0.0:81                                                      +    list listen_http  0.0.0.0:81 
-    list listen_http  [::]:81                                                         +    list listen_http  [::]:81 
-                                                                                                                                         + 
-    list listen_https  0.0.0.0:8443                                                    +    list listen_https  0.0.0.0:8443 
-    list listen_https  [::]:8443 +    list listen_https  [::]:8443
  
 Restart uhhtpd. Restart uhhtpd.
Line 72: Line 72:
   opkg install lighttpd lighttpd-mod-cgi lighttpd-mod-fastcgi lighttpd-mod-access   opkg install lighttpd lighttpd-mod-cgi lighttpd-mod-fastcgi lighttpd-mod-access
  
-Now configure lighttpd for Owncloud. Edit the config-file /etc/lighttpd/lighttpd.conf+Now configure lighttpd for ownCloud. Edit the config-file ''/etc/lighttpd/lighttpd.conf''
  
-Set www-root for OwnCloud+Set www-root for ownCloud
  
  server.document-root = "/www/owncloud"  server.document-root = "/www/owncloud"
Line 89: Line 89:
  )  )
  
-Assign port 80 for the OwnCloud-Server:+Assign port 80 for the ownCloud Server:
  
  server.port = 80  server.port = 80
Line 97: Line 97:
  $HTTP["url"] =~ "^/data/" {  $HTTP["url"] =~ "^/data/" {
  url.access-deny = ("")  url.access-deny = ("")
- + }
  
  $HTTP["url"] =~ "^($|/)" {  $HTTP["url"] =~ "^($|/)" {
Line 107: Line 107:
  /etc/init.d/lighttpd start  /etc/init.d/lighttpd start
  
-Enabled server for next boots:+Enable server for next boots:
  
  /etc/init.d/lighttpd enable  /etc/init.d/lighttpd enable
Line 113: Line 113:
 ===== Install & configure PHP ===== ===== Install & configure PHP =====
 Get the dirty part: php and sqlite. I am not sure if really all of these packages are necessary, but it seems so: Get the dirty part: php and sqlite. I am not sure if really all of these packages are necessary, but it seems so:
- opkg install php7 php7-cgi php7-fastcgi php7-mod-json php7-mod-session php7-mod-zip libsqlite3 zoneinfo-core php7-mod-pdo php7-mod-pdo-sqlite php7-mod-ctype php7-mod-mbstring php7-mod-gd sqlite3-cli php7-mod-sqlite3 php7-mod-curl curl php7-mod-xml php7-mod-simplexml php7-mod-hash php7-mod-dom php7-mod-iconv php7-mod-xmlwriter php7-mod-xmlreader php7-mod-intl+ 
 +  opkg install php7 php7-cgi php7-fastcgi php7-mod-json php7-mod-session php7-mod-zip libsqlite3 zoneinfo-core php7-mod-pdo php7-mod-pdo-sqlite php7-mod-ctype php7-mod-mbstring php7-mod-gd sqlite3-cli php7-mod-sqlite3 php7-mod-curl curl php7-mod-xml php7-mod-simplexml php7-mod-hash php7-mod-dom php7-mod-iconv php7-mod-xmlwriter php7-mod-xmlreader php7-mod-intl
  
 Those packages are also suggested: Those packages are also suggested:
Line 134: Line 135:
 Play around with memory_limit, I reduced the value form 8MB to 4MB ... but maybe 50MB might be better with 64MB RAM. Play around with memory_limit, I reduced the value form 8MB to 4MB ... but maybe 50MB might be better with 64MB RAM.
  
-run php+Run php
  /etc/init.d/php7-fastcgi enable  /etc/init.d/php7-fastcgi enable
  /etc/init.d/php7-fastcgi start  /etc/init.d/php7-fastcgi start
Line 140: Line 142:
 ==== activate PHP in lighttpd.conf ==== ==== activate PHP in lighttpd.conf ====
  
-Uncomment to enable the fastcgi module+Uncomment to enable the fastcgi and access module
  server.modules = (  server.modules = (
  "mod_access",  "mod_access",
Line 172: Line 174:
  
 ===== Get SSL (optional) ===== ===== Get SSL (optional) =====
-Probably you want to run lighttpd with SSL/https to get your traffic crypted. These instructions are taken from [4]. For generating a key you need to install libopenssl and the openssl-utils +Probably you want to run lighttpd with SSL/https to get your traffic crypted. These instructions are taken from [4]. For generating a key you need to install libopenssl and the openssl-util 
- opkg install libopenssl openssl-utils + opkg install libopenssl openssl-util
-(or openssl-util without the 's?)+
  
 Now you can create a folder for your key like this Now you can create a folder for your key like this
Line 193: Line 194:
  /etc/init.d/lighttpd restart  /etc/init.d/lighttpd restart
  
-===== Unleash OwnCloud =====+===== MySQL Installation (Optional) ===== 
 + 
 +ownCloud is installed with SQLite by default. However SQLite is only good for testing and lightweight single user setups. It has no client synchronisation support, so other devices will not be able to synchronise with the data stored in an ownCloud SQLite database. MariaDB is the ownCloud recommended database. 
 + 
 +Install the recommended MySQL/MariaDB database: 
 + 
 +  opkg update 
 +  opkg install mysql-server mariadb-client-extra php7-mod-pdo-mysql 
 +   
 +Configure the database server: 
 + 
 +  sed -i 's,^datadir.*,datadir         = "/srv/mysql",g' /etc/my.cnf 
 +  sed -i 's,^tmpdir.*,tmpdir          = "/tmp",g' /etc/my.cnf 
 +   
 +  mkdir -p /srv/mysql 
 +  mysql_install_db --force 
 +   
 +Start MySQL: 
 + 
 +  /etc/init.d/mysqld start 
 +  /etc/init.d/mysqld enable 
 +   
 +Set password for root user: 
 + 
 +  mysqladmin -u root password 'password' 
 +   
 +Connect to MySQL database: 
 + 
 +  mysql -uroot -p 
 +   
 +Create user for web server and set its password: 
 + 
 +  CREATE USER 'http'@'localhost' IDENTIFIED BY 'password'; 
 +   
 +Create database for ownCloud and set privileges: 
 + 
 +  CREATE DATABASE IF NOT EXISTS owncloud; 
 +  GRANT ALL PRIVILEGES ON owncloud.* TO 'http'@'localhost' IDENTIFIED BY 'password'; 
 +  FLUSH PRIVILEGES; 
 +   
 +For more information, please refer to the documentation: https://doc.owncloud.org/server/10.4/admin_manual/installation/installation_wizard.html#post-installation-steps-label. 
 + 
 +===== Unleash ownCloud =====
  
 Download and unpack the newest revision: Download and unpack the newest revision:
Line 230: Line 273:
 ===== Enable Background Jobs ===== ===== Enable Background Jobs =====
  
-OwnCloud requires background jobs like database cleanup. For best performance, it is recommended to enable background jobs. +ownCloud requires background jobs like database cleanup. For best performance, it is recommended to enable background jobs. 
  
 Enable Cron job: Enable Cron job:
Line 240: Line 283:
 For more information, please refer to the documentation: https://doc.owncloud.com/server/admin_manual/configuration/server/background_jobs_configuration.html. For more information, please refer to the documentation: https://doc.owncloud.com/server/admin_manual/configuration/server/background_jobs_configuration.html.
  
-=====Owncloud on alternative destination =====+===== ownCloud on alternative destination =====
  
-If you don't want to set up a extroot, you can install owncloud on a different location (doc:techref:opkg#mount.point)+If you don't want to set up a extroot, you can install ownCloud on a different location [[docs:guide-user:additional-software:opkg#non-standard_installation_destinations|Opkg Package Manager - Non-standard Installation Destinations]]
  
 Install php on another location, then Install php on another location, then
Line 267: Line 310:
  
   * [0] [[http://downloads.openwrt.org/snapshots/]]   * [0] [[http://downloads.openwrt.org/snapshots/]]
-  * [1] [[doc/howto/usb.essentials]] +  * [1] [[docs:guide-user:storage:usb-installing|Installing and troubleshooting USB Drivers]] 
-  * [2] [[docs:guide-user:storage:usb-drives]]+  * [2] [[docs:guide-user:storage:usb-drives|Using storage devices]]
   * [3] [[http://owncloud.org/support/webserver-notes/]]   * [3] [[http://owncloud.org/support/webserver-notes/]]
   * [4] [[http://www.cyberciti.biz/tips/howto-lighttpd-create-self-signed-ssl-certificates.html]]   * [4] [[http://www.cyberciti.biz/tips/howto-lighttpd-create-self-signed-ssl-certificates.html]]
   * [5] [[http://www.gizfun.com/content/install-owncloud-your-openwrt-router-3-steps]]   * [5] [[http://www.gizfun.com/content/install-owncloud-your-openwrt-router-3-steps]]
  • Last modified: 2022/07/05 11:01
  • by stokito