Deploying Calibre-Web on Coolify with Docker Compose
This guide walks you through setting up and running on using . It focuses on building a stable, persistent deployment with proper permissions and fully working upload functionality.
Step 1 — Preparing the Docker Compose File
The first step is to prepare a reliable Docker Compose configuration. This defines the container, environment variables, and how data will be stored persistently.
yamlversion: "3"
services:
calibre-web:
image: linuxserver/calibre-web:latest
container_name: calibre-web
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Istanbul
volumes:
- calibre_library_data:/books
- calibre_config_data:/config
restart: unless-stopped
volumes:
calibre_library_data:
calibre_config_data:
Key points:
PUIDandPGIDensure the container has proper file ownership.TZsets your time zone./booksand/configare stored on named volumes, keeping data safe through container updates or restarts.restart: unless-stoppedensures the service restarts automatically if the server reboots.
Step 2 — Creating the Docker Compose Resource and Preparing for Deployment
- Go to Projects in Coolify and click New Resource.
- Select “Docker Compose Empty” as the resource type. This option expects a Docker Compose file to be provided manually.
- Paste the Docker Compose content from Step 1 into the editor.
- Click Save. A new Docker Compose service is now created for your project, representing the Calibre-Web container.
- In the Services section, locate the “Calibre Web” service and open its Settings page. Register your domain name here.
- Return to the service list. At this point, the service is ready to deploy. Click “Deploy” to start the container.
Step 3 — First Login
Once the container is running, open Calibre-Web in your browser using the domain or IP you configured.
Default login credentials:
- Username:
admin - Password:
admin123
After logging in, immediately change the password in Admin Settings for security purposes.
Step 4 — Initializing the Database
Calibre-Web requires a valid database in the /books directory. If the directory is empty, you’ll see:
“New db location is invalid.”
To create a minimal database:
-
Open the Terminal tab for the Calibre-Web service in Coolify.
-
Navigate to the
/booksdirectory:cd /books -
Download a minimal
metadata.dbfile to initialize the database:curl -LJO https://github.com/janeczku/calibre-web/raw/refs/heads/master/library/metadata.db -
In the Calibre-Web interface, set the database path to:
/books
The application now has the basic database structure it needs to run.
Step 5 — Enabling File Uploads
Uploads are disabled by default. To enable:
- Open Admin Settings → Edit Basic Configuration → Feature Configuration.
- Check Allow Upload and save.
- Go to Manage Users, edit the
adminaccount, and enable Allow upload. - Set an upload directory, e.g.,
/booksor/books/uploads.
At this stage, attempting to upload a book may result in a “readonly database” or “permission denied” error. This occurs because the container still lacks proper write access to the mounted volumes.
→ Continue to Step 6 to fix permissions.
Step 6 — Adjusting Permissions
To fix permission issues:
-
Open the Terminal tab for the Calibre-Web service in Coolify.
-
Navigate to the
/booksand/configdirectories and update ownership to match the container user:chown -R 1000:1000 /books chown -R 1000:1000 /config -
Return to the Coolify service page and restart the container to apply the changes.
After this, Calibre-Web will have full write access. Uploads, database updates, and configuration changes should now work without errors.
Final Notes
Following these steps gives you a Calibre-Web instance that:
- Uses persistent storage so your data survives container restarts.
- Has correct file permissions to prevent “readonly” errors.
- Supports uploading new books through the web interface.
From here, you can enhance your setup by adding HTTPS, scheduling backups, creating additional users, and customizing the interface to match your library preferences.
For any help, feel free to reach out — my contact links are on the home page.
Enjoy your new Calibre-Web deployment on Coolify!