Calibre Web is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing Calibre database.
This software is a fork of library and licensed under the GPL v3 License.
pip install --target vendor -r requirements.txt
. python cps.py
(or nohup python cps.py
- recommended if you want to exit the terminal window)http://localhost:8083
or http://localhost:8083/opds
for the OPDS catalogLocation of Calibre database
to the path of the folder where your Calibre library (metadata.db) lives, push "submit" button
optionally a google drive can be used to host the calibre library (-> Using Google Drive integration)Default admin login: Username: admin Password: admin123
The configuration can be changed as admin in the admin panel under "Configuration"
Server Port: Changes the port calibre-web is listening, changes take effect after pressing submit button
Enable public registration:
Tick to enable public user registration.
Enable anonymous browsing:
Tick to allow not logged in users to browse the catalog, anonymous user permissions can be set as admin ("Guest" user)
Enable uploading: Tick to enable uploading of PDF, epub, FB2. This requires the imagemagick library to be installed.
Enable remote login ("magic link"): Tick to enable remote login, i.e. a link that allows user to log in via a different device.
Python 2.7+
Optionally, to enable on-the-fly conversion from EPUB to MOBI when using the send-to-kindle feature:
Download Amazon's KindleGen tool for your platform and place the binary named as kindlegen
in the vendor
folder.
Additional optional dependencys are necessary to get this work. Please install all optional requirements by executing pip install --target vendor -r optional-requirements.txt
To use google drive integration, you have to use the google developer console to create a new app. https://console.developers.google.com
Once a project has been created, we need to create a client ID and a client secret that will be used to enable the OAuth request with google, and enable the Drive API. To do this, follow the steps below: -
The Drive API should now be setup and ready to use, so we need to integrate it into Calibre Web. This is done as below: -
If your calibre web is using https, it is possible to add a "watch" to the drive. This will inform us if the metadata.db file is updated and allow us to update our calibre library accordingly.
Calibre Web can be run as Docker container. Pre-built Docker images based on Alpine Linux are available in this Docker Hub repository: technosoft2000/calibre-web.
Reverse proxy configuration examples for apache and nginx to use calibre-web:
nginx configuration for a local server listening on port 8080, mapping calibre web to /calibre:
http {
upstream calibre {
server 127.0.0.1:8083;
}
server {
location /calibre-web {
proxy_bind $server_addr;
proxy_pass http://127.0.0.1:8083;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /calibre-web;
}
}
}
Apache 2.4 configuration for a local server listening on port 443, mapping calibre web to /calibre-web:
The following modules have to be activated: headers, proxy, rewrite.
Listen 443
<VirtualHost *:443>
SSLEngine on
SSLProxyEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile "C:\Apache24\conf\ssl\test.crt"
SSLCertificateKeyFile "C:\Apache24\conf\ssl\test.key"
<Location "/calibre-web" >
RequestHeader set X-SCRIPT-NAME /calibre-web
RequestHeader set X-SCHEME https
ProxyPass http://localhost:8083/
ProxyPassReverse http://localhost:8083/
</Location>
</VirtualHost>
Create a file "cps.service" as root in the folder /etc/systemd/system with the following content:
Description=Calibre-web
[Service]
Type=simple
User=[Username]
ExecStart=[path to python] [/PATH/TO/cps.py]
[Install]
WantedBy=multi-user.target
Replace the user and ExecStart with your user and foldernames.
sudo systemctl enable cps.service
enables the service.