Calibre Book Server, and Everything Else

If you like to read, you could do a lot worse than to set up up a library using the Calibre ecosystem. Recently, that's just what I did, and I'd be pretty proud of myself if it wasn't for the fact that it was so darned easy. Well, mostly.

I should preface this by getting some of my prejudices out in the open. If you are happy with the book sellers retaining ownership of the books you pay for, and happy using only the readers they choose to support, then Amazon and Barnes & Noble have some very nice options for you. But I don't. I want to own my books. Forever. And read them on whatever I think is the best reader. That changes the options available.

For library management, Calibre is the 800 lb gorilla. It's highly functional, very flexible, and free. It's not perfect. One guy runs the entire show, and he apparently liked the UIs that came out of the 90's. But there isn't much it doesn't do, and it takes plug-ins for that. Further more, just about anything on the internet concerning ebook management assumes you are using Calibre. If you aren't, you're on your own.

Installing Calibre is as simple as it gets. There are free clients for both Windows and Linux. Download it and follow the wizard. Not much to it. One key thing to note is where you put your library. I don't know why this is, but Calibre does not work with mapped drives. Or, it *might* work, but then, one day, it won't. The developer knows about this and doesn't intend to change it. Maybe it's a feature. For whatever reason, that dictates where you install it, and where you put your books: In the same place.

Once it's up and running, you need some books. If you've already bought some from the major retailers, those are pretty much useless to you, at least in native format. Even if you get them into Calibre, there would be no point to it because you couldn't read them anywhere. They are wrapped in DRM and the only clients that can read them already have access to the books from their parent library.

So, the first step is to remove the DRM. Which is totally against the Terms of Service, blah blah blah. Lifehacker has a good article on how. Note that I do not advocate stealing books. But if you pay as much for an ebook as you would for a paper version, I kinda don't see the moral dilemma of treating it the same way.

A better alternative is to support publishers that do not push DRM. Book sellers like Tor, Smashwords, O'Reilly, and Baen have taken the position that DRM is customer-unfriendly and deserve your consideration.

There are also quite a few options for free books. Many books, particular educational ones, were released free. A few jillion more have (finally) entered the public domain. And some were offered up by their writers and or publishers for publicity or goodwill. So, anything from "C++ Programming" to "Moby Dick" to "On Basilisk Station". You can read for years just off of free libraries.

You will, of course, need a reader. Calibre's native format is ePub, although it can convert from several others, so you'll need something that reads that. Most eBook readers can. The most popular one, among the "open" ecosystems, is probably Aldiko. I used it for years, although I've recently migrated to Moon+. I moved because of some formatting issues I was encountering on some of my books that Moon+ simply handled better. That may not apply to the average user. A more important difference is that Aldiko requires all external "catalogs" to use the "HTTPS" protocol, which can be a pain. More on that later.

At this point, it's fairly straight forward to attach your eReader/tablet to your PC and load books from your Library. Calbre has drivers for most readers and some might even find it easier to simply drag the books they want to the reader hard-drive and import them from that side. But there is another method that is even more convenient.

Calibre comes with a built in OPDS (Open Publication Distribution System) server. This is essentially a web service for books. Starting it up is crazy simple. Click the large "Connect/Share" icon at the top of the application, and then click "Start Content Server". If you haven't set it up before, it may walk you through a wizard, but it's probably easier to just go to the "Preferences" icon. From there, click on "Sharing over the net". You may wish to change the default port if you are already using 8080, or want to be a little more obscure. You'll definitely want to change the default credentials, unless you wish to give your books and bandwidth away for free (there are possible legal implications to that choice). Stop and start the service (buttons conveniently located on the page) to activate your changes.

At this point, your book server will be running on your local network at http://(ip address of your book server):8080. You could leave it there, if you only need this to work on that specific network, but why stop there? You can make it externally available by creating a "pinhole" or port mapping on your home firewall/router for traffic on that port to be directed to that server. Then, a call to http://(your external IP address):8080 would work as well. If you own a domain, use a service like FreeDNS to map it to your external IP address.

Next, you'll need to add your home book server to your reader. With Moon+, you would go to "Net Library" from the home screen, "Add new catalog", and enter the URL (complete with port number) of your library. The first time to you add it, you'll be prompted for credentials, which it will then remember. Aldiko works about the same way, with the additional requirement that your library be running a Secure Server License (SSL), which is possible, but probably more trouble than it's worth.

Finally, it's time to enjoy the fruits of your efforts. Select your new library from within your eReader, browse or search for books you like, read the meta data, and select "download" to add them, wirelessly, to your local library. Voila! you now have access to your entire library from anywhere on the planet. Won't the small number of your friends who would understand any of this be impressed!?!