Install Owncloud 10 on DSM 6.1

      11 Comments on Install Owncloud 10 on DSM 6.1

It seems the package Owncloud is not working anymore on DSM 6.1 because it can’t find the mysql binary anymore.. When u choose for uninstall, the DSM service even stops!!

Anyways, this guide got detailed instructions for installing Owncloud 10 to Xpenology/Synology device with DSM 6.1.

Ok -let’s get started with the installation.

0) It’s obvious but enable/install the package Web Station before you begin with this tutorial!

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

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

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

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

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

Also, if php is not enabled, enable php 5.6, 7.0 and all the extensions for php 5.6 and 7.0. Disable the PHP Cache. Just follow the red arrow above in the screenshot.

3)  Assign the following permissions to folders for installation purposes. Remember to execute from system root!  Ssh into your box and run the following commands as root :

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

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

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 / DSM 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 chose 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.

Give needed details for installing Owncloud.

not actual image, i forgot to shoot an screen.

Sidenotes:

If you want your owncloud installation to be available on your hostname like http://diskstation/owncloud instead of your ip address then edit:

/usr/local/etc/apache22/conf/httpd22.conf

and replace

Servername *

with (in my case diskstation)

ServerName diskstation

Save the file and restart apache with the packagemanager or on the command line.

Also edit /volume1/web/owncloud/config/config.php and add your hostname in the trusted_domains array:

'trusted_domains' => 
 array (
 0 => '192.168.1.122','diskstation',
 ),

 

11 thoughts on “Install Owncloud 10 on DSM 6.1

  1. Totoleheros

    If one choose the sqlite option (which I did inadvertently), how can we manage the db (phpmyadmin does not read the sqlite db apparently) on a Synology (Adminer does not work anymore in my hands)? Where are stored the sqlite files on the Synology?

    Reply
  2. Artur Świętonowski

    Hi,
    I have following error when i try create admin account for owncloud. Do you have any sugestions?
    SQLSTATE[HY000] [2002] No such file or directory
    I had check permissions to folder data and it seems be fine.

    Reply
    1. Joel

      I have the same issue and just spent hours researching and trying to get it to work with no luck. I also cannot create a MariaDB user from the command line because Synology is not letting me. Keeps giving me this error ”
      ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)”

      Reply
    2. Matthew

      So like @Artur and @Joel, I struggle with the “SQLSTATE[HY000] [2002] No such file or directory” for hours.
      After a bunch of reading (and error), I found two problems:

      1. In the MariaDB10 app you need ‘Enable TCP/IP Connection’
      As the pop-up tells you, you’ll want to enable the Firewall on your Diskstation.
      Control Panel > Security > Firewall > ON

      2. The ‘stock photo’ that was dropped in above.
      The settings you’ll need are:

      *Create an OwnCloud Admin Account*
      u: [whatever you want, probably: admin]
      p: [whatever you want]

      *Storage & database*
      /volume1/owncloud/data/ [you may need to go and create the ‘data’ directory first]

      *MariaSQL/MariaDB*
      root
      [root MariaDB root password]
      owncloud [you can name this whatever you’d like, but owncloud seems sensible]
      diskstation:3307 [using the examples, above. If your diskstation is named something else, then that goes before the port allocation ]

      Hope that helps others.

      Reply
  3. Canzone

    Hello,
    I know that has been quite a long time since this was published and, first of all, thank you very much for the detailed post. Amazing job.
    I’ve been struggling a lot to make OwnCloud to work in a DSM 6.1.4 (just upgraded from 5.2). Nothing worked.
    After a lot of research, trial and error, this is what is (somehow) working now:
    – Web Station General HTTP backend is Apache 2.2 (did not install 2.4)
    – General PHP is 7.0 (did not install 5.6)
    – There is no way to make things work in /volume1/web. Only in /var/services/web/. I created a link from /volume1/web/owncloud to /var/services/web, but it is far from ideal.
    – Virtual hosts simply don’t work. None was setup. OwnCloud dir is under /var/services/web/ and is working without a virtual server. I believe that this is the most intriguing part.
    – open_basedir had to be done using the option b (blank) you mentioned in your post. All other tries block access to any Web Server. This is a security threat, though. Could not figure out how to fix it.

    If you, or someone reading this, has any hint to share, I will appreciate a lot. As I mentioned, I spent several hours among several days trying to figure this thing out.

    Thanks and best regards,
    Canzone

    Reply
  4. ralf2201

    Hi,

    thank a lot for that very good information. One question is still there. Is it possible
    that the server accept only a https connection?

    Reply
  5. Game Guardian Download for iOS

    Hi there, just became alert to your blog through Google, and
    found that it’s truly informative. I’m gonna watch out for brussels.
    I will be grateful if you continue this in future.

    A lot of people will be benefited from your writing. Cheers!

    Reply

Leave a Reply to Matthew Cancel reply

Your email address will not be published. Required fields are marked *

*