Skip to content

bentopdf

bentopdf is a pdf toolkit: merge, split, edit, sign, compress, convert, ocr. your browser processes the files, and the container only serves the page. the browser needs internet access even though your files don't leave it, because by default it loads the pdf engines from the jsdelivr cdn. it runs as one replica, anywhere on the swarm.

compose.yml, 16 lines, 1 note

each in the code opens a note on that line. download compose.yml

services:
  bentopdf:
    image: ghcr.io/alam00000/bentopdf-simple:2.8.8
    environment:
      - TZ=America/Los_Angeles
    ports:
      - 8091:8080
    deploy:
      labels:  # (1)!
        - homepage.group=Tools
        - homepage.name=BentoPDF
        - homepage.icon=bentopdf.png
        - homepage.href=https://bentopdf.mydomain.com
        - homepage.description=PDF toolkit in the browser
      mode: replicated
      replicas: 1
  1. labels for the tile on the homepage dashboard. they go under deploy.labels because homepage reads the swarm's service specs, and container labels aren't in them.

state considerations

there is nothing to keep, so there are no volumes. upstream can hide tools with a config.json mounted into the container at runtime. i don't use it.

network considerations

the container listens on 8080 (set PORT to change that), and i publish it on 8091 through the ingress mesh. it joins no overlay network besides the stack's default.

reach it by name through traefik, at https://bentopdf.mydomain.com, or on port 8091 of any swarm node IP or the keepalived IP.

the simple image, from upstream

i use the bentopdf-simple image. it's the self-hosting build: the same tools, with the marketing pages taken out.

use the upstream repo and images linked here. the project has deprecated the docker hub image bentopdf/bentopdf and no longer updates it, and some articles link to an old copy of the repo under another account.

upstream tags a release most months, so this is a plain version pin, and renovate opens a PR for each new one. a new major waits for approval on the dependency dashboard first.

checking it

the page it serves should carry bentopdf's title:

curl -s http://192.168.1.45:8091/ | grep -o '<title>[^<]*</title>'
<title>PDF Tools</title>