Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Related Tools

Notices

Reply
 
Thread Tools Search this Thread
Old 08-29-2018, 07:31 AM   #1
ohIdon'tknow
Member
ohIdon'tknow began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jan 2015
Location: The People's Republic of... to be honest, now that you ask, it seems to have entirely slipped my mind... oh well!
Device: kobo Aura One, Samsung tablet, Necronomicon - extra evil version
COPS server setup help

Hello everyone,

I'm trying to set up a COPS server and resilio sync on a Raspberry Pi with the aid of Hypriot OS and dockers. With the aim of syncing a calibre library from a PC to the Pi's SD card. Then allowing a relative to access their COPS / calibre library via a Kobo browser.

I've managed to install and test Hypriot OS but I'm not sure what to do next. Which dockers should I pull, and how do you run and manage them?

Is there anyone with a technical background and experience of dockers and COPS who has the time to provide a very basic step-by-step guide to help me (and others) get started? Any help and guidance much appreciated.

Thomas
ohIdon'tknow is offline   Reply With Quote
Old 08-29-2018, 10:03 AM   #2
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 718
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
This one (docker image) should work:

https://hub.docker.com/r/lsioarmhf/cops/

First
Code:
docker pull lsioarmhf/cops
then follow the explanation in the url.
Code:
docker create \
    --name=cops \
    -v <path to data>:/config \
    -v <path to data>:/books \
    -e PGID=<gid> -e PUID=<uid>  \
    -e TZ=<timezone> \
    -p 80:80 \
    lsioarmhf/cops
then
Code:
docker start cops
Success!
mariosipad is offline   Reply With Quote
Advert
Old 08-30-2018, 11:34 AM   #3
ohIdon'tknow
Member
ohIdon'tknow began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jan 2015
Location: The People's Republic of... to be honest, now that you ask, it seems to have entirely slipped my mind... oh well!
Device: kobo Aura One, Samsung tablet, Necronomicon - extra evil version
Thanks for the advice. Though I'm sorry to report that it didn't work. The pull code grabs the docker, but the rest - copy-pasted and entered one line at a time - fails to stick.
ohIdon'tknow is offline   Reply With Quote
Old 08-30-2018, 01:20 PM   #4
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 718
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
1 - anything between <> should be changed to suit you own needs and setup.

2 - everything in the “Code:” blocks (changed for point 1) can be copy/pasted as 1 block (not line by line).
mariosipad is offline   Reply With Quote
Old 08-31-2018, 06:14 AM   #5
ohIdon'tknow
Member
ohIdon'tknow began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jan 2015
Location: The People's Republic of... to be honest, now that you ask, it seems to have entirely slipped my mind... oh well!
Device: kobo Aura One, Samsung tablet, Necronomicon - extra evil version
Wiped everything and started again with the further advice. Cops started this time and is accessible from a web browser. However, I'm greeted by a COPS CONFIGURATION CHECK page which tells me that there's both a database error and that it can't find File /books/metadata.db. Is this just because I'm yet to sync the library or is there something else missing?

I also noted at the bottom of the page that "hosting your Calibre Library in /home is almost impossible due to access rights restriction". Following the advice of another COPS docker developer I placed the library in home/pirate/books/data/library/ and the config in home/pirate/books/data/config/. If this won't work then where would be the best location?

Lastly, it's a pity that there isn't a tiny COPS OS for the Raspberry Pi. Something which bundles COPS and the user's choice of resilio sync, syncthing, nextcloud, dropbox etc. With a simple GUI for the millions like me who struggle with the command line.
ohIdon'tknow is offline   Reply With Quote
Advert
Old 08-31-2018, 07:43 AM   #6
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 718
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
Great! It probably almost works.

1 - indeed, start with syncing your calibre database. Then check again. and post again if there are problems or questions. Or if it works!

2 - problems with /home (and /home/pirate/books/data/library/ is a part of /home) are limited (as far as I know) to Synology.

3 - as far as I know there is no such thing as you wish for. There are to many possible choices to properly maintain such a tool and keep it working with every new update of packages.

4 - don't see the command line as something evil, but as an opportunity to learn! ;-)
mariosipad is offline   Reply With Quote
Old 08-31-2018, 01:17 PM   #7
ohIdon'tknow
Member
ohIdon'tknow began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jan 2015
Location: The People's Republic of... to be honest, now that you ask, it seems to have entirely slipped my mind... oh well!
Device: kobo Aura One, Samsung tablet, Necronomicon - extra evil version
It works! Victory is mine / ours.

Now for the Resilio Sync docker.

If that also works then maybe it'll be a good idea to create a how-to for other Kobo owners.

Thanks very much for your help and your patience.
ohIdon'tknow is offline   Reply With Quote
Old 08-31-2018, 03:24 PM   #8
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 718
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD


Remember that to make downloading epub's from cops to a Kobo ereader work URL rewriting should ve enabled in the cops config (config_local.php) file.
Code:
/*
* use URL rewriting for downloading of ebook in HTML catalog
* See Github wiki for more information
* 1 : enable
* 0 : disable
*/
$config['cops_use_url_rewriting'] = '1';
mariosipad is offline   Reply With Quote
Old 09-01-2018, 08:05 AM   #9
ohIdon'tknow
Member
ohIdon'tknow began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jan 2015
Location: The People's Republic of... to be honest, now that you ask, it seems to have entirely slipped my mind... oh well!
Device: kobo Aura One, Samsung tablet, Necronomicon - extra evil version
Downloading is working just fine now. It would have taken me days-weeks to discover the problem. Thanks for being so thoughtful.

While it's not a big deal, I do have a small problem with the GUI. I can't make the Ignored Categories permanent. When I return to the URL the COPS webpage is back to the default. Is there something else I need to change in the config file or elsewhere?

Also, I'm having a little difficulty with the Resilio Sync docker. I've pulled, created and started the docker but the webpage (http://ipaddress:8888) is missing. No doubt I've made some very basic mistake, but I've no clue where. My attempt at creation below. If it's not too much bother, please could you help me with this final hurdle?

Code:
docker run -d \
  --name=resilio-sync \
  -v /home/pirate/resilio/config/:/config \
  -v /home/pirate/resilio/sync/:/sync \
  -v /home/pirate/resilio/downloads/:/downloads \
  -e PGID=1000 -e PUID=1000  \
  -e UMASK_SET=022 \
  -p 8888:8888 \
  -p 55555:55555 \
  lsioarmhf/resilio-sync
ohIdon'tknow is offline   Reply With Quote
Old 09-01-2018, 06:12 PM   #10
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 718
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
1 - cops gui
if you revisit cops with the same browser (not in private mode) then "ignored categories" should be permanent. Cops sets a cookie?
However there is a setting for that in config_local.php:
Code:
    /*
     * Specify the ignored categories for the home screen and with search
     * Meaning that if you don't want to search in publishers or tags just add them from the list
     * Only accepted values :
     * - author
     * - book
     * - series
     * - tag
     * - publisher
     * - rating
     * - language
     */
    $config ['cops_ignored_categories'] = array();
Never tried it myself.


2 - Resilio-sync docker
I do not see any obvious errot in your setup. Can't help you there.

Did you start the container?
Code:
docker start resilio-sync
You probably did, but .......
mariosipad is offline   Reply With Quote
Old 09-04-2018, 05:30 AM   #11
ohIdon'tknow
Member
ohIdon'tknow began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jan 2015
Location: The People's Republic of... to be honest, now that you ask, it seems to have entirely slipped my mind... oh well!
Device: kobo Aura One, Samsung tablet, Necronomicon - extra evil version
I double-checked to make sure it was running. It was definitely running but nothing was coming out. I thought it might be something to do with permissions so I made everything writeable. Still nothing.

Rather than beating my head against this wall for the next week I'm going to try the Nextcloudpi docker instead. I've had Nextcloudpi running as a standalone os on the pi so I'm hopeful it will work. There's also a NextCloud OPDS app. Though I'm not sure if this works like COPS or if it needs an OPDS reader.

Last edited by ohIdon'tknow; 09-04-2018 at 05:31 AM. Reason: grummer & spilling
ohIdon'tknow is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
COPS : Calibre OPDS PHP Server vlad59 Related Tools 1911 03-04-2024 06:39 AM
Calibre Server Web Reader works only partial on my setup aCIDsLAM Calibre 6 08-24-2017 05:15 AM
Can we setup a DNS server to fake amazon's server and remote apply the jailbreak? zfu Kindle Developer's Corner 9 05-07-2015 10:08 AM
COPS Fons Related Tools 1 11-24-2013 10:21 AM
Headless Calibre Server Setup godzilla8nj Related Tools 4 03-10-2010 01:39 PM


All times are GMT -4. The time now is 07:48 PM.


MobileRead.com is a privately owned, operated and funded community.