Where Does COPS Store Config and Library?
COPS PHP server config files and the Calibre library it serves on Linux.
Last updated
COPS (Calibre OPDS PHP Server) is two things: a small PHP app in web space and your Calibre library wherever you sync it. The app reads metadata.db plus formats and covers read only and serves OPDS and HTML feeds. It never edits the database.
Config is one local PHP file copied from the example: the calibre directory path (ending in a slash, possibly several named libraries), Kindle mail settings and display options. Keep the library outside the web root on any exposed server, and sync it in with Dropbox, Syncthing or Nextcloud rather than uploading through COPS.
Where COPS stores this, by platform
./config_local.php (or config/local.php) plus your Calibre library folder
Copy config_local.php.example to config_local.php and set calibre_directory to the metadata.db folder with trailing slash. Newer forks use config/local.php instead. Diagnose with checkconfig.php when the page blanks.
Frequently asked questions
where should the Calibre library live for COPS
Outside the COPS web directory on any internet facing host, synced in by your preferred tool. Point calibre_directory at the folder holding metadata.db. Inside web root only works with extra web server rules (epub mime types on Nginx).
can COPS edit my Calibre metadata
No, by design. It serves OPDS and HTML from the synced copy and refuses database writes. Edit in desktop Calibre and resync; readers pick up changes on next fetch.
Notice an outdated path? Let us know.