-
Notifications
You must be signed in to change notification settings - Fork 125
Calibre RDP and Calibre WEB
docker-rdp-calibre (by aptalca) is an app that runs a calibre instance and makes it accessible in a web browser. We will be using a fork created by cgspeck (https://github.com/cgspeck/docker-rdp-calibre) to provide us with a specific library path and proper permissions with User/Group IDs.
docker-calibre-web (by janeczku) is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing Calibre database.
If you already have Cloudbox_mod, proceed to step 4
-
Download Cloudbox_mod -- clone the repo:
git clone https://github.com/Cloudbox/cloudbox_mod.git ~/cloudbox_mod -
Go to the
cloudbox_modfolder:cd ~/cloudbox_mod
-
If you have a Ansible vault password file, add the location to
ansible.cfg:To edit:
nano ~/cloudbox_mod/ansible.cfgAdd line (with path to your vault password file):
vault_password_file = ~/.ansible_vaultFinal result:
[defaults] inventory = ~/cloudbox/inventories/local callback_whitelist = profile_tasks command_warnings = False retry_files_enabled = False hash_behaviour = merge role_path = ~/cloudbox/roles vault_password_file = ~/.ansible_vault
-
Create the calibre-rdp task in nano:
nano ~/cloudbox_mod/roles/calibre-rdp/tasks/main.yml -
Copy and paste the below role, double checking and editing the following settings as needed:
Subdomain Record
"calibrerdp.{{domain}}"- Default will be accessible via calibrerdp.yourdomain.comTime Zone Locale
TZ: "America/New_York"Automatic Calibre Updates Change the Edge Variable from 0 to 1 and latest version of calibre is installed on restart
EDGE: "1"Content Server If you want to use the Calibre Content Server, expose port 8081 (will access via yourip:8081) by changing the published ports to
published_ports: - "127.0.0.1:8080:8080" - "0.0.0.0:8081:8081"Books Folder Exists at Media/Books - create this prior to running the script. You can either transfer your existing calibre library to Media/Books (the book folders and metadata.db) or start with a new one.
- name: "Setting CloudFlare DNS Record" include_role: name: cloudflare vars: subdomain: calibrerdp - name: Create htpasswd htpasswd: path: "/opt/nginx-proxy/htpasswd/{{item}}.{{domain}}" name: "{{user}}" password: "{{passwd}}" owner: "{{user}}" group: "{{user}}" mode: 0664 with_items: - calibrerdp - name: "Get {{user}} uid" shell: "id -u {{user}}" register: uid - name: "Get {{user}} gid" shell: "id -g {{user}}" register: gid - name: Stop and remove any existing container docker_container: name: calibrerdp state: absent - name: Create calibre directories file: "path={{item}} state=directory mode=0775 owner={{user}} group={{user}}" with_items: - /opt/calibre - name: Create and start container docker_container: name: calibrerdp image: cgspeck/docker-rdp-calibre pull: yes published_ports: - "127.0.0.1:8080:8080" - "127.0.0.1:8081:8081" env: USER_ID: "{{uid.stdout}}" GROUP_ID: "{{gid.stdout}}" TZ: "America/New_York" LIBRARYINTERNALPATH: "/library" EDGE: "0" WIDTH: "1280" HEIGHT: "720" VIRTUAL_HOST: "calibrerdp.{{domain}}" VIRTUAL_PORT: 8080 LETSENCRYPT_HOST: "calibrerdp.{{domain}}" LETSENCRYPT_EMAIL: "{{email}}" volumes: - "/opt/calibre:/config" - "/mnt/unionfs/Media/Books:/library" networks: - name: cloudbox aliases: - calibrerdp purge_networks: yes restart_policy: always state: started
-
When done editing, save the file: Ctrl + X Y Enter.
-
Add the Ansible role to
cloudbox_mod.yml:To edit:
nano ~/cloudbox_mod/cloudbox_mod.ymlAdd the following line under
roles::- { role: calibre-rdp, tags: ['calibre-rdp'] }Final result:
--- - hosts: localhost vars_files: - settings.yml - ['~/cloudbox/accounts.yml', '~/cloudbox/accounts.yml.default'] - ['~/cloudbox/settings.yml', '~/cloudbox/settings.yml.default'] - ['~/cloudbox/adv_settings.yml', '~/cloudbox/adv_settings.yml.default'] roles: - { role: pre_tasks } - { role: myrole, tags: ['myrole'] } - { role: calibre-rdp, tags: ['calibre-rdp'] }
Note: The
pre_tasksrole is required and should not be removed. -
Run the Ansible role:
cd ~/cloudbox_mod/
sudo ansible-playbook cloudbox_mod.yml --tags calibre-rdp
-
Go to your domain (calibrerdp.yourdomain.com), and login with your htpasswd if used.
-
On the initial screen, click 'OK'
-
If you moved over an existing calibre library to Media/Books, on the next screen click cancel, and your library should load. You are done! If creating a new library, click next.
-
You can select your e-book device, and click next.
-
If using a Kindle or Amazon device you can then set the calibre email settings, click next once done:
If you don't know your Kindle Email:
-
From Settings, scroll down to Personal Document Settings.
-
Under Send-to-Kindle Email Settings, your Send to Kindle email address will be listed.
-
You are done! You should now see this screen, and can click finish:
-
If you wanted to use the Content Server, go to Preferences > Sharing Over the Net and change the port to 8081 and apply - will need a restart via
docker restart calibre-rdp -
If you want to install Calibre Web, install a new CB mod role in the same way as Calibre RDP.
-
Create the Calibre-Web task in nano:
nano ~/cloudbox_mod/roles/calibre-web/tasks/main.yml -
Copy and paste the below role, double checking and editing the following settings as needed:
Subdomain Record
"calibreweb.{{domain}}}"- Default will be accessible via calibreweb.yourdomain.comBooks Folder Is set to /Media/Books
"/mnt/unionfs/Media/Books:/books"- name: "Setting CloudFlare DNS Record" include_role: name: cloudflare vars: subdomain: calibreweb - name: "Get {{user}} uid" shell: "id -u {{user}}" register: uid - name: "Get {{user}} gid" shell: "id -g {{user}}" register: gid - name: Stop and remove any existing container docker_container: name: calibreweb state: absent - name: Create calibre directories file: "path={{item}} state=directory mode=0775 owner={{user}} group={{user}}" with_items: - /opt/calibre - name: Create and start container docker_container: name: calibreweb image: linuxserver/calibre-web pull: yes published_ports: - "127.0.0.1:8083:8083" env: PUID: "{{uid.stdout}}" GUID: "{{gid.stdout}}" VIRTUAL_HOST: "calibreweb.{{domain}}" VIRTUAL_PORT: 8083 LETSENCRYPT_HOST: "calibreweb.{{domain}}" LETSENCRYPT_EMAIL: "{{email}}" volumes: - "/etc/localtime:/etc/localtime:ro" - "/opt/calibre:/config" - "/mnt/unionfs/Media/Books:/books" - "/mnt:/mnt" networks: - name: cloudbox aliases: - calibreweb purge_networks: yes restart_policy: always state: started
-
When done editing, save the file: Ctrl + X Y Enter.
-
Add the Ansible role to
cloudbox_mod.yml:To edit:
nano ~/cloudbox_mod/cloudbox_mod.ymlAdd the following line under
roles::- { role: calibre-web, tags: ['calibre-web'] }Final result:
--- - hosts: localhost vars_files: - settings.yml - ['~/cloudbox/accounts.yml', '~/cloudbox/accounts.yml.default'] - ['~/cloudbox/settings.yml', '~/cloudbox/settings.yml.default'] - ['~/cloudbox/adv_settings.yml', '~/cloudbox/adv_settings.yml.default'] roles: - { role: pre_tasks } - { role: myrole, tags: ['myrole'] } - { role: calibre-rdp, tags: ['calibre-rdp'] } - { role: calibre-web, tags: ['calibre-web'] }
Note: The
pre_tasksrole is required and should not be removed. -
Run the Ansible role:
cd ~/cloudbox_mod/
sudo ansible-playbook cloudbox_mod.yml --tags calibre-web
-
Go to your domain (calibreweb.yourdomain.com) and set your calibre database location to /books
-
Under "External Binaries" set the Location of Unrar binary to
/usr/bin/unrar -
For converting e-books [Untested currently]:
-For the option Use Kindlegen set the Path to convertertool to
/calibre-web/app/vendor/kindlegenand at About you will see then kindlegen Amazon kindlegen(Linux) V2.9 build 1028-0897292-For the option Use calibre's ebook converter set the Path to convertertool to
/opt/calibre/ebook-convert -
Hit Submit then Login. Default admin login:
Username: admin Password: admin123After successful login change the default password and set the email address.
- airdcpp
- Airsonic
- alltube
- always
- amongus
- Apprise
- archivebox
- arrX (SonarrX, RadarrX, BazarrX)
- AssHama
- autoscan
- Bazarrx
- Beets
- Bitwarden
- Booksonic
- Bookstack
- btrfsmaintenance
- calibre-web
- calibre
- Coder
- comicstreamer
- comixed
- couchpotato
- Dashmachine
- deemix
- deezloader-remix
- Deluge
- DelugeVPN
- Drive STRM
- eBooks: Calibre and Calibre web
- emby2
- embystat
- EPMS
- Filebot
- Filebrowser
- filezilla
- FlareSolverr
- Funkwhale
- Gazee
- Gitea
- Glances
- Goplaxt
- gotify
- grafana
- Guacamole
- Handbrake
- Heimdall
- Hetzner NFS VLAN
- influxdb
- InvoiceNinja
- JDownloader2
- Jellyfin
- Jirafeau
- KCPTUN
- Kitana
- komga
- Krusader
- LazyLibrarian
- lidarrx
- Logarr
- Mango
- Mediabutler
- medusa
- Mellow
- Minecraft
- Monitorr
- Mylar
- mylar3
- navidrome
- Nextcloud
- NowShowing
- NZBHydra (v1)
- ombix
- Organizr (v1)
- ouroboros
- overseerr
- paperless-ng
- plex2
- Pyload
- qBittorrent
- qbittorrentvpn
- Quassel
- RadarrX
- redbot
- requestrr
- requestrrx
- resilio-sync
- rocketchat
- sickchill
- searx
- SonarrX
- Speedtest
- SSHswifty
- stash
- Subsonic
- SyncLounge
- Tdarr
- telegraf
- Telly
- TheLounge
- transmissionvpn
- transmissionx
- ubooquity
- Unifi
- unmanic
- Varken
- vnstat
- wallabag
- Watchtower
- Wordpress
- Xteve
- ZNC
- Custom python plexlibrary libraries
- Speed up Plex / Emby / Jellyfin
- Tautulli Custom Scripts
- Plex Scanners and Agents







