This post is about how I’ve been going about enabling access to my eBook purchases that are managed with Calibre without actually using the built in Calibre Server. All of this is running on Linux, with my eBooks and Calibre Library sitting on a remote Linux File Share.
The reason that I’m not using the Calibre Server to do the distribution is because:
- I actually store all the eBooks and the Calibre database on a Linux file share that is then shared on my network using Samba.
- I use multiple computers to interact with that Calibre database (not at the same time). They are all setup to open the database on the samba share.
- The file share is headless and does not have X installed
So to do this, the first thing I had to do was setup the directory on my file share and then setup samba to share it out to the network. Once that was done, I then mounted the share on my client computer. With that done, when I started Calibre for the first time, I just change the configuration to use the samba share directory. Now whenever I open Calibre, all the eBooks and database files are now stored and shared internally on my file share.
That was great and all, but I also wanted to be able to easily browse the collection inside and outside my network. To do that, I figured the best way is using a web browser. After looking around very quickly, I decided to use a software called, “Calibre PHP Server“, since the file server already had Apache and PHP installed on it. I do have to warn, it’s not the best software out there and the design choices aren’t the best, but it is functional and I was able to get it up and working without having to write it myself.
To get it working with Apache, I created a new sub-domain to put it under, something like books.domain.com. At that point, the configuration for it was very simple.
ServerName books.somedomain.com DocumentRoot "/var/www/books.somedomain.com" <directory "/var/www/books.somedomain.com"> AllowOverride All Allow from All
After that, I just followed the instructions that came with the software for setting it up. I also added the optional section, which restricts who can access the books, so that only my wife and I have access to our library. As I mentioned, the interface isn’t the best, but it is functional. One area that I ran into issues with was the configuration files. The first one was the “$config[‘smarty’]” option, which when you install smarty in Ubuntu, you will use, “$config[‘smarty’] = ‘/usr/share/php/smarty’;” The other issue is with the, “$config[‘smarty_dir’]”. I found that no matter what value you enter into it, it won’t work unless you create an additional directory by hand under it called, “smarty_templates_c”. So for example, if you specify it as “$config[‘smarty_dir’]=’/tmp/smarty'”, then you will then need to create the additional directory as so, “# mkdir /tmp/smarty/smarty_templates_c”.
Now my wife doesn’t have to ask me to put eBooks on her Nook Color anymore, but knows to go to that website when she wants to get one of her books and just download it that way. It will basically work with any browser and shows all the different file contents it contains. In our case, we have some PDF’s and epubs. It works flawlessly.
The next step that I want to take when I have time is to come up with an additional way to use access the library with the source being a OPDS server. There are two pieces of software that I’m currently looking at, but haven’t had time to play around with them to see which way I like best. Until then though, this solution is working good for us both.
0 Comments.