calibre-web
:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
Top Related Projects
Quick Overview
Calibre-web is a web app providing a clean interface for browsing, reading, and downloading eBooks stored in a Calibre database. It allows users to access their Calibre library remotely, offering features like user management, Kindle integration, and OPDS support.
Pros
- Easy to set up and use, with a user-friendly interface
- Supports multiple file formats and integrates well with e-readers
- Offers user management and customizable access levels
- Provides OPDS support for compatibility with various reading apps
Cons
- Requires an existing Calibre database; cannot manage books independently
- Limited editing capabilities compared to the full Calibre application
- May have performance issues with very large libraries
- Occasional sync issues between Calibre-web and the main Calibre database
Getting Started
- Ensure you have Python 3.6+ installed
- Clone the repository:
git clone https://github.com/janeczku/calibre-web.git
- Install dependencies:
pip install -r requirements.txt
- Copy
config.yaml.example
toconfig.yaml
and edit as needed - Run the application:
python cps.py
- Access the web interface at
http://localhost:8083
- Log in with default credentials (admin/admin123) and configure your Calibre database location
Competitor Comparisons
The official source code repository for the calibre ebook manager
Pros of Calibre
- Full-featured desktop application with comprehensive e-book management capabilities
- Robust e-book conversion engine supporting numerous formats
- Extensive plugin ecosystem for customization and extended functionality
Cons of Calibre
- Heavier resource usage due to its desktop nature
- Steeper learning curve for new users due to its extensive feature set
- Less suitable for web-based or server-side deployments
Code Comparison
Calibre (Python):
def convert(input_format, output_format, input_file, output_file, log, opts, notify=None):
from calibre.ebooks.conversion.plumber import Plumber
plumber = Plumber(input_file, output_file, log, opts, input_format, output_format, notify)
plumber.run()
Calibre-Web (Python):
def convert_book_format(book_id, calibrepath, old_book_format, new_book_format, user_id, kindle_mail):
error = None
local_book = db.session.query(db.Books).filter(db.Books.id == book_id).first()
file_path = os.path.join(calibrepath, local_book.path, local_book.data[0].name)
# ... (conversion logic)
Both projects use Python, but Calibre's conversion is more modular and extensible, while Calibre-Web's approach is more focused on web-based functionality and integration with its database.
Media server for comics/mangas/BDs/magazines/eBooks with API, OPDS and Kobo Sync support
Pros of Komga
- Specialized for comic books and manga, with better support for image-based content
- More modern UI with a responsive design for mobile devices
- Built-in OPDS server for easy integration with e-reader apps
Cons of Komga
- Limited to comic and manga formats, not suitable for general ebooks
- Lacks some advanced features like metadata editing and user-contributed content
- Smaller community and fewer extensions compared to Calibre-web
Code Comparison
Komga (Kotlin):
@GetMapping("/{bookId}/pages/{pageNumber}")
fun getBookPage(@PathVariable bookId: String, @PathVariable pageNumber: Int): ResponseEntity<ByteArray> {
val book = bookRepository.findByIdOrNull(bookId) ?: throw ResponseStatusException(HttpStatus.NOT_FOUND)
val page = bookPageRepository.findByBookIdAndPageNumber(bookId, pageNumber) ?: throw ResponseStatusException(HttpStatus.NOT_FOUND)
return ResponseEntity.ok().contentType(MediaType.parseMediaType(page.mediaType)).body(page.content)
}
Calibre-web (Python):
@web.route("/get_cover/<int:book_id>")
@login_required_if_no_ano
def get_cover(book_id):
book = db.session.query(db.Books).filter(db.Books.id == book_id).first()
if book and book.has_cover:
return send_from_directory(config.config_calibre_dir, book.path, as_attachment=True)
else:
abort(404)
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Calibre-Web
Calibre-Web is a web app that offers a clean and intuitive interface for browsing, reading, and downloading eBooks using a valid Calibre database.
Table of Contents (click to expand)
This software is a fork of library and licensed under the GPL v3 License.
Features
- Modern and responsive Bootstrap 3 HTML5 interface
- Full graphical setup
- Comprehensive user management with fine-grained per-user permissions
- Admin interface
- Multilingual user interface supporting 20+ languages (supported languages)
- OPDS feed for eBook reader apps
- Advanced search and filtering options
- Custom book collection (shelves) creation
- eBook metadata editing and deletion support
- Metadata download from various sources (extensible via plugins)
- eBook conversion through Calibre binaries
- eBook download restriction to logged-in users
- Public user registration support
- Send eBooks to E-Readers with a single click
- Sync Kobo devices with your Calibre library
- In-browser eBook reading support for multiple formats
- Upload new books in various formats, including audio formats
- Calibre Custom Columns support
- Content hiding based on categories and Custom Column content per user
- Self-update capability
- "Magic Link" login for easy access on eReaders
- LDAP, Google/GitHub OAuth, and proxy authentication support
Installation
Installation via pip (recommended)
- Create a virtual environment for Calibre-Web to avoid conflicts with existing Python dependencies
- Install Calibre-Web via pip:
pip install calibreweb
(orpip3
depending on your OS/distro) - Install optional features via pip as needed, see this page for details
- Start Calibre-Web by typing
cps
Note: Raspberry Pi OS users may encounter issues during installation. If so, please update pip (./venv/bin/python3 -m pip install --upgrade pip
) and/or install cargo (sudo apt install cargo
) before retrying the installation.
Refer to the Wiki for additional installation examples: manual installation, Linux Mint, Cloud Provider.
Quick Start
- Open your browser and navigate to
http://localhost:8083
orhttp://localhost:8083/opds
for the OPDS catalog - Log in with the default admin credentials
- If you don't have a Calibre database, you can use this database (move it out of the Calibre-Web folder to prevent overwriting during updates)
- Set
Location of Calibre database
to the path of the folder containing your Calibre library (metadata.db) and click "Save" - Optionally, use Google Drive to host your Calibre library by following the Google Drive integration guide
- Configure your Calibre-Web instance via the admin page, referring to the Basic Configuration and UI Configuration guides
Default Admin Login:
- Username: admin
- Password: admin123
Requirements
- Python 3.7+
- Imagemagick for cover extraction from EPUBs (Windows users may need to install Ghostscript for PDF cover extraction)
- Windows users need to install libmagic for 32bit python or libmagic for 64bit python, depending on the python version; The files need to be installed in path (e.g. script folder of your Calibre-Web venv, or in the root folder of Calibre-Web
- Optional: Calibre desktop program for on-the-fly conversion and metadata editing (set "calibre's converter tool" path on the setup page)
- Optional: Kepubify tool for Kobo device support (place the binary in
/opt/kepubify
on Linux orC:\Program Files\kepubify
on Windows)
Docker Images
Pre-built Docker images are available in the following Docker Hub repositories (maintained by the LinuxServer team):
LinuxServer - x64, aarch64
-
GitHub - Optional Calibre layer
Include the environment variable
DOCKER_MODS=linuxserver/mods:universal-calibre
in your Docker run/compose file to add the Calibreebook-convert
binary (x64 only). Omit this variable for a lightweight image.Both the Calibre-Web and Calibre-Mod images are automatically rebuilt on new releases and updates.
- Set "Path to Calibre Binaries" to
/usr/bin
- Set "Path to Unrar" to
/usr/bin/unrar
- Set "Path to Calibre Binaries" to
Contributor Recognition
We would like to thank all the contributors and maintainers of Calibre-Web for their valuable input and dedication to the project. Your contributions are greatly appreciated.
Contact
Join us on Discord
For more information, How To's, and FAQs, please visit the Wiki
Contributing to Calibre-Web
Check out our Contributing Guidelines
Top Related Projects
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot