Skip to content

Command Line Interface

Ozzie Isaacs edited this page Mar 16, 2022 · 14 revisions

Command line options

Starting the script with -h lists all supported command line options.
Currently several options are supported, which are useful for running multiple instances of Calibre-Web, and other administrative tasks.

-p path allows to specify the location of the settings database
-g path allows to specify the location of the google-drive database
-c path allows to specify the location of SSL certfile, works only in combination with keyfile
-k path allows to specify the location of SSL keyfile, works only in combination with certfile
-v shows the current version info and exits
-i ip-address limits the listening address of the server to the given ip-address
-s user:password changes the password of user to password and ends Calibre-Web
-f activates the filepicker for the Calibre Database in the unconfigured/inital mode *)
-l Allows loading covers from localhost and local network
-d Dry run of updater to check file permissions in advance, exists Calibre-Web afterwards
-r Enable public database reconnect route under /reconnect

Starting Calibre-Web with -k "" -c "", deactivates the ssl-server, it falls back to non-ssl, so you can change the ssl settings.

*) This feature is deactivated by default to keep the directory tree of your server private (for security reasons)

Environmental variables

Calibre-Web supports the following Environmental variables.

CALIBRE_DBPATH allows to set the home directory for calibre-web's settings files (app.db, calibre-web.log, gdrive.db)
CALIBRE_PORT allows to set the default listening port during creation of the settings database. Afterwards the port which is configured in the UI, is used. CALIBRE_RECONNECT enables the reconnect endpoint
CALIBRE_LOCALHOST allows loading covers from localhost and local network
CALIBRE_UNIX_SOCKET allows to run Calibre-Web on a specified unix-socket, needs gevent

FLASK_DEBUG redirects log output to console and sets log level to DEBUG for easier debugging. Creates hashes for static files to make the browser aware of changes