[Support] Linuxserver.io - COPS (Calibre OPDS PHP Server)


Recommended Posts

Map /books to the location of your Calibre metadata.db

 

Sorry, I realized I kind of hijacked this thread.  :P  I was actually asking hernandito in regards to the rdp-calibre setup he posted and was referring to the native content server that comes with Calibre.

 

Oh my bad, sorry, carry on...  ;D 

 

Although the whole point of this container is you don't need to bother running the Calibre OPDS server anymore.  So the Calibre RDP container can be stopped when you're not using the webui.

 

I thought I understood this docker, however your line above confuses me.  Do I need to use Calibre RDP along with this Docker or just use this docker for everything?

 

This docker reads your metadata.db which is the Calibre database, regardless of whether Calibre is running or not.  You do need to create the database with Calibre and still add books via Calibre, this is just a very lightweight way of serving the content, far lighter than Calibre running it's OPDS server.

Link to comment

Although the whole point of this container is you don't need to bother running the Calibre OPDS server anymore.  So the Calibre RDP container can be stopped when you're not using the webui.

 

Uhmmm... So the the point is to run Calibre to set up the library then turn it off when not needed and use COPS "All the time"

And it would be nice to have Calibre run in a webui like krusader does instead of messing with VNC. Sadly I don't know how to build a docker container as of yet...

Link to comment

This docker reads your metadata.db which is the Calibre database, regardless of whether Calibre is running or not.  You do need to create the database with Calibre and still add books via Calibre, this is just a very lightweight way of serving the content, far lighter than Calibre running it's OPDS server.

 

This line should be added to the docker description  :P

Link to comment

This docker reads your metadata.db which is the Calibre database, regardless of whether Calibre is running or not.  You do need to create the database with Calibre and still add books via Calibre, this is just a very lightweight way of serving the content, far lighter than Calibre running it's OPDS server.

 

This line should be added to the docker description  :P

 

I think the readme on github makes it pretty clear tbh...

Link to comment

Uhmmm... So the the point is to run Calibre to set up the library then turn it off when not needed and use COPS "All the time"

 

Yes, and you can use this to email mobi books directly to your kindle

 

And it would be nice to have Calibre run in a webui like krusader does instead of messing with VNC. Sadly I don't know how to build a docker container as of yet...

 

You don't need to know how to build a docker container, just use either Aptalca's or Sparklyballs' containers

Link to comment

Map /books to the location of your Calibre metadata.db

 

Sorry, I realized I kind of hijacked this thread.  :P  I was actually asking hernandito in regards to the rdp-calibre setup he posted and was referring to the native content server that comes with Calibre.

 

Oh my bad, sorry, carry on...  ;D 

 

Although the whole point of this container is you don't need to bother running the Calibre OPDS server anymore.  So the Calibre RDP container can be stopped when you're not using the webui.

 

Yea, i hear you.  I'm just anal about making sure everything is set up properly.  You're right though...I guess it doesn't really matter since COPDS is working fine. Thanks! :)

Link to comment

This docker reads your metadata.db which is the Calibre database, regardless of whether Calibre is running or not.  You do need to create the database with Calibre and still add books via Calibre, this is just a very lightweight way of serving the content, far lighter than Calibre running it's OPDS server.

 

This line should be added to the docker description  :P

 

I think the readme on github makes it pretty clear tbh...

 

It wasn't clear to me, which is why I asked the question.  I believe your answer sums up the use of this docker very very well.  I will be now implementing this for sure!

Link to comment

Thanks for making this happen!

 

I've got this up and running just fine with its external port on 8092.

 

I've got kids in the Army and at college, and they want to be able to read books, too. Since they're not at home, how do I set this up for some sort of external access without just opening my server up to whatever little script kiddies are out there lurking?

I know how to poke a hole in the firewall, but how do I secure it?

Is there any provision for username/password anywhere?

If not, does anyone have any suggestions on how to go about making that work?

Link to comment

I can't tell you how to set it up (I'm trying to figure it out myself as we speak), but your best best would be a reverse proxy.

The letsencrypt-nginx container is supposed to be one of the more "secure" options since it has built in certificates and you'd only need to open port 443.

 

As far as seting it up... I'm still working on it myself, so I am no help. Sorry

Link to comment

Just looking at the COPS source code, rather than the dockerfile code.  There is the ability to set users in the app natively.

 

    /*
     * Enable PHP password protection (You can use if htpasswd is not possible for you)
     * If possible prefer htpasswd !
     * array( "username" => "xxx", "password" => "secret") : Enable PHP password protection
     * NULL : Disable PHP password protection (You can still use htpasswd)
     */
    $config['cops_basic_authentication'] = NULL;

 

Edit that chunk and paste it into config_local.php to enable as detailed here.

 

Haven't tested this, and I'll take a look in the next few days at it, as it may require some docker modification, but if anyone gets it working in the meantime let me know so I can save a bit of time.

 

EDIT:

 

Tested this and it works.  So you could then forward the port to the router.  Not the most secure way of doing things but FAR less work than setting up a https encrypted browser and for the purpose of this container it may well be adequate.

 

$config['cops_basic_authentication'] = array('username' => 'chbmb', 'password' => 'sparklyballsisgrumpy');

Link to comment

Just looking at the COPS source code, rather than the dockerfile code.  There is the ability to set users in the app natively.

 

    /*
     * Enable PHP password protection (You can use if htpasswd is not possible for you)
     * If possible prefer htpasswd !
     * array( "username" => "xxx", "password" => "secret") : Enable PHP password protection
     * NULL : Disable PHP password protection (You can still use htpasswd)
     */
    $config['cops_basic_authentication'] = NULL;

 

Edit that chunk and paste it into config_local.php to enable as detailed here.

 

Haven't tested this, and I'll take a look in the next few days at it, as it may require some docker modification, but if anyone gets it working in the meantime let me know so I can save a bit of time.

 

EDIT:

 

Tested this and it works.  So you could then forward the port to the router.  Not the most secure way of doing things but FAR less work than setting up a https encrypted browser and for the purpose of this container it may well be adequate.

 

$config['cops_basic_authentication'] = array('username' => 'chbmb', 'password' => 'sparklyballsisgrumpy');

 

CHBMB to the rescue!!!

Much easier than my method. Speaking of which... Care to create an easy to follow reverse-proxy how-to?  :-* (off topic, I know)

 

Link to comment

I gave up on Nginx let's encrypt. Nginx too hard to configure for my puny brain. I did manage a crazy way to get letsencrypt working on apache. Later on I will post a guide on my wacky way of doing it. Let's encrypt automatically renews your ssl certificates.

 

Look for it soon on the Linux server apache thread.

Link to comment

I gave up on Nginx let's encrypt. Nginx too hard to configure for my puny brain. I did manage a crazy way to get letsencrypt working on apache. Later on I will post a guide on my wacky way of doing it. Let's encrypt automatically renews your ssl certificates.

 

Look for it soon on the Linux server apache thread.

 

I'm playing around with nginx at the moment, trying to reverse proxy this.  Everything else was relatively straightforward apart from this....

Link to comment

I gave up on Nginx let's encrypt. Nginx too hard to configure for my puny brain. I did manage a crazy way to get letsencrypt working on apache. Later on I will post a guide on my wacky way of doing it. Let's encrypt automatically renews your ssl certificates.

 

Look for it soon on the Linux server apache thread.

 

To reverse proxy this with Apache.

 

	RewriteRule ^/books$ /books/ [R]
<Location /books>
	ProxyPass http://192.168.0.1:82
	ProxyPassReverse http://192.168.0.1:82
	AuthUserFile /config/keys/.htpasswd
	AuthType Basic
	AuthName "COPS Library"
	Require valid-user
</Location>

Link to comment

How would I manually shut down the docker via CLI?

 

I've got emhttp hung. I can't get powerdown to power down the machine. diagnostics has been sitting at "Starting diagnostics collection..." since yesterday evening. Shutting down all the dockers by hand and hoping that something breaks loose is my only hope of getting a clean shutdown at this point.

 

I'd hit the power button, but I'm already a drive down and relying on parity as it is.

 

The full saga here http://lime-technology.com/forum/index.php?topic=52710.0 for those interested...

Link to comment

How would I manually shut down the docker via CLI?

 

I've got emhttp hung. I can't get powerdown to power down the machine. diagnostics has been sitting at "Starting diagnostics collection..." since yesterday evening. Shutting down all the dockers by hand and hoping that something breaks loose is my only hope of getting a clean shutdown at this point.

 

I'd hit the power button, but I'm already a drive down and relying on parity as it is.

 

The full saga here http://lime-technology.com/forum/index.php?topic=52710.0 for those interested...

 

Don't worry about shutting down the docker.  Least of your worries, it'll in all likelihood be fine. (the docker that is)

Link to comment

 

I was wondering where you were going with that clip. Maybe when I get the server back up, I'll watch the movie again. ;)

 

Get the list of containers:

 

docker ps

 

Stop a particular container

docker stop nameofcontainer

 

Thanks, I'll give this a shot. When last I checked, I could still get access from the console.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.