holsdir

setup

Up and running in two minutes

Docker and a folder for downloads. That's all it needs.

01Prepare

Create the folders, then get the user and group id the files should belong to:

sh
mkdir -p data /path/to/downloads /path/to/media
id -u && id -g

02compose.yml

Put in your ids and paths:

compose.yml
services:
  holsdir:
    image: ghcr.io/cars10/holsdir
    container_name: holsdir
    restart: unless-stopped
    user: "1000:1000"         # your id -u:id -g
    ports:
      - "8080:8080"           # web ui and api
      - "9666:9666"           # click'n load, optional
    volumes:
      - ./data:/holsdir/data
      - /path/to/downloads:/holsdir/downloads
      - /path/to/media:/holsdir/media # optional
VolumeWhat goes there
/holsdir/dataDatabase and encrypted account secrets. Back this one up.
/holsdir/downloadsDownloads and extraction. Put it on your fastest disk.
/holsdir/mediaOptional. Your library: Movies/, Series/ and Unsorted/ by default.

The container has no fixed user: user: decides who owns the downloaded files. Port 9666 is only needed for Click'n'Load.

03Start and log in

sh
docker compose up -d
docker logs holsdir 2>&1 | grep "setup token"

Open http://IP.OF.YOUR.NAS:8080, paste the setup token and choose the admin password. A short wizard then walks you through accounts, download limits, extraction and organizing. Everything it asks can be changed later under Settings.

04Hoster accounts

Settings → Accounts. Credentials are stored encrypted and never sent back to the browser.

HosterPremiumWithout account
DDownloadusername + password–
1fichierAPI keyfree mode: one file at a time, with wait times

Several accounts per hoster are tried in order. An account running low on traffic is skipped instead of failing halfway.

05Media library

Settings → Organize. Turn it on and finished packages are renamed and moved into the library; the download folder is removed afterwards. Names come from TVmaze (series, no key needed) or TMDB with a free API key (movies too, and names in other languages).

Plex, Jellyfin and Kodi style:

templates
Movies:   {title} ({year})/{title} ({year}){ - resolution}{ hdr}{ acodec}{ channels}
Episodes: {show} ({year})/Season {season:02}/{show} - {sxe}{ - episode_title}{ - resolution}
result
Movies/Sintel (2010)/Sintel (2010) - 2160p HDR10 EAC3 5.1.mkv
Series/Night Harbor (2024)/Season 01/Night Harbor - S01E01 - Low Tide - 1080p.mkv

The settings page shows a live preview of every template. Anything that isn't a movie or an episode goes to Unsorted.

06Click'n'Load

Link sites send Click'n'Load to 127.0.0.1:9666 on the machine your browser runs on. Either forward that port to your NAS, or install the extension and enter your holsdir address (e.g. http://192.168.1.10:9666):

  • Firefox (desktop and Android): holsdir-clicknload.xpi. On Android, tap the logo 5 times in Settings → About Firefox, then use "Install extension from file". Files don't auto-update: install again for a newer version.
  • Chrome: holsdir-clicknload-chrome.zip. Unzip, open chrome://extensions, enable Developer mode, "Load unpacked" and pick the folder. Keep the folder.

Links from Click'n'Load are always staged for review, since the protocol has no authentication.

07Hooks

Settings → Hooks runs shell commands on events (package_finished, package_organized, queue_empty, …) with the details in HOLSDIR_* env vars. curl, wget and jq are in the image. Refresh Jellyfin after organizing:

compose.yml
environment:
      JELLYFIN_URL: http://jellyfin:8096
      JELLYFIN_APIKEY: your-api-key
hook on package_organized
curl -fsS -X POST "$JELLYFIN_URL/Library/Refresh" -H "Authorization: MediaBrowser Token=$JELLYFIN_APIKEY"

All events and variables: HOOKS.md.

08Environment

VariableDefaultWhat
HOLSDIR_WEBUI_ENABLEDtruefalse serves only the API
HOLSDIR_CLICKNLOAD_ENABLEDtrueEnable the Click'n'Load listener
HOLSDIR_CLICKNLOAD_BIND0.0.0.0:9666Click'n'Load listen address
HOLSDIR_LOGinfoLog filter, e.g. info,holsdir=debug

Everything else lives in the web UI and applies immediately, no restart.

09API

REST under /api/v1, docs at /api/docs, OpenAPI at /api/openapi.json. Create a token under Settings → API tokens:

sh
curl -H "Authorization: Bearer $TOKEN" http://nas:8080/api/v1/stats

# add links and start them right away
curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"urls": ["https://1fichier.com/?abc123"], "autostart": true}' \
  http://nas:8080/api/v1/packages

/api/v1/stats is made for dashboards like Homepage.

10Update

sh
docker compose pull && docker compose up -d

The database migrates itself on start.