Install Calibre COPS on PR2100

Hello,

I’m wondering if it’s possible to run Calibre COPS on a WD PR2100 NAS. Instructions and system requirements for installing on a Synology are really not complicated and it’s working great with my DS212+.

Instructions for Synology are here: https://github.com/seblucas/cops/wiki/Howto—Synology

So, basically I need to be able to run a web server with php and apache. Now, is it possible ?


EDIT
I’ve just did it!

  1. Enable ssh
  2. Create a directory called “cops” at /var/www
  3. Download COPS using wget to /var/www/cops and unzip the file
  4. Edit config_local.php file to put the right Calibre Library path on it
  5. Access COPS using NAS_IP_ADDRESS/cops

Thanks for sharing!
I made a WD app based on your instructions so you get persistence on reboot and it is installable via the web GUI. I’ll share the link when it’s fully tested.

It took a few more days but it is ready now.

Download latest version here
Older version

This application will install the latest version of COPS and set the library path to /shares/Public.
You can change this path only with ssh in /var/www/cops/config_local.php (which is a symlink to /shares/Volume_1/Nas_Prog/cops/web/config_local.php).
You may use the following command:

TERM='xterm' nano /shares/Volume_1/Nas_Prog/cops/web/config_local.php

Change the library path, CTRL-O to save, CTRL-X to quit.

Thank, but when I try to install the application there is an error:

Failed to install app

I’m using a PR2100 and the MyCloudPR2100_cops_0.01.bin

Could you please help me on that ?

PS: I had no problem to install PlexPy app (MyCloudPR2100_plexpy_0.01.bin(11252017)) for example.
Firmware version: 2.30.181

Sorry for the failing package. I’ve now released version 0.3 which should work fine.
Apparently the builtin wget is unable to check certificates of https websites…

When you install the package you should be redirected to the “COPS configuration check”.
The error should be “/shares/Public/metadata.db not found” … which means you could either install calibre to the public dir or you could change the path as described above.

Thanks a lot Tfl ! It’s working great!!!

Hi Tfl,
Sorry to bother you again, but I’m having some trouble with COPS again. I can access the COPS interface, see all my catalog, but I’m not able to download any book.
The message is:

Not Found
The requested URL /cops/download/...... was not found on this server.

Could you give me some help, please? Maybe something related to URL rewriting?
Thanks

Finally got around to test this.
I did it both for NFS share (mount ipaddr:/nfs/Public) as for SMB share (using these mount options)
It worked both when using the ‘Public’ share, as with the ‘Ebooks’ share I created for this.

The download url is typically something like http://192.168.x.x/cops/fetch.php?data=3&type=epub&id=3 and it works for me. Maybe backup your metadata.db / books and reinstall?

See https://wdcommunity.com for the latest package (not that I made any changes)

Thanks a lot for putting all this information and making the application available through the WD Community site.

I have installed the MyCloudPR4100_cops_0.03.bin file on my PR4100 but when I go to the configurarion page, the app reports the following:

Check if intl is properly installed and loaded

Please install the php5-intl / php7.0-intl extension and make sure it’s enabled

I am really not sure how to install php5-intl because apt-get does not work from the ssh session. It must be something very obvious because nobody has asked but I would be grateful for any help!

Thanks!

Daniel

I just figured it out. I had not copied the metadata.db file the public folder. When I saw the intl error, I thought I should fix it before copying the files across.

I have just copied the metadata.db and the book files and the “int” warning does not appear anymore and COPS works fine!

I have not idea why the intl error appears if the metadata.db file cannot be found but the main thing is that it works. :slight_smile:

Thanks again for making this possible!

Daniel

The recommended way to use this package:

  1. create a share in the WD web interface, e.g. ebooks.
  2. mount the share on your PC (map network drive) over SMB or NFS (see the WD guides for more info)
  3. setup Calibre with this ebooks share as root directory, it generates metadata.db there
  4. add books in Calibre
  5. edit the library path variable in config_local.php in the Nas_Prog/cops/web directory (see earlier post)
  6. access COPS using NAS_IP_ADDRESS/cops

If you’re lazy, use the Public share and you don’t need to edit the library path (5).

Thanks for this update and for making the package in the WD Community site!

Now that I know that I can ignore that confusing message about php5-intl, this will be my next step: make it work on a non-public share. :slight_smile:

Daniel

Has anyone been able to get HTAccess Password-Protection to work?

I want to be able to use .htaccess to protect my COPS environment with both username/password or known IP’s. However cannot get it to work.

Anyone had any luck?

Hi,
I have an issue with the metadata.db, I have created a shared folder “ebooks” create the metadata.db via Calibre and add some books, I changed the path via ssh in the config_local.php but I have always the message “metadata.db not found”. It is like it is invisible, do I have to change rights to see it?
Thanks

I did nothing and it is working this morning, very weird!
Thanks anyway to Tfl for the WD app and lucouto for instructions

1 Like

Hi WD Cops ! :slightly_smiling_face:
I am very interested in Caliber on my brand new PR2100. I read this topic carefully.
So I downloaded this file MyCloudPR2100_cops_0.04.bin (from wdcommunity.com)
But when I try to install it (on my PR website/application)
I get an error “Application download incomplete. Check the internet connection of your device and try again”
I also tried other .bin file (Docker)

Quid ?

Can you, please, give me a hand ?

For information :
Firmware 5.04.114 (Maybe that’s the problem … too recent ?)

New packages for OS5: Service End for Bintray, JCenter, GoCenter, and ChartCenter | JFrog

1 Like

Thanks for the file !
Installed without error.

But COPS gives me error now, can you again help me or give me a link to read ?

COPS config button show me a web page with these message :

# COPS Configuration Check

## You've been redirected because COPS is not configured properly

#### Database error

## Check if PHP version is correct

#### OK (7.3.19)

## Check if GD is properly installed and loaded

#### OK

## Check if Sqlite is properly installed and loaded

#### OK

## Check if libxml is properly installed and loaded

#### OK

## Check if Json is properly installed and loaded

#### OK

## Check if mbstring is properly installed and loaded

#### OK

## Check if intl is properly installed and loaded

#### Please install the php5-intl / php7.0-intl extension and make sure it's enabled

## Check if Normalizer class is properly installed and loaded

#### Please make sure intl is enabled in your php.ini

## Check if the rendering will be done on client side or server side

#### Client side rendering

## Check if Calibre database path is not an URL

#### OK

## Check if Calibre database file exists and is readable

#### File /shares/Volume_1/COPS/metadata.db not found, Please check

* Value of $config['calibre_directory'] in config_local.php **(Does it end with a '/'?)**
* Value of [open_basedir](http://php.net/manual/en/ini.core.php#ini.open-basedir) in your php.ini
* The access rights of the Calibre Database
* Synology users please read [this](https://github.com/seblucas/cops/wiki/Howto---Synology)
* Note that hosting your Calibre Library in /home is almost impossible due to access rights restriction

and even if a modify the path into the config_local.ini and create a special DIR (with full right 777) and I also tried to create a false metadata.db into this DIR, I’ve got these message

...
## Check if Calibre database file contains at least some of the needed tables

#### Not all Calibre tables were found. Are you sure you're using the correct database.
....

so there is no creation of this metadata.db

And also the phpX-intl trouble me seem to be mandatory

An idea ? Or I’m totally wrong…
Again thank you very much for your support…

Myeah TBH, I didn’t set it up completely, just checked that it installs. I hope to look into this one of these days, but want to focus on some other packages first.

1 Like

Hello, I cannot download the .bin package from this link, it says: ‘Forbidden!’
I need the one for EX2Ultra, could you help me?