This guide covers deploying Tome using Docker, including configuration, volume management, and production best practices.
Note: Tome requires write access to sync data back to Calibre. You will need to provide an absolute path to your Calibre Library folder. Common Calibre library locations:
- Linux:
~/Calibre Library/metadata.db - macOS:
~/Documents/Calibre Library/metadata.db - Windows:
C:\Users\<username>\Calibre Library\metadata.db
Tome requires two volume mounts for persistent data and Calibre integration:
| Volume Mount | Container Path | Purpose | Required |
|---|---|---|---|
/path/to/storage |
/app/data |
Tome SQLite database, backups, logs | Yes |
/path/to/calibre/library |
/calibre |
Location of your Calibre library | Yes |
Currently, the only way to run Tome is through Docker. If you're unfamiliar with Docker, I suggest option #1.
Install Docker Desktop and create a container using their GUI, as described in this article.
The image is: ghcr.io/masonfox/tome:latest. Fill in the volumes detailed above.
After replacing the host volume references, run this from the command line or terminal:
docker run -d \
--name tome \
-p 3000:3000 \
-v /path/to/storage:/app/data \
-v /path/to/calibre/library:/calibre \
-e PUID=1000 \
-e PGID=1000 \
--restart unless-stopped \
ghcr.io/masonfox/tome:latest
version: '3.8'
services:
tome:
image: ghcr.io/masonfox/tome:latest
container_name: tome
ports:
- "3000:3000"
environment:
- AUTH_PASSWORD=hello # remove to disable auth
# Set PUID/PGID to match your user (run 'id' to find your values)
- PUID=1000 # Change to your UID
- PGID=1000 # Change to your GID
volumes:
# Persist SQLite database
- /path/to/storage:/app/data
# Calibre library
- /path/to/calibre/folder:/calibre
restart: unless-stopped
Access the application at http://localhost:3000. If needed, the PORT value in the .env can be adjusted to change your local port.
| Variable | Default | Description |
|---|---|---|
NODE_ENV |
production |
Runtime environment |
AUTH_PASSWORD |
(none) | Enables authentication when set. Example: helloworld |
CALIBRE_DB_PATH |
(none) | Path to Calibre metadata.db inside container. Recommended: /calibre/metadata.db |
PORT |
3000 |
Application port |
DATABASE_PATH |
/app/data/tome.db |
Path to Tome's SQLite database |
PUID |
1001 |
User ID to run as (for fixing volume permissions) |
PGID |
1001 |
Group ID to run as (for fixing volume permissions) |
Tome supports PUID (User ID) and PGID (Group ID) environment variables to eliminate volume permission issues. This feature allows the container to run with the same user/group IDs as your host system, ensuring seamless file access.
On your host system, run:
idThis will output something like:
uid=1000(username) gid=1000(groupname) groups=1000(groupname),...
Use the uid and gid values for PUID and PGID.
| System | Typical PUID | Typical PGID | Notes |
|---|---|---|---|
| Linux (first user) | 1000 |
1000 |
Most common on Linux machines |
| Docker default | 1001 |
1001 |
Tome's default if not specified |
| Synology | 1026 |
100 |
Check your NAS user settings |
| macOS/Windows + Docker Desktop | N/A | N/A | Less critical due to virtualization |
Docker Compose (recommended):
services:
tome:
image: ghcr.io/masonfox/tome:latest
environment:
- PUID=1000
- PGID=1000Docker CLI:
docker run -d \
-e PUID=1000 \
-e PGID=1000 \
ghcr.io/masonfox/tome:latestTome includes automated backup scripts that work inside the container:
# Create a timestamped backup
docker exec tome npm run db:backup
# List available backups
docker exec tome npm run db:list-backups
# Restore from backup (interactive)
docker exec -it tome npm run db:restoreBackups are stored in data/backups/ inside the container (part of the tome-data volume).
Tome uses Drizzle ORM for database schema management. The migrations run automatically on container startup (before the app starts).
If needed, you can run migrations manually:
docker exec -it tome npm run db:migrateHowever, you're encouraged to run backups before manually running migrations:
docker exec tome npm run db:backupThis is done automatically on container startup.
Recommended Solution: Use PUID/PGID environment variables (see above). This automatically fixes permissions on container startup.
If port 3000 is already in use on your host, remap your container's external port:
Compose:
ports:
- "3001:3000"or via CLI:
-p 3001:3000Verify the mount path and permissions:
# Check if file exists inside container
docker exec tome ls -l /calibre/metadata.db
# Verify environment variable
docker exec tome printenv CALIBRE_DB_PATHFor additional help:
- Check TROUBLESHOOTING.md
- Review DATABASE.md for database operations
- Open an issue on GitHub