Guide for installing Owncloud 9 to Synology NAS running DSM 6

OwnCloud in Synology NAS

Owncloud is among the best things the open-source communities have produced. This guide will have detailed instructions for installing Owncloud 9 to Synology NAS device with DSM 6.

Some prewords:

  • At the time of this guide, DSM 6 is release candidate (rc) version
  • This is fresh install – no upgrade from existing owncloud version. If you are planning to do upgrade, please see my other blog post about Owncloud upgrade procedure and the things you should consider when doing the upgrade.
  • DSM 6 allows sudo to other users (root, http) in ssh terminal (with NAS admin password), it just makes many things easier (thanks Synology!)
  • I will be installing owncloud manually, so no synocommunity packages or install procedure is used
  • It is possible to install Redis server and php extension php-redis to your Synology NAS, in order to support file locking in owncloud. Please see my other blog post for installing phpredis into Synology NAS.
  • I’m assuming that you have enabled web station, SSH, installed PHP and Mariadb/phpMyAdmin and know what is Apache – in your Synology NAS. I’m also using scripts to automate permission assignments in SSH terminal sessions.
  • If you haven’t hosted any websites in your NAS earlier, please enable webstation package and test that PHP websites are working in your setup – through WAN 0r LAN, depending what are your plans on owncloud usage.  As minimum requirement use phpinfo() or similar PHP powered web page before jumping into Owncloud installation. This ensures you have your firewalls, web servers, virtual hosts etc. configured correctly.
  • My web root in this example is located in: /volume1/web/
    • If you have it in different location, please modify any scripts or examples given here accordingly.

 

Ok -let’s get started with the installation.

1)  Download the latest stable ZIP file from owncloud.org (https://owncloud.org/install/) and copy extracted Owncloud folder to your Synology web root.

Download Owncloud server files

And here is the folder structure how it should look in ‘/web/owncloud/’:

kuva1c2)  Create empty owncloud data folder outside web folder, as recommended by Owncloud community  (I created it at: /volume1/owncloud/)

Note: If you decide to take this recommendation and setup your Owncloud data folder outside the web folder (makes upgrades, backups etc. easier) –  you have to make some additional configurations to your PHP settings in Synology admin UI. However – these changes are valid only if you want to access your Owncloud through Synology hosts from the WAN side.

There are 2 options to make the change required (otherwise php/Owncloud instance cannot access your data folder outside web folder):

Option a)

Append your PHP open_basedir configuration with the location of your Owncloud data folder (IF outside web folder):  ‘:/volume1/owncloud’

(Note: Do not delete any existing paths, add it to the end of the existing configuration – see screenshot)

Synology Admin UI -> Main Menu -> Web Station -> PHP Settings ->

opendir

If you choose option a – it is highly recommended in Owncloud hardening guide to update path [/dev/urandom] there also, see for the example in the provided screenshot above. Based on my personal experience, I’ve also disabled PHP cache here and I’m using Redis server for Owncloud caching.

OwnCloud uses a RFC 4086 (“Randomness Requirements for Security”) compliant mixer to generate cryptographically secure pseudo-random numbers. The random number generation also tries to request random numbers from /dev/urandom, thus it is highly recommended to configure your setup in such a way that PHP is able to read random data from it.

Option b)

Clear the whole open_basedir input box, and while keeping the customize option still checked, apply changes. This will disable global PHP open_basedir execution restrictions completely. You can still assign any site/host specific open_basedir restrictions using the .user.ini files approach in docroot folders for every host required.

This option b where open_basedir is disabled for Owncloud – is actually the recommended approach by Owncloud documentation if Owncloud is running in 32bit environment.

3)  Assign following permissions to folders for installation purposes. I run it using a script (.sh) file (remember to execute from system root!), with following contents:

Select Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

chown -R http:http /volume1/web/owncloud/
chown -R http:http /volume1/web/owncloud/apps/
chown -R http:http /volume1/web/owncloud/config/
chown -R http:http /volume1/web/owncloud/themes/
chown -R http:http /volume1/owncloud/

chown http:http /volume1/web/owncloud/.htaccess

find /volume1/web/owncloud/ -type f -print0 | xargs -0 chmod 777

find /volume1/web/owncloud/ -type d -print0 | xargs -0 chmod 777
find /volume1/owncloud/ -type d -print0 | xargs -0 chmod 777

chmod 777 /volume1/web/owncloud/.htaccess

And I’m running it in SSH terminal like this (run it as root as it “can be done in DSM 6″ and from root folder in SSH terminal):

Kuva2b

4)  Enable Virtual host in NAS for the new owncloud folder in your web root.

Kuva3

I would highly recommend you choose Apache 2.2 as your webserver for your Owncloud virtual host. Mainly because it works out-of-the-box for most users in Owncloud / Synology NAS setup. Apache 2.4 has been reported not to work in recent comments received from users, and Nginx will require more configuration, especially the re-write rules might prove to be challenging (some users have reported 404 not found error after installation). So just choose Apache…!

5)  Double check that you know your Mariadb/MySQL root password – you will need it during owncloud setup/installation.

6)  Point your Web browser to the newly created Owncloud website/portal – and finalize installation. Please use the web address that you want to use when using Owncloud, so that during installation your domain will be automatically added to allowed domains in Owncloud config.php file. Please give Admin password and give other details.

Kuva47)  Give needed details for installing Owncloud. Highly recommended settings:

1.  That you use MySQL/MariaDB – give database details needed
2. Define your Owncloud DATA folder to be outside the Web folder for Owncloud

Kuva4c8)  After installation the Owncloud web interface should open.

Kuva5If you see the error “There were problems with the code integrity check” – this is most likely because Synology creates @eadir cache folders everywhere. Removing these manually from Owncloud folders will remove the error. In this job you might find this code useful:

Select Code
1
find . -name "@eaDir" -type d -print0 | xargs -0 rm -rf

And here is example on how to use it:

kuva_remove_eadirs
And you have now removed all ‘@eaDir’ folders from owncloud folders. And you should also be able to remove the error by Selecting ‘RESCAN’ on admin page of Owncloud.

kuva_remove_eadirs_check9)  After installation you need to assign more strict folder permissions back for Owncloud folders. Please regard the given script as example only – always validate security permissions for your needs as required – and review related documentation from Owncloud.org for version 9.

I use a script (.sh) file, with following contents:

Select Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

chown -R root:http /volume1/web/owncloud/

chown -R http:http /volume1/web/owncloud/apps/
chown -R http:http /volume1/web/owncloud/config/
chown -R http:http /volume1/web/owncloud/themes/

chown root:http /volume1/web/owncloud/.htaccess
chown root:http /volume1/owncloud/.htaccess

find /volume1/web/owncloud/ -type f -print0 | xargs -0 chmod 0640
find /volume1/owncloud/ -type f -print0 | xargs -0 chmod 0640
find /volume1/web/owncloud/ -type d -print0 | xargs -0 chmod 0750
find /volume1/owncloud/ -type d -print0 | xargs -0 chmod 0750

chmod 0644 /volume1/web/owncloud/.htaccess
chmod 0644 /volume1/owncloud/.htaccess

And I’m running it in SSH terminal like this (run it as root as it “can be done in DSM 6″ and from root folder in SSH terminal):

Setup permissions for use

If you want to be able to edit the ‘max upload size’ section in Owncloud admin area, you might want to consider also having following permissions in place (upload size is overrided in hidden ‘.user.ini’ file in Owncloud root):

Select Code
1
chown http:http /volume1/web/owncloud/.user.ini

This makes the file writable by ‘http’ user, thus editable in Owncloud admin section.

10)  Double check that permissions got assigned correctly. You can also safely remove ‘data’ and ‘@eaDir’ folders inside ‘/web/owncloud/’ – they are not needed inside there if you created data folder outside the web folder as instructed:

Kuva811)  Done – You have successfully installed Owncloud 9 to your Synology NAS.

Owncloud running in Synology NASPlease follow closely Owncloud.org and Owncloud Github for further configuration, setup and any other topical issues. There are million things still to configure in your Owncloud setup including config.php modifications etc. 

Note:  It is possible to install Redis server and php extension php-redis to your Synology NAS, in order to support Redis caching and file locking in owncloud. Please see my other blog post for installing phpredis into Synology NAS  running DSM6 without bootstrapping. Also I have posted a guide on how to configure Owncloud to use system CRON in Synology NAS (DSM 6 RC).

(update 28.3 2016 – cleaned permission scripts and made addition about PHP open_basedir config required if data folder outside Owncloud web folder)

(update 13.6 2016 – Updated Apache as the preferred webserver for the virtual host configuration in Synology NAS. Mainly because Apache works out-of-the-box. Nginx actually requires more configuration – especially the re-write rules may cause headache and 404 not found -errors.)

(update 14.2 2017 – Updated Apache 2.2 as the preferred webserver version for the virtual host configuration in Synology NAS, due to multiple users reporting issues when using Apache 2.4 with latest Owncloud and DSM versions.)

Feedback

Juha Ketola

Juha Ketola

Author is a passionate IT enthusiast and early adopter. Packed with years of experience leading Enterprise level IT development teams within the biggest companies of Technology industry. Watches closely start-ups and new disruptive innovations in order to stay on the cutting edge. Embraces hands-on IT development and IoT.
Juha Ketola
Link to open Linkedin Profile

170 Responses to Guide for installing Owncloud 9 to Synology NAS running DSM 6

  1. Juha KetolaJuha Ketola says:

    Hi,

    What is your Owncloud cache setup in your system – are you following the guidance from Owncloud communities regarding cache configurations? I would propose to go through Owncloud 9 admin documentation in case of such issues. Also your setup with ‘PHP cache’ and ‘PHP openbasedir’ – please follow guidelines.

    I have not faced such issues (at least not yet – so hard to estimate where the issue could be…)
    If you find out something – please let me know here what was the solution.

    Thanks.

    /Juha

  2. Hi,

    what about the “The “Strict-Transport-Security” HTTP header is not configured to at least “15768000” seconds. For enhanced security we recommend enabling HSTS” error? Any ideas how to fix this on DMS 6?

    • Juha KetolaJuha Ketola says:

      Hi,

      Just enable trusted 3rd party CA ssl/tls certificate on your synology and link it to your owncloud virtual host, and then tick ‘HSTS’ in virtual host settings in DSM admin UI for your owncloud host.

      You could read my other post about http -> https re-direct, it has some very useful info and examples in this context for you.

      /Juha

  3. Marina says:

    Thanks a lot for this excellent instruction, it worked out for me 🙂

  4. Marco says:

    Hi,
    i followed guide step to step and added /volume1/owncloud into php open_basedir, but when i try to run the 1st setup, I alway got a permission error on /volume1/ownclod.
    I checked via SSH and user http are the owner of the folder.

    DM6
    Apache 2,2 or NGINX

    Any help would be appreciated

  5. Juha KetolaJuha Ketola says:

    Hi,

    Doublecheck carefully your config with open_basedir and permissions once more.

    Make sure owner is http and folder has 777 permissions. Disable php cache, clear browser caches, re-start web station and try once more.

    It should work IF your browser is running as user http in your system.

    Br,
    Juha

    • Alex says:

      Hi,

      I can’t for the life of me get this specific part to work. I keep getting the “Can’t create or write into the data directory /volume1/owncloud/” error.

      SSH ls -l command shows:
      drwxrwxrwx 1 http http 24 Jan 12 17:43 owncloud

      my open_basedir config definatly has :/volume1/owncloud at the end

      php cachce is disabled

      browser cache is cleared, and tried with chrome and IE

    • Alex says:

      As a quick update, I pressed install on the default settings on the owncloud startup screen (Data folder in /volume1/web/owncloud/data and database of sqllite) just to see what would happen. and it installed.

      However when i go into settings i get the error “/dev/urandom is not readable by PHP which is highly discouraged for security reasons.” I double and triple checked that “:/dev/urandom:/volume1/owncloud” was in the open_basedir customise PHP box in the webserver and it is.

      It looks like that setting is not sticking for some reason.

      Webstation v2.0.0-0100

      Ideas anyone?

    • Alex says:

      Ok well that was a fun few days.

      I created a phpinfo.php file and crtl+f for “open_basedir” and saw that the entry did not have “:/dev/urandom:/volume1/owncloud” at the end. (but when i changed to php7.0 in webstation and refreshed the phpinfo page, it did have it there). However the entry there did have “/etc.defaults:/etc:/usr/syno/synoman” at the begining which wasn’t in the webstation open_basedir box. So i ran this command:

      [code]grep –include=*.ini –exclude-dir=/volume1 -rnw ‘/’ -e “/etc.defaults:/etc:/usr/syno/synoman” [\code\]

      and for me it found that in two files “/usr/local/etc/.php/conf.d/user-settings.ini” and “/usr/local/etc/php56/conf.d/user-settings.ini”. So i manually changed them with nano by appending “:/dev/urandom:/volume1/owncloud” to the end. Restarted the webserver, checked phpinfo, and hey presto, the open_basedir showed the random and volume1 entires. And a refresh on my basic owncloud install (decreibed above) showed the “/dev/urandom is not readable” error went away.

      Deleted the files and database and started from scratch following your directions and it went flawlessly this time.

      TL/DR: Just incase anyone else has this issue, check phpinfo whether your open_basedir modifications stuck, and if not, track down where there pulling from and manually edit that ini file.

  6. Marco says:

    Hi,
    i have restarted the NAS and now works.
    Thanks for answer

  7. Marco says:

    Hi Another question,
    before insalling ownCloud on DS214play, I installed on a Virtual machine to do some test.
    Uploading the same folder, i took 25 minutes on Virtual Machine and more tha one hour on Synology NAS.
    It’s a limitation of the NAS or some configuration could be optimized?

    Thanks

    Marco

  8. Timo says:

    Hi Juha, thanks for your excellent instruction! I installed it the same way, but now i have some trouble with the occ command. Evertime when i run this command i get the following message:

    Select Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    
    root@DiskStation:/volume1/web/owncloud# ./occ dav:create-calendar timo timot
    An unhandled exception has been thrown:
    exception 'Doctrine\DBAL\DBALException' with message 'Failed to connect to the database: An exception occured in driver: could not find driver' in /volume1/web/owncloud/lib/private/db/connection.php:54
    Stack trace:
    #0 /volume1/web/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
    #1 /volume1/web/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
    #2 /volume1/web/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
    #3 /volume1/web/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): Doctrine\DBAL\Connection->getDatabasePlatform()
    #4 /volume1/web/owncloud/lib/private/db/connection.php(137): Doctrine\DBAL\Connection->setTransactionIsolation(2)
    #5 /volume1/web/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
    #6 /volume1/web/owncloud/lib/private/db/connectionfactory.php(118): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
    #7 /volume1/web/owncloud/lib/private/server.php(366): OC\DB\ConnectionFactory->getConnection('mysql', Array)
    #8 /volume1/web/owncloud/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
    #9 /volume1/web/owncloud/lib/private/appframework/utility/simplecontainer.php(102): Pimple\Container->offsetGet('DatabaseConnect...')
    #10 /volume1/web/owncloud/lib/private/servercontainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('DatabaseConnect...')
    #11 /volume1/web/owncloud/lib/private/server.php(886): OC\ServerContainer->query('DatabaseConnect...')
    #12 /volume1/web/owncloud/lib/private/server.php(260): OC\Server->getDatabaseConnection()
    #13 /volume1/web/owncloud/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
    #14 /volume1/web/owncloud/lib/private/appframework/utility/simplecontainer.php(102): Pimple\Container->offsetGet('AppConfig')
    #15 /volume1/web/owncloud/lib/private/servercontainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('AppConfig')
    #16 /volume1/web/owncloud/lib/private/server.php(825): OC\ServerContainer->query('AppConfig')
    #17 /volume1/web/owncloud/lib/private/server.php(411): OC\Server->getAppConfig()
    #18 /volume1/web/owncloud/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
    #19 /volume1/web/owncloud/lib/private/appframework/utility/simplecontainer.php(102): Pimple\Container->offsetGet('AppManager')
    #20 /volume1/web/owncloud/lib/private/servercontainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('AppManager')
    #21 /volume1/web/owncloud/lib/private/server.php(1063): OC\ServerContainer->query('AppManager')
    #22 /volume1/web/owncloud/lib/private/app.php(254): OC\Server->getAppManager()
    #23 /volume1/web/owncloud/lib/private/app.php(103): OC_App::getEnabledApps()
    #24 /volume1/web/owncloud/lib/base.php(577): OC_App::loadApps(Array)
    #25 /volume1/web/owncloud/lib/base.php(1112): OC::init()
    #26 /volume1/web/owncloud/console.php(46): require_once('/volume1/web/ow...')
    #27 /volume1/web/owncloud/occ(11): require_once('/volume1/web/ow...')
    #28 {main}

    Do you have the same problem or any idea?

    • Juha KetolaJuha Ketola says:

      Hi,

      You could have some misconfiguration with your PHP versions between apache web usage vs. CLI php.

      There exists many examples on the web for investigating and solving the mismatch. For example here.

      Good luck.

      /Juha

      • Timo says:

        Thanks a lot!
        I didn’t know about the two php versions (cli / webstation). php cli is missing the pdo_mysql extension.. Your other post about the redis installation helps me to install pdo_mysql extension!
        /T

      • Ben Van Aerde says:

        Where did you copy the pdo_mysql.so file from?
        I found it here:

        Select Code
        1
        2
        
        path:
        /volume1/@appstore/PHP5.6/usr/local/lib/php56/modules/pdo_mysql.so

        and copied it to:
        /usr/lib/php/modules

        I added the extension to /etc/php/php.ini and rebooted the nas.
        But now I’m getting this error:

        Select Code
        1
        2
        
        PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_mysql.so' - 
        /usr/lib/php/modules/pdo_mysql.so: undefined symbol: mysqlnd_allocator in Unknown on line 0
      • Juha KetolaJuha Ketola says:

        Hi Ben,

        I have resolved this particular issue. Please take a look at my new post about upgrading Owncloud in Synology NAS. I think it will provide solution for your issue as well. The solution was actually more simple than I thought. 🙂

        /Juha

      • Juha KetolaJuha Ketola says:

        Hi Timo,

        I have actually resolved this particular issue. Please take a look at my new post about upgrading Owncloud in Synology NAS. The solution was actually more simple than I thought. 🙂

        /Juha

    • Tom says:

      Dear all,

      Juha, thank you for the excellent guide to the owncloud install.

      I am sorry to report I do have the same problem like Timo mentioned on May 8th. (DB connection problem when trying to use OCC from the command line ). I gave the installation a go on a completely fresh synonolgy 1515+ to exclude any errors from previous installations.
      Is there any guide how to solve this? Generally owncloud/ nextcloud works as a web service and files are stored as they are supposed to. Nevertheless the access via OCC does not work.

      I can also report, that nextcloud 9.0.5 works with this guide (produces the same error though)

      Since I am not an expert on these OSs I would gladly take any advice.

      Cheers,

      Tom

      • Juha KetolaJuha Ketola says:

        Hi Tom – could you clarify which occ commands exactly are you trying to execute? And what is the error raised?

        I do not myself utilize occ commands, as I do not see those needed….. Perhaps you could prove me otherwise – and open up why command line execution is needed and useful? Are you executing something CRON or Config.php cannot do?

        /Juha

      • Tom says:

        Hi Juha!

        I basically wanted to rescan (occ files:scan –all) the owncloud data folders for service purposes using the OCC. It was mentioned on some other tutorials/manuals. I just felt I had not completely installed the whole system properly with OCC not working from the command line. And I can really tell if this creates some problem over time.
        The main idea was to access the folder on the synology directly with SMB,AFP to store files there without having to go through Webdav for performance reasons. I was hoping to then rescan the folders and have own cloud rebuild its’ database.

        I got the same error first:

        Select Code
        1
        2
        
        An unhandled exception has been thrown:
        exception ‘Doctrine\DBAL\DBALException’ with message ‘Failed to connect to the database: An exception occured in driver: could not find driver’ in /volume1/web/owncloud/lib/private/db/connection.php:54

        then managed to copy pdo_mysql.so and add it into the config.
        now it gives me:

        Select Code
        1
        2
        
        PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_mysql.so' - /usr/lib/php/modules/pdo_mysql.so: undefined symbol: mysqlnd_allocator in Unknown on line 0
        PHP Warning:  fopen(/volume1/web/nextcloud/config/config.php): failed to open stream: Permission denied in /volume1/web/nextcloud/lib/private/config.php on line 187

        Seems there is more missing. And I wouldn’t know where to look for it. I am not quite sure how to proceed…

        Cheers, Tom

      • Juha KetolaJuha Ketola says:

        Hi Tom!

        I looked into this a bit, and it seems that pdo_mysql is indeed not enabled for command line usage in Synology DSM 6. For web server it is installed and it works, but as we know PHP for command line is separate install with separate conf files etc………

        If somebody from visitors of this blog has enabled pdo_mysql for synology command line –> please do let us know the steps. Otherwise I may have to look at it someday in the future.

        As it seems that there in installation we need to pay attention to the loading order of required extensions (pdo ja pdo_mysql), and also what other extensions are loaded. So there may be non-trivial steps required – as the basic installation tools are not by default available in Synology DSM.

        /Juha

      • Juha KetolaJuha Ketola says:

        Hi Tom,

        I have resolved this particular issue. Please take a look at my new post about upgrading Owncloud in Synology NAS. I think it will provide solution for your issue as well. The solution was actually more simple than I thought. 🙂

        /Juha

  9. Kim says:

    Could you guide me through what your script actually does? The script is not working for me, so maybe I can figure out why if I know this.

    • Juha KetolaJuha Ketola says:

      Hi Kim,

      All it does is change the file and foldership ownership and permissions, respectively for files and folders/directories.

      Chown command is used for modifying the ownerships and chmod command permissions.

      You need to run this script as sudo root, from document root level. Or you can also run the commands individually row by row in prompt. End result is the same. That would also indicate you clearly what is the row causing the issues.

      Hope this helps.

      /Juha

      • Kim says:

        Hi Juha

        Thanks I’ll try. Can the same thing be done in the DSM GUI?

        /Kim

      • Juha KetolaJuha Ketola says:

        Hi Kim,

        Well – I would have to say no, you cannot achieve exactly the same permissions as easily……. It would be lot of manual work, if you would try to do all these from DSM file station view…….

        /Juha

  10. Nathan says:

    “8) After installation the Owncloud web interface should open.”
    firefox give me a error: error 404, file not found.
    What should i do?

    • Juha KetolaJuha Ketola says:

      Hi Nathan,

      So you were able to access the owncloud web page using the external virtual hostname you defined and do the install phase successfully?

      And when you access the same hostname after successful owncloud installation phase – you get a 404 error?

      That indeed sounds very strange…… First working and then not… Can you confirm that is your scenario?

      /Juha

      • Nicolas says:

        Hello Juha,

        Thanks a lot for your tutorial. I have been struggling with the community package since the release of DSM6 and everything I tried did not work.

        I am experiencing the same issue as the one described by Nathan.

        After following your steps and successfully installing Owncloud, when I visit the URL defined in the external virtual hostname, I get a 404 on /index.php/apps/files/

        Any help would be much appreciated.

        Thanks in advance,

        Nicolas

      • Juha KetolaJuha Ketola says:

        Hi Nicolas,

        Did you follow the guide exactly? Any deviation in the steps?

        Was this completely clean install? The virtual host name is new? The Owncloud data folder is completely new? No modifications to .htaccess or .user.ini files delivered and installed during owncloud install? No changes or mods to virtual host config files directly?

        If you put just phpinfo.php file to owncloud folder, give http user permissions to the file, and try to access that file directly – is the php page opening?

        Can you access the owncloud instance directly using local server address?
        Depending on your installation address used, please ensure that this local address is on allowed servers list in owncloud config.php.

        Have you doublechecked the permissions for the files/folders? Database? Have you tried assigning 777 permissions and for everything in owncloud / data folder – any difference in result?

        Do you have some php cache in use, if yes – have tried to disable it? Have you tried to restart your NAS? What is your open_basedir config? Are you running the virtual host for owncloud with nginx or apache?

        Above is few things to check…… Hopefully you will figure out the issue…. There is hundreds of succesful installs with following the guide exactly – so basically you should get it up and running…

        /Juha

      • Juha KetolaJuha Ketola says:

        In case the issue trail is pointing to the re-write rules you have in your web server (this is actually what I suspect….) – there is lot of examples in the web for solving 404 issues caused by re-write rules for Owncloud. Pick the right ones depending on your web server in use – and start trying the different solutions…. You will get it working! 🙂

        /Juha

      • Nicolas says:

        Hello Juha,

        I managed to get it working!
        I noticed, thanks to your last comment, that Nginx was the default choice in the virtual host domain configuration popin. Everything worked as expected when I switched to Apache.

        Many thanks for your time and your kind help.

      • Juha KetolaJuha Ketola says:

        Hi Nicholas,

        Great to hear! Thanks for confirming – appreciated!

        I will actually update the tutorial with mentioning Apache as the preferred choise for webserver, as it seems Nginx requires more effort to get it working correctly. Thanks!

        /Juha

    • Juha KetolaJuha Ketola says:

      Hi Nathan,

      Try changing your webserver to Apache in your DSM Virtual host config. Now assuming you have the default Nginx selected.

      You might have an issue with the re-write rules in your setup. Some other users have reported that changing webserver to Apache fixed this issue completely!

      For reference – please see posts by Nicholas above.

      /Juha

  11. Nicolas says:

    Hello Juha,

    I followed your guide thoroughly and it worked perfectly. Just wanted to thank you.

  12. Doug says:

    Enjoy your articles, have used a few. I use some of the same hardware (synology, zywall, etc). My question is really on this specific one.

    Why would you install owncloud on your synology instead of using Cloud Station? I am not saying one of better than the other just wondering. I use cloud station and it seems to work fine for what I need. Havent really checked out own cloud yet.

    Thanks for the articles.

    Doug

    • Juha KetolaJuha Ketola says:

      Hi Doug,

      There is indeed similarities with these 2 – but the real difference will hit you, when you actually want to enable a file sharing platform for a group of people, or several groups of people, while some of them have admin roles etc. And then setting up the sharing and notification practices for new shared materials. And providing the web portals for internal / external users for viewing or uploading materials.

      Also note the HTML5 video streaming capabiltiies for viewing uploaded *.mp4 videos directly in browser without any extensions or clients!

      You need to try it out!! 🙂

      /Juha



Leave a Reply

css.php