OwnCloud through Lighttpd Entware-NG

1 - Setup Entware-NG from this guide

2 - Install Lighttpd Web Server from this guide

3 - Install necessary packages:

opkg install bzip2 php5-mod-ctype php5-mod-curl php5-mod-dom php5-mod-fileinfo \
php5-mod-gd php5-mod-hash php5-mod-json php5-mod-mysql php5-mod-pdo php5-mod-pdo-sqlite \
php5-mod-session php5-mod-simplexml php5-mod-sqlite3 php5-mod-xml php5-mod-xmlwriter \
php5-mod-zip php5-mod-xmlreader php5-mod-mbstring

4 - Download and install latest version of OwnCloud

cd /opt/share/www
wget https://download.owncloud.org/community/owncloud-9.1.3.tar.bz2 --no-check-certificate
bzip2 -cd owncloud-9.1.3.tar.bz2 | tar -xv
rm ./owncloud-9.1.3.tar.bz2

5 - Modify lighttpd configuration file, just copy/paste all following lines in terminal

cat >> /opt/etc/lighttpd/lighttpd.conf << 'EOF'
$HTTP["url"] =~ "^/owncloud/data/" {
url.access-deny = ("")
$HTTP["url"] =~ "^/owncloud($|/)" {
dir-listing.activate = "disable"

Press Enter

6 - Increase upload max filesize, post max size and limit memory to 32Mb by modifying php configuration file

sed -i "/upload_max_filesize =*/cupload_max_filesize = 512M" "/opt/etc/php.ini"
sed -i "/post_max_size =*/cpost_max_size = 512M" "/opt/etc/php.ini"
sed -i "/memory_limit =*/cmemory_limit = 32M" "/opt/etc/php.ini"

7 - Restart Lighttpd

/opt/etc/init.d/S80lighttpd restart

8 - Now access owncloud through router default ip address and port 81 www.asusrouter.com:81/owncloud


9 - Chose a username & a strong password, then press "Finish Setup"


10 - Access OwnCloud from lanwan or https-lan, https-wan ip address


If you need a professional cloud service, visit www.cloudwards.net and read recommendations

Source SNB

Thanks @ryzhov_al & @zyxmon

  • Version 9.1.3 Dec 13 2016

    [major] UI: File list now works properly with many hidden entries - core/#26518
    [major] Transfer ownership fails in some sharing scenario - core/#26523
    [major] Transfer ownership fails if external storage with user-specified password - core/#26530
    [major] Transfer ownership fails with file shares with invalid permissions - core/#26541
    [major] Transfer ownership must skip trashed shares - core/#26525
    [major] Versions on external storage never expire - core/#24161
    [major] Properly convert public upload OCS params - core/#26691
    [major] Properly load object store apps at install time when required in config - core/#26299
    [major] Fix issue in sharing API that can happen with Galera Cluster - core/#26700
    [major] Cannot delete file in share link from global external storage - core/#25618
    [major] Fix issue where first run wizard made web UI unusable in IE11 - core/#26438
    [major] Cannot upload to federated share when only create/update permission given - core/#26173
    [major] Auth header in new DAV endpoint can break with Windows Webdav - core/#26412
    [minor] Transfer ownership don't bail out on error - core/#26524
    [minor] Don't scan received shares in OCC files scan or background jobs - core/#26590
    [minor] Remove useless warning in log when accessing public shares - core/#25455
    [minor] Fix disappearance of share info when clicking favorite star - core/#26241
    [minor] Don't bother fetching preview images if previews disabled in config.php - core/#26705

  • TeHashX

    Guide updated for v9.0.2

    Version 9.0.2 May 4 2016

    Open sidebar when clicking in the right part of rows in files view - #23381
    user_ldap: Call to a member function setEMailAddress() on a non-object - #23759
    Fatal error in dav app while running cron job - #23496
    Desktop sync fails with big files (OC 8.2.0, client 2.0.2) - #20261
    Wrong image rotation - #21485
    Restrict autoloaded paths to loaded apps (and other enhancements) - #18839
    Exclude autoload_static.php - #23935
    [encryption] Recovery key feature doesn't work when a not default "User Home Folder Naming Rule" is used - #23632
    Federated sharing: volatile edit permission - #24032
    Transfer ownership with encryption break files -> bad signature - #24095
    TextEditor: Checksum not invalidated on file change - #23782
    occ files:scan does not invalidate checksums if file changed on disk. - #23783
    [9.0] handle completely unscanned storages in the background scanner - #23576
    [stable9] Write .htaccess also from CLI - #24136
    Share link: user mail is disappearing after selecting expiration date - #22947
    Folder size not propagated when uploading as share recipient with encryption enabled - #24105
    Can create events in contacts_birthday calendar - #24154
    [stable9] Ignore certificate file if it starts with file:// - #24172
    [stable9] remember email when setting expiration date - #24149
    cron.php does not exit, consumes RAM - #23621
    Cron gives errors on getQuota() on null in apps/files_versions/lib/storage.php on line 691 - #23513
    [9.0] Change the sort order of background jobs to be DESC instead of ASC - #24196
    No "Personal" calendar created for installing user - #24082
    [9.0] dont do optimized size propagation for encrypted files - #24158
    [stable9] on clone Connection, do not take over the existing LDAP resource - #24236
    [stable9] Fix LDAP race conditions - #24242
    Catching undefined exception in versions expire - #24233
    [9.0] Call private cache methods only for OC\Files\Cache\Cache - #24202
    "Deadlock found when trying to get lock" in file locking - #20555
    [stable9] don't get the config for the same mount multiple times - #24259
    Scanner doesn't propagate etags any more when file changed - #24255
    Undefined index: extension at /var/www/owncloud/lib/private/installer.php#272 - #24228
    [stable9] Disable pastezone for jquery.fileupload - #24281
    Can't upgrade to 9.0.1 (daily) in CentOS 6.6 - #24276
    [9.0] error out if a local storage isn't setup correctly - #24289
    [Stable 9] Make ownCloud work again in php 7.0.6 - #24343
    After switching to Postgresql changing any activity checkbox checks all of the boxes - #23761
    Upgrade from o.C. 8.2.X to 9.0.X. Cannot access to oC if and LDAP user that made a share was deleted from the LDAP server. - #24090
    Update sabre/dav to 3.0.9 for windows 10 support - 3rdparty/#269
    Update sabre/dav to 3.0.9 on stable9 - 3rdparty/#270
    Spinning wheel OC 9 - activity/#481
    wrong links in RSS feed - activity/#508
    Announcementcenter is listing only the last 5 announcements - announcementcenter/#67
    Export Addressbook - contacts/#248
    [stable9] Redirect page if not shown in an iframe - files_pdfviewer/#109
    Fix wrong path to lost password template - templateeditor/#43
    3rdparty folder not overwritten on update - updater/#316
    getExtractionBaseDir should be deleted before code signature is verified - updater/#318
    BrokenUpdaterRepair SQL issue - updater/#331
    Wrong app path when optional PCNTL module was not enabled - updater/#335
    integrity-check command shows error after running updater from 9.0.1 stable to daily stable9 - updater/#342
    updater/update.log has to be stored in the data folder - updater/#317
    3rdparty folder not overwritten on update - updater/#316
    getExtractionBaseDir should be deleted before code signature is verified - updater/#318
    Upgrade from 9.0 to 9.1 fails - updater/#336
    Wrong app path when optional PCNTL module was not enabled - updater/#335

  • Zeravlá

    How's the progress for memcache?

    • TeHashX

      Sorry, what progress?

      • Zeravlá

        You said earlier (in a reply for TheOpenSourceTV) that you will try to install memcache in your router.
        I'm interested to install it, for speeding up, OwnCloud.

        • TeHashX

          Ok, I remember now, I will :)

          • TeHashX

            Package memcache or php-memcache is not available in entware repository, request here https://github.com/Entware-ng/Entware-ng/issues

          • TeHashX

            Package php-memcached is available on optware-ng https://www.hqt.ro/owncloud-through-lighttpd-optware-ng/

          • Zdeněk Mašek


            Ive requested php-memcache but still pending decision. Meanwhile Ive found there was recently prepared "redis" which should work (at least with Owncloud) pretty well for entware-ng unfortunately Im not able to work with it. Installed but cannot find port redis is using (ps aw command doesnt work only ps a). But really it is I suppose issue on my end as I don`t know how to work with redis.

          • TeHashX

            Redis is listening on port 6379 but you should ask entware maintainers to add php5-mod-redis package
            ps w | grep redis

            12465 admin 22556 S redis-server

          • Zdeněk Mašek

            Thanks. Will ask

  • TheOpenSourceTV

    Hi, trying to get Owncloud to be able to access my USB HDD at /mnt/Elements but Entware-NG and Owncloud are on a separate USB Flash stick located at /mnt/Linux/entware-ng/share/www/owncloud

    I tried mounting the paths and symlinking the folders like:

    mount /mnt/Elements/Movies /mnt/Linux/entware-ng/share/www/owncloud/data/fran/files/Movies

    and tried symlinking the same folder:

    ln -s /mnt/Elements/Movies /mnt/Linux/entware-ng/share/www/owncloud/data/fran/files/Movies

    When i run this command i can see all my movies showing up so the mount or symlink worked anyway:

    ls /mnt/Linux/entware-ng/share/www/owncloud/data/fran/files/Movies

    Then refreshed the Owncloud page but still the same default folders showing up on the Owncloud page, none of the folders on my other HDD are showing up in Owncloud, any ideas? Does it need to be scanned?

    I noticed there's an app for Owncloud that can mount External Storage but it's not on my list of apps in Owncloud, does it work with this version or has it been removed or something? Can't get hold of it...


    Owncloud looks amazing, feature wise, compared to AiCloud, but i still like the look of AiCloud better... Thanks.

    EDIT: found the External Storage app under "Not Enabled" apps, d'oh... My God this App is amazing! :D

    • TheOpenSourceTV

      Have to say though, Owncloud seems to be much slower than AiCloud for loading folders and streaming stuff, it's going real slow doing both. Am i missing something here? Tried installing various cache scripts but seems even slower now...? AiCloud was so much faster...

      • TeHashX

        I have no ideea, not using OwnCloud or AiCloud, tutorials are just for testing purposes

        • TheOpenSourceTV

          OwnCloud is so slow, what am i doing wrong? During setup it recommends against SQLite:


          Also, it's taking about 46 seconds to load up a folder with only about 20 subdirectories in it, AiCloud takes 3 seconds to load up the same folder so something must need to be optimized somewhere.

          There's also these warnings on the OwnCloud Admin page:


          Security & setup warnings

          You are accessing this site via HTTP. We strongly suggest you configure your server to require using HTTPS instead as described in our security tips.
          Transactional file locking is using the database as locking backend, for best performance it's advised to configure a memcache for locking. See the documentation ↗ for more information.
          No memory cache has been configured. To enhance your performance please configure a memcache if available. Further information can be found in our documentation.
          Please double check the installation guides ↗, and check for any errors or warnings in the log.

          Any suggestions on how to change it to HTTPS and also a memory cache module that works well with Entware-NG?


          • TeHashX

            You should enable https in owncloud menu, then access with https instead of http
            As for memcache, I will try to install on my router and see the best solution but will take some time because I will be out from home for some days.

  • Kris

    Ok, I've formatted and installed from scratch (in this order) :
    - entware-ng - works! (from here https://www.hqt.ro/how-to-install-new-generation-entware/)
    - lighttpd - works ! (from here https://www.hqt.ro/lighttpd-web-server-with-php-support-through-entware-ng/)
    - owncloud - fail - when trying to open myrouter:81/owncloud i got :

    Unable to connect

    Firefox can't establish a connection to the server at

    What is wrong ? How can I debug it?
    My h/w is asus rt-ac68u with merlin's 380.57

    Please help

  • Ada

    OwnCloud through nginx

    I get the error: "Setting locale to en_US.UTF-8/fr_FR.UTF-8/es_ES.UTF-8/de_DE.UTF-8/ru_RU.UTF-8/pt_BR.UTF-8/it_IT.UTF-8/ja_JP.UTF-8/zh_CN.UTF-8 failed
    Please install one of theses locales on your system and restart your webserver."

    What is the solution for server on router?

  • Gene


    I have uploaded some files from ftp to owncloud's data base. But I found out it won't rescan it automatically. I checked on the internet and found some ways like:

    path/of/owncloud/console.php files:scan --all or occ files:scan

    but they won't work. Any ideas?

    Thank You!


To be notified by email when a new tutorial is posted :)

Thanks for Subscribing! I'll keeping you up-to-date with latest tutorials!

Something went wrong, try again...