Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes every weekday Monday through Friday.
This page was generated by The HPR Robot at

hpr2209 :: Calibre eBook Server

A quick rundown of how to share your ebook Library on your network using calibre-server

<< First, < Previous, , Latest >>

Thumbnail of Jon Kulp
Hosted by Jon Kulp on 2017-01-19 is flagged as Clean and is released under a CC-BY-SA license.
ebooks, home servers, sharing. 3.
The show is available on the Internet Archive at:

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:12:30


You can share your Calibre ebook library by running the calibre-server daemon, either from your desktop machine or on a server that is available on your local network. (Or, if you have it set up that way, it can be outward-facing to the wide world.)

To share your library from the desktop Calibre application, choose Connect/share from the menu at the top of the window, then choose Start Content Server. Make a note of the IP address and port, and then you can use other devices on your network to access the library at that address. Normally I use the "Get Books" function of the Marvin ebook app on my iPad, or else the "Experimental Browser" on my Kindle and download the books directly to the devices. On my Android phone, I use the Chrome browser and then long press on the link to an Epub file, choose to save to device, and then open it using FBreader.

To share the library from your GNU/Linux server, you'll have to install Calibre on the server and then put a copy of your ebook Library on the server as well. To start and stop the server daemon, you need to put a service startup script in the /etc/init.d directory with all of the other system startup scripts. An example is given below—fill in with the appropriate paths and user data for your setup. (See the calibre-server user manual for a full list of options and their descriptions.) When the script is in place and has executable permissions, you start and stop the service as follows (as root):

service calibre-server start|stop|restart

Service Startup Script


USER=<run_as_user>        # run daemon as this user
LOGIN=<end_user_username> # to log into library (optional)
PW=<password>             # to log into library (optional)

start() {
        echo "Starting Calibre server..."
        su -c "calibre-server --with-library=\"$CALIBRE_LIBRARY_PATH\" --username=$LOGIN --password=$PW -p $PORT --pidfile=$PIDFILE --daemonize" & 
        if [ $? -ne 0 ]; then
                echo "Could not start calibre-server."

stop() {
        echo "Stopping Calibre server..."
        if [ -e $PIDFILE ]; then
                read PID < $PIDFILE
                ps aux | grep "$PID" | grep 'calibre-server' > /dev/null
                if [ $RUNNING -eq 0 ]; then
                        kill $PID
                        if [ $? -eq 0 ]; then
                                rm $PIDFILE
                        echo "Could not find a calibre-server process with PID $PID."
                echo "Could not find pidfile: $PIDFILE"

restart() {

status() {
        if [ -e $PIDFILE ]; then
                read PID < $PIDFILE
                echo "calibre-server is running with PID $PID."
                echo "calibre-server is not running."

unknown() {
        echo "Unrecognized command: $1"
        echo "Try one of the following: (start|stop|restart|status)"

case $1 in
        start ) 
        stop )
        restart )
        status )
        * )


  • Calibre ebook Management Software
  • Marvin ebook app for iOS
  • FBreader open-source multi-platform ebook reader.


Subscribe to the comments RSS feed.

Comment #1 posted on 2017-01-21 14:28:56 by dodddummy

I tried this and it works great. I don't remember if it was noted in the show but you need to supply the port number. On my kindle 3g with keyboard, it's hard to read the pages. Had to play around with display settings and reload when the pages got garbled. But it did work. I think I'll probably plug in the 3gs if possible though because it takes me a while to get to the page.

Worked much better on the Kindle dx.

Comment #2 posted on 2017-01-21 18:53:28 by Jonathan Kulp


Whoops, yes, must have port number appended to url. Glad it worked!

Comment #3 posted on 2017-01-22 19:23:43 by dodddummy

I just tried it from one of my other 3gs and it was fine. So I compared the two side by side and noticed that the display on one has a display problem. I didn't notice it while reading books. With that in mind, I've changed my mind and will use this for the 3gs excluding the one with the display defect.

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Anti Spam Question: What does the letter P in HPR stand for?
Are you a spammer?
What is the HOST_ID for the host of this show?
What does HPR mean to you?