LinuxCommandLibrary

calibre-server

Serve Calibre library over the network

TLDR

Start a server to distribute e-books. Access at

$ calibre-server
copy

Start server on different port. Access at
$ calibre-server --port [port]
copy

Password protect the server
$ calibre-server --username [username] --password [password]
copy

SYNOPSIS

calibre-server [OPTIONS] [calibre_library_path...]

Example:
calibre-server --port 8080 --username myuser --password mypass --enable-write --daemonize /path/to/my/Calibre/Library

PARAMETERS

--port
    Specifies the network port for the server to listen on. Default is 8080.

--listen-on


    Sets the IP address on which the server will listen. Default is 0.0.0.0 (all interfaces).

--username
    Defines a username for server authentication. Requires --password.

--password
    Defines a password for server authentication. Requires --username.

--enable-auth
    Explicitly enables user authentication for accessing the server.

--enable-https
    Enables HTTPS (SSL/TLS) for secure communication. Requires --ssl-certificate and --ssl-key.

--ssl-certificate
    Path to the SSL certificate file (.pem format) for HTTPS.

--ssl-key
    Path to the SSL private key file (.pem format) for HTTPS.

--daemonize
    Runs the server in the background as a daemon.

--pidfile
    Specifies a file to write the process ID (PID) when daemonized.

--enable-write
    Allows logged-in users to modify the library (e.g., add/remove books). Use with extreme caution.

--url-prefix
    Sets a URL path prefix for the server, useful when using a reverse proxy.

--max-connections
    Limits the maximum number of simultaneous client connections (default 100).

--allowed-ext
    Comma-separated list of allowed file extensions for download (e.g., epub,mobi).

DESCRIPTION

calibre-server is a robust command-line utility designed to host your Calibre e-book libraries as a web server. It provides a convenient way to access, browse, search, and download books from your collection using any web browser or Calibre's dedicated content server client. This tool supports serving multiple libraries simultaneously, offers user authentication for secure access, and can be configured to listen on specific network interfaces and ports. It's an indispensable component for sharing your digital library within a local network or over the internet, dynamically serving metadata, covers, and actual book files. The server also generates an OPDS feed, allowing compatible e-readers and applications to directly discover and download books.

CAVEATS

Running calibre-server exposed to the internet without HTTPS and strong authentication is highly discouraged due to security risks. The --enable-write option grants significant power to logged-in users, allowing them to modify your valuable library; it should be used with extreme caution or avoided for public-facing servers. Ensure the specified port is open in your system's firewall to allow incoming connections.

Performance can be a concern with very large libraries or a high number of concurrent users, potentially consuming significant system resources.

TYPICAL DEPLOYMENT

calibre-server is frequently deployed on home servers, Network Attached Storage (NAS) devices, or virtual private servers (VPS) to provide centralized access to an e-book collection. For internet-facing deployments, it is highly recommended to place calibre-server behind a reverse proxy (such as Nginx or Apache). This setup allows the proxy to handle SSL termination, load balancing, and more robust security features, while calibre-server focuses solely on serving the library content.

MULTIPLE LIBRARIES

By specifying multiple Calibre library paths as arguments to the command (e.g., calibre-server /path/to/libA /path/to/libB), the server can simultaneously serve all of them. Each library will then be accessible via a distinct URL path on the server, typically like /server/libraryA and /server/libraryB.

OPDS SUPPORT

The server automatically provides an OPDS (Open Publication Distribution System) feed. This standard allows many modern e-readers and mobile applications to browse, search, and download books from your Calibre library directly without needing a web browser, offering a seamless integration experience for dedicated e-book devices.

HISTORY

calibre-server is an integral part of the Calibre e-book management suite, which was initially created by Kovid Goyal in 2006. Starting as a tool to convert e-book formats (libprs500), Calibre rapidly evolved into a comprehensive solution for e-book organization, conversion, and consumption. The content server functionality, provided by calibre-server, was introduced to enable remote access to Calibre libraries, making it a pivotal feature for users wishing to share or access their digital collections across various devices and networks. It has been under continuous active development, reflecting the evolving needs of digital book enthusiasts.

SEE ALSO

calibre(1), calibredb(1), calibre-customize(1), nginx(8), apache2(8)

Copied to clipboard