Not yet tested on a QNAP device. QNAP's menu names below come from QNAP's own documentation, and the same file runs on every Docker host; tell us at GitHub what you find.
For QTS 5.1 or QuTS hero 5.1 and newer, with Container Station 3 from App Center. About 20 minutes. Maktaba runs as a user you make for it, never as root.
Before you start
- Memory: Maktaba needs 3.5 GB it may use; 8 GB or more is comfortable. It picks its tier from that memory (which tier). A 2 GB model, such as the TS-233, serves best as storage.
- An SSD volume for the data folder if there is one: the database and thumbnails are much faster there. Your media can stay on hard disks.
- A GPU: models with an Intel Celeron or Pentium (TS-464, TS-264, TS-462) have Quick Sync; the Ryzen and ARM models convert video in software.
- SSH: Control Panel → Network & File Services → Telnet / SSH → Allow SSH connection. QTS lets only administrators sign in over SSH.
1. Make a user and read its numbers
Control Panel → Privilege → Users → Create → Create a User: name
maktaba, a strong password, not an administrator. Then sign in over SSH as an
administrator (in the Console Management menu QTS shows, press Q and then
Y for a shell) and run id maktaba: uid=1001 gid=100 is
the answer 1001:100.
2. Give it its folders
-
Data: create the folder
maktabainside the shared folderContainer, which Container Station makes when it is installed (put it on an SSD volume when there is one), and givemaktabaRead/Write on it. -
Media: Control Panel → Privilege → Shared Folders → the edit-permissions
icon of each folder with videos → Edit Shared Folder Permission: Read/Write for
maktabawhere Maktaba may save subtitles and conversions, Read only elsewhere.
A shared folder's path in the container is its path on the NAS, such as
/share/Multimedia or /share/CACHEDEV1_DATA/Movies. Mount each at
that same path: Maktaba then knows it as the share your other computers open.
3. Make the compose file
Open the install page, choose QNAP, and
answer: the user (1001:100), the memory, the data folder
(/share/Container/maktaba), your media folders, hardware video and the time
zone. The file says MAKTABA_PLATFORM: qts, so Maktaba knows it runs on a QNAP.
Copy it. Nothing you type there leaves the page.
4. Create the application
Container Station → Applications → Create: name
maktaba (letters, digits, - and _), paste the file,
Validate, then Create. Container Station downloads the
image and starts it; until its setup, the container's log says how to run it.
5. Run the setup and choose the role
Over SSH, as an administrator, run (with sudo in front if it is refused):
docker exec -it maktaba /opt/maktaba/server/bin/maktaba-server container setup
Answer its questions: a name for the admin account (not admin, which Maktaba
keeps for itself), its password, and the folders with your videos. For each folder setup
offers the share it works out (/share/Movies is the share Movies):
confirm it, or type the name your other computers use. The NAS needs the internet for this
step: setup downloads the transcription and search tools (about 2 GB) and the speech models.
Maktaba starts by itself when it finishes. Open the address setup shows, sign in, and add a
library for each folder: Manage → Manage libraries → Add library.
These steps make the NAS your Maktaba home. A computer with a graphics card can join it later (After setup). If your home runs on another computer instead, the NAS needs no Maktaba: share its folders and that home reads them (Home, machine or storage).
Ports
- QTS keeps 8080 for its own pages (its default system port). Maktaba sees that and moves its API port to a free one from 8780 to 8790; setup and Settings → This machine show the new one. You do nothing.
- 8081: QNAP's Web Server package, when it is installed, uses 8081 for HTTPS. Maktaba then moves its live TV port the same way.
-
To choose a port yourself, remove the
#in front of its line in the file's[ports]block (MAKTABA_API_PORT,MAKTABA_WEB_PORT,MAKTABA_STREAM_PORTorMAKTABA_POSTGRES_PORT), set a free port, and recreate the application. A port you set is never moved: if another program holds it, Maktaba stops and its log names the port (A port is taken).
Hardware video
On a model with Quick Sync, choose Intel or AMD under Hardware video on the
install page, and give it the render device's group: over SSH, run
stat -c %g /dev/dri/renderD128. The file then passes /dev/dri and
that group to the container, and Settings → This machine says
Video: hardware. QNAP's own documentation does not cover
/dev/dri in a compose file; the device checklist confirms it on a TS-464.
Without it, Maktaba converts in software.
Updates
Maktaba updates itself in its update window (Manage → Updates), and recreating the application with a newer image is safe too: an older image never replaces a newer Maktaba. Each update takes a backup of the database first, so keep room for it on the data folder's volume. If a release cannot change the database, Maktaba goes back to the one you had by itself (An update did not go through).
Troubleshooting
-
The container stops at once: its log, on the container's page in
Container Station, names the folder and the user. Give
maktabaRead/Write onContainer/maktaba(step 2) and start it again. -
A library shows No access: give
maktabapermission on that shared folder (step 2), then press Check access on the library's page. - SSH says the user cannot sign in: sign in as an administrator; QTS refuses other users over SSH.
- Troubleshooting explains every other message; After setup covers quiet hours, speech to text, a reverse proxy and adding a computer with a GPU.