Skip to content

Instantly share code, notes, and snippets.

@hkfuertes
Last active March 21, 2024 10:13
Show Gist options
  • Save hkfuertes/c94a2966bb02cbb01f706c3c7edef79b to your computer and use it in GitHub Desktop.
Save hkfuertes/c94a2966bb02cbb01f706c3c7edef79b to your computer and use it in GitHub Desktop.

How to setup an LXC container with docker and calibre/web in Proxmox

Proxmox

First we need to install the Alpine LXC, the easiest way is to use Proxmox Helper scripts: https://tteck.github.io/Proxmox/

bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/alpine.sh)"

I would install in "advance" mode and be generous with the resources (4 cores, 2G ram, 8GB disk)

Alpine LXC

First we need to setup docker:

apk update
apk add docker docker-compose
rc-update add docker
service docker start

Then just create a docker-compose.yml file with this content:

version: "3.8"

services:
  calibre:
    image: lscr.io/linuxserver/calibre:latest
    container_name: calibre
    security_opt:
      - seccomp:unconfined #optional
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      # - PASSWORD= #optional
      # - CLI_ARGS= #optional
    volumes:
      - /root/config:/config
    network_mode: "host"
    restart: unless-stopped
  
  calibre-web:
    image: lscr.io/linuxserver/calibre-web:latest
    container_name: calibre-web
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - DOCKER_MODS=linuxserver/mods:universal-calibre #optional
      - OAUTHLIB_RELAX_TOKEN_SCOPE=1 #optional
    volumes:
      - /path/to/data:/config
      - /path/to/calibre/library:/books
    network_mode: "host" 
    restart: unless-stopped

To run it docker-compose up -d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment