Bookbox Update – Pictures

I did an update to my BookBox project, adding additional storage in the form of a rescued 320 GB harddrive from my old media center computer. This was a simple matter of formatting, copying the ebooks and mounting the new drive on the /books folder that I used in the earlier form of the project.

This project has proved extremely robust, running 24/7 for two years.

20130214_200410 - Labels


Bookbox HTML Bookbox Landing




The BookBox : A localized, portable ebook delivery system using open-source components

Ebooks are becoming an essential part of library services. Most library eBooks are delivered through third party vendors encumbered by DRM and access controls. Open and out of copyright ebooks provide a large library of books and articles that Librarians and information professionals can experiment with and provide to their patrons.

This post shows how librarians can use cast-off technology to create a localized ebook  delivery system to deliver ebooks over a Wifi connection. The system described in this post can be put together with a wide variety of hardware, much of which can be re-purposed from obsolete components. This system can also be powered by battery power to deliver a large number of electronic texts to school rooms, agricultural centers or higher educational institutions even in areas without consistent electrical power.

Components of the system.

  1.  A computer that can run the Debian operating system. Old laptops, old desktops, plug computers and even NAS devices like the PogoPlug can be used as the computing platform.
  2.  A Router capable of running  the DD-WRT open source firmware
  3.  A USB drive or flash memory key ( if computer doesn’t have memory like the PogoPlug)
  4.  (optional) A battery pack
  5.  (optional) An enclosure to hold the system.

For my example build I used a Seagate FreeAgent DockStar as the base computer and a Asus WL – 330GE as the router. My example build fits in a standard metal lunch box, including a battery pack. My example build cost ~$100 US.

Plug the computer into a router with an ethernet cable.

Install Debian on the computer platform. Debian can be downloaded from

In my example build, I used a Seagate DockStar FreeAgent NAS device and installed Debian from the version maintained by Jeff Doozan. His instructions for installing Debian on the Dockstar are found at

If using the DockStar as I did in my example build, David Dart’s guide to creating the ‘PirateBox’ can give you additional valuable advice on mounting partitions on your drive or USB memory key.

Install the Monkey webserver software on your project computer.
The Monkey webserver is an extremely simple webserver with minimal configuration required. You can install monkey using the apt program manager by issuing the command

sudo apt-get install monkey

All of the monkey configuration files are found in conf/ directory.
Open monkey.conf in nano by issuing the command

sudo nano monkey.conf

In monkey.conf, ensure that monkey is listening on port 80, and note the location of the HTTP directory. If necessary, you can change the location of the HTTP directory. This is the location where we’ll be uploading the ebook files.

Save the monkey.conf file.

To test, create an index.html file with ‘Hello World’. Open the IP address that your router has given the computer like this http://%5BIP Address]:[Port Number].

On another computer, use the Calibre software ( ) to create an ebook library from the source of your choice. Calibre is a powerful tool for organizing, editing, creating and distributing eBooks. Sources for your library include the Project Gutenberg books, open access books from the Internet Archive, or a project like TEEAL Using Calibre you can add metadata, download covers and other details from and the Internet Archive.

Once your Calibre library is created, you can use a companion program called Calibre2odps to create a set of static HTML pages.

This set of static HTML pages can be uploaded to any webserver, in any location.

Copy the complete Calibre2odps library over to the HTTP directory of your Debian webserver.

Your webserver can now be plugged into any network connection, and will serve up the complete catalog in HTML and ODPS formats on port 80.

I created a simple index.html landing page pointing to both the catalog.html and catalog.xml files. This is the default landing page.

To create a standalone system, use an old router capable of running the DDWRT open source firmware. You can find a list of compatible routers by visiting

Install DDWRT according to the directions for your particular model. For my project I used the Asus WL330GE because it can be powered by a USB cable.

Once DDWRT is installed, you can change the SSID to something more appropriate, I suggest ‘Bookbox’

Plug the DDWRT router into your computer platform, turn everything on and connect to your ‘Bookbox’ wireless network.

The goal of this setup is to force all traffic to visit index.html when they connect to the network.

Point your browser to to visit the control interface for the router.  Go to Status > LAN and write down the IP address that has been assigned to the computer by the router. This may take a while.

Next, go to Services > Services  and set the DNSMasq and Local DNS buttons to Enable. In the “Additional DNSMasq Options” add the following

address=/#/ (enter the IP address you wrote down)

Click Save.

Go to Services > Hotspot tab and click Enable beside HTTP Redirect.

Enter the following items

HTTP Destination IP: (Your server’s IP Address)

HTTP Destination Port: 80

HTTP Source Network: (the “0” denotes the whole range of IP addresses under this address)

Click Save, then go to the Administration > Management tab and click the Reboot Router button at the bottom of the page. Wait for the router to reboot and enter any address in the address bar of your browser. You should now be redirected to the index.html landing page .

If you connect to the Bookbox wireless network with a ODPS compatible ebook reader you can browse a catalog of ebooks within the ereader.

If this system has been put together with a plug computer, or using one of the systems that David Darts prototyped with his Piratebox systems, you should be able to power the entire system using a consumer laptop external battery pack. The DockStar or Pogoplug systems are particularly easy to power as their extra USB ports can easily provide power to the router over USB. The entire system, when set up using the DockStar and the Asus WL330GE  can be fit into a standard tin lunchbox, including a fairly large battery pack.

I have found that simpler web browsers, such as those found on e-readers actually handle this system better than the more complex Mobile Safari. From the feedback from David Darts project, it looks like Android phones seem to handle this connection quite well.


eBook Distribution – Experiment 2 – Calibre

While sharing a folder via a simple webserver is a bare-bones way of distributing content, much of the work for a clean, well-presented content server for ebooks has already been done.

Kovid Goyle’s Calibre program is the iTunes of eBooks. Calibre can handle just about any ebook format, and can convert that ebook format to any other format with a high degree of accuracy.

Calibre can download some metadata about a book, including the cover and manage multiple copies of an ebook in different formats.

Calibre also comes with a content server that serves up both HTML and ODPS (XML ebook catalog format) versions of the catalog.

The Calibre content server delivers a very attractive interface that is easy to update and maintaing

The advantages

1) Excellent program with automatic news updating

2) Content server solves many security/privacy concerns, open source program minimizes tracking & privacy problems

3)Easy conversion allows future-proof access to library materials

4)Integrates tightly with widely used Stanza iOS ebook reader. Fails gracefully with HTML catalog.


1)Like the previous post, not user friendly unless directly linked from a familiar page

2) Fiendishly difficult to get the latest versions working on Ubuntu flavors of Linux. The PPA’s are usually woefully out of date.

3) Requires a more powerful computer with GUI unless one is very familiar with the command line

eBook Distribution – Experiment 1

I’ve been experimenting with some different methods of distributing ebooks using existing infrastructure. These experiments are localized (thinking of the library as a place where people go) while at the same time using WiFi, networks, computers, web servers and other tools of the internet.

My first bare-bones experiment is using Mongoose

Mongoose is a radically simple webserver. Download the executable, put it in the folder you want to share, run it and you can access it at http://localhost:8080 or at http://%5BcomputerIP%5D:8080.

If you want to run it off of port 80, or add additional functions, you can edit the optional mongoose.conf file

With a small edit of the mongoose.conf file, enabling directory listing, you can serve up a folder over a network, allowing users to download whatever is inside that folder.

Here’s some advantages

1) This is a 2 minute project.You have a folder to share, and a way to share it.

2) This method respects your user’s privacy. With a quick setup like this, you’re not harvesting their usernames, reading preferences or creating advertising profiles.

3) You can set this system up anywhere, using almost any hardware from the last 10 years.



1) It’s ugly. You get a basic directory listing with limited functionality.

2) It violates the concept that most people have of the internet. The URL doesn’t end in .com or another top level domain, and unless you link to it, n0 one will ever know it exists.

3) While the Mongoose webserver is fairly secure, this should be run on a computer isolated from your regular network.  I secured mine by limiting access only to the 192.168.* addresses provided within my test network, it’s also running on a test server outside the regular network I usually work on.

I’ll talk about more attractive methods of serving up eBooks in my next post.