# ![Calibre-Web](<https://daemonless.io/images/logos/calibre-web.svg>) Calibre-Web

[![Build Status](<https://img.shields.io/github/actions/workflow/status/daemonless/calibre-web/build.yaml?style=flat-square&label=Build&color=green>)](<https://github.com/daemonless/calibre-web/actions>) [![Last Commit](<https://img.shields.io/github/last-commit/daemonless/calibre-web?style=flat-square&label=Last+Commit&color=blue>)](<https://github.com/daemonless/calibre-web/commits>) [![OCI Pulls](<https://img.shields.io/docker/pulls/daemonless/calibre-web?style=flat-square&label=OCI+Pulls&color=blue>)](<https://hub.docker.com/r/daemonless/calibre-web>)

Calibre-Web is a web app providing a clean interface for browsing, reading, and downloading eBooks using an existing or new Calibre database.

- [![Calibre-Web screenshot 1](<https://daemonless.io/images/screenshots/calibre-web/main_screen.png>)](</images/screenshots/calibre-web/main_screen.png>)

|  |  |
| --- | --- |
| **Port** | `8083` |
| **Registry** | [`ghcr.io/daemonless/calibre-web`](<https://github.com/daemonless/calibre-web/pkgs/container/calibre-web>) |
| **Daemonless** | [daemonless/calibre-web](<https://github.com/daemonless/calibre-web>) |
| **Source** | [janeczku/calibre-web](<https://github.com/janeczku/calibre-web>) |
| **Website** | [github.com/janeczku/calibre-web](<https://github.com/janeczku/calibre-web>) |

## Initial Setup & Default Login

The Web UI is available at `http://your-ip:8083`.

**Default admin login:** \* **Username:** `admin` \* **Password:** `admin123`

Change the default password immediately after signing in, or set `CALIBRE_ADMIN_PASSWORD` in your environment.

If `/books` is empty on first boot, a clean starter `metadata.db` is created automatically and `/books` is pre-configured as your Calibre library with uploads enabled. If you mount an existing Calibre library containing `metadata.db` at `/books`, it is linked automatically on first boot.

## Resetting a Forgotten Password

`cps` is wrapped with `daemonless-cli` and `CALIBRE_DBPATH=/config` is set in the container environment, so you can reset any user's password directly as the `bsd` user:

```
podman exec -it calibre-web cps -s <user>:<pass>
```

## Included External Binaries

- **Kepubify** (`/usr/local/bin/kepubify`) for EPUB-to-KEPUB conversion and **Unrar** (`/usr/local/bin/unrar`) for CBR comic extraction are installed and pre-configured in `/config/app.db`.

## Migrating from LinuxServer (`lscr.io/linuxserver/calibre-web`)

This image uses the same `/config` and `/books` volume layout as `linuxserver/calibre-web`. Copy your `/config` and `/books` directories to your FreeBSD host; on startup, the init script automatically updates Linux `/usr/bin/kepubify` and `/usr/bin/unrar` paths in `app.db` to `/usr/local/bin`.

The image never changes ownership inside `/books`: the library must be writable by `PUID`/`PGID`. A library carried over from LinuxServer is owned by the `PUID` it ran with; use the same one here, or `chown -R` it once before the first start.

## Prerequisites

Before deploying, ensure your host environment is ready. See the [Quick Start Guide](<https://daemonless.io/guides/quick-start/index.md>) for host setup instructions, including the security model for host vs. container privileges.

## Deployment

**Customize Paths, UID & Ports**

```
services:
  calibre-web:
    image: "ghcr.io/daemonless/calibre-web:latest"
    container_name: calibre-web
    environment:
      - PUID=1000  # User ID for the application process
      - PGID=1000  # Group ID for the application process
      - TZ=UTC  # Timezone for the container
      # - CALIBRE_ADMIN_USER=  # Admin username to update on startup when paired with CALIBRE_ADMIN_PASSWORD (default: admin)
      # - CALIBRE_ADMIN_PASSWORD=  # Admin password to set on startup
      # - CALIBRE_HOST=  # Address the web server listens on (default: 0.0.0.0)
      # - OAUTHLIB_RELAX_TOKEN_SCOPE=  # Set to 1 to allow Google OAuth to work when token scopes change
    volumes:
      - "/containers/calibre-web:/config"
      - "/path/to/books:/books"
    ports:
      - "8083:8083"
    # always (not unless-stopped) so FreeBSD's podman rc.d auto-starts it at boot
    restart: always
```

Save as `compose.yaml`, then run `podman-compose up -d`.

> [!WARNING]
>
> Exposing ports in AppJail means that your service can be reached from remote hosts. If that is not your intention, do not expose the ports and communicate with the service using the jail's IPv4 address or hostname assigned by the virtual network.

```
# .env

DIRECTOR_PROJECT=calibre-web
PUID=1000
PGID=1000
TZ=UTC
```

```
# appjail-director.yml

options:
  - virtualnet: ':<random> default'
  - nat:
services:
  calibre-web:
    name: calibre_web
    options:
      - container: 'args:--pull'
      - expose: '8083:8083 proto:tcp'
    oci:
      user: root
      environment:
        - PUID: !ENV '${PUID}'
        - PGID: !ENV '${PGID}'
        - TZ: !ENV '${TZ}'
    volumes:
      - calibre-web: /config
      - books: /books
volumes:
  calibre-web:
    device: '/containers/calibre-web'
  books:
    device: 'books'
```

```
# Makejail

ARG tag=latest

OPTION container=boot
OPTION overwrite=force
OPTION from=ghcr.io/daemonless/calibre-web:${tag}
```

Save the files above, then run `appjail-director up`.

Install and manage **Calibre-Web** on FreeBSD with [fjord](<https://fjord.daemonless.io>):

```
fjord install calibre-web
```

Or open the **App Store** in the fjord web UI and install **Calibre-Web** from the wizard. New to fjord? See the [Install Guide](<https://fjord.daemonless.io/install/>).

> [!WARNING]
>
> **Experimental**
>
> Bastille's OCI support is experimental. It requires `buildah` and shares the host network stack (`inherit`). Mount volumes with `--volume HOST JAIL`; without it, image-declared volumes are stored under `${bastille_volumesdir}/${jail}`.

```
services:
  calibre-web:
    name: calibre-web
    image: "ghcr.io/daemonless/calibre-web:latest"
    network:
      - mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=UTC
    volumes:
      - "/containers/calibre-web:/config"
      - "/path/to/books:/books"
```

Save as `bastille-compose.yml`, then run `bastille up`.

Open `http://<server>:8083` from another machine (the server's own browser can't use a published port).

## Parameters

### Environment Variables

| Variable | Default | Description |
| --- | --- | --- |
| `PUID` | `1000` | User ID for the application process |
| `PGID` | `1000` | Group ID for the application process |
| `TZ` | `UTC` | Timezone for the container |
| `CALIBRE_ADMIN_USER` | \`\` | Admin username to update on startup when paired with CALIBRE\_ADMIN\_PASSWORD (default: admin) |
| `CALIBRE_ADMIN_PASSWORD` | `<CALIBRE_ADMIN_PASSWORD>` | Admin password to set on startup |
| `CALIBRE_HOST` | \`\` | Address the web server listens on (default: 0.0.0.0) |
| `OAUTHLIB_RELAX_TOKEN_SCOPE` | `<OAUTHLIB_RELAX_TOKEN_SCOPE>` | Set to 1 to allow Google OAuth to work when token scopes change |

### Volumes

| Path | Description |
| --- | --- |
| `/config` | Where Calibre-Web stores its internal database (app.db), cache, and settings |
| `/books` | Where your Calibre library (metadata.db and book folders) is located |

### Ports

| Port | Protocol | Description |
| --- | --- | --- |
| `8083` | TCP | Web UI |

## Version Tags

Multi-arch manifests — resolve automatically to the right image for your platform.

| Tag | Description | Best For |
| :--- | :--- | :--- |
| `pkg` | **FreeBSD Quarterly**. Uses stable, tested packages. | Alternative build. |
| `latest` / `pkg-latest` | **FreeBSD Latest**. Rolling package updates. | Most users — recommended. |

| Tag | Description | Best For |
| :--- | :--- | :--- |
| `pkg-amd64` | **FreeBSD Quarterly**. Uses stable, tested packages. | Alternative build. |
| `latest-amd64` / `pkg-latest-amd64` | **FreeBSD Latest**. Rolling package updates. | Most users — recommended. |

| Tag | Description | Best For |
| :--- | :--- | :--- |
| `pkg-aarch64` | **FreeBSD Quarterly**. Uses stable, tested packages. | Alternative build. |
| `latest-aarch64` / `pkg-latest-aarch64` | **FreeBSD Latest**. Rolling package updates. | Most users — recommended. |

> [!NOTE]
>
> **Implementation Details**
>
> - **Architectures:** amd64, aarch64
> - **User:** `bsd` (UID/GID set via [PUID/PGID](<https://daemonless.io/guides/permissions/index.md>)). Defaults to `1000:1000`.
> - **Base:** Built on `ghcr.io/daemonless/base` (FreeBSD 15.1).

---

Need help? Join our [Discord](<https://discord.gg/Kb9tkhecZT>) community.
