### Run setup script for CLI-seeded admin Source: https://github.com/angelosha/uchiyomi/blob/main/docs/USAGE.md Runs the setup script from a clone to generate secrets, create an admin from a typed password, fix volume ownership, and start the development stack (`yomi-app`, `yomi-db`, `yomi-suwayomi`, `yomi-flaresolverr`). `yomi-app` is the same single container the install ships, built from source. ```bash bash scripts/setup.sh ``` -------------------------------- ### Start Uchiyomi server with docker compose up Source: https://github.com/angelosha/uchiyomi/blob/main/docs/USAGE.md Starts the Uchiyomi server with no configuration; secrets are generated automatically. Run `docker compose pull` before this command when updating to avoid silently staying on the installed `:latest` image. ```bash docker compose up -d # no config needed — secrets are generated automatically ``` -------------------------------- ### Install Uchiyomi with Docker Compose Source: https://github.com/angelosha/uchiyomi/blob/main/README.md Downloads the production docker-compose.yml from the repository and starts the Uchiyomi stack in detached mode. Requires Docker and Docker Compose. Do not clone the repo; the top-level docker-compose.yml is the development stack. ```bash curl -O https://raw.githubusercontent.com/AngeloSha/uchiyomi/main/deploy/docker-compose.yml docker compose up -d ``` -------------------------------- ### Run split layout with docker compose --profile split Source: https://github.com/angelosha/uchiyomi/blob/main/CHANGELOG.md Starts the split two-container layout (yomi-bff and yomi-web) using the 'split' profile. The profile adds services rather than replacing them, so it uses its own port SPLIT_WEB_PORT (8081) to avoid conflicting with the default single-container setup. ```bash docker compose --profile split up -d # yomi-bff + yomi-web, on SPLIT_WEB_PORT (8081) ``` -------------------------------- ### Build and run commands Source: https://github.com/angelosha/uchiyomi/blob/main/desktop/README.md Commands to install dependencies, build the solver, stage the web export and bff, bundle PostgreSQL, run from source, and build installers for Windows or macOS. The comments note that the solver compiles to out/, staging puts files into resources/, and Linux dev may need --from-dir and --no-sandbox. ```sh npm ci && node node_modules/electron/install.js npm run build # compile the solver (TypeScript) to out/ node scripts/stage.mjs # web export + bff (as Dockerfile.aio) into resources/ node scripts/pg-dist.mjs # PostgreSQL 16 into resources/pg (Linux dev: --from-dir ) npx electron . # from source (Linux: --no-sandbox under a container) npx electron-builder --win|--mac --publish never ``` -------------------------------- ### GET /api/sources/search-all Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Documentation for the GET /api/sources/search-all endpoint. ```APIDOC ## GET /api/sources/search-all ### Description Searches across all reachable sources at once. Returns when every source has answered, when the `wait` timeout expires, or shortly after the first source with results. The response includes a `sources` array with per-source state and a `content` array with search results. ### Method GET ### Endpoint /api/sources/search-all ### Parameters #### Query Parameters - **q** (string) - Required - The search term. - **wait** (integer) - Optional - Maximum time in milliseconds to wait for sources. Clamped to `SEARCH_FIRST_ANSWER_MS` (default 6000). Omitted means the maximum. - **groupBy** (string) - Optional - Set to `source` to group results by source instead of by title. ### Response #### Success Response (200) - **content** (array) - List of series cards. Each card may include `inLibrary` (boolean) and `librarySeriesId` (string) if the series is already in the library. - **sources** (array) - List of sources with their state. Each entry includes `state` (string: `ok`, `empty`, `timeout`, `failed`, `pending`, or `skipped`) and optionally `why` (string: `disabled` or `cooldown`) for skipped sources. - **pending** (integer) - Number of sources still being asked. - **asked** (integer) - Number of sources asked at all. #### Response Example { "content": [ { "inLibrary": false, "librarySeriesId": null } ], "sources": [ { "state": "ok" }, { "state": "skipped", "why": "cooldown" } ], "pending": 0, "asked": 2 } ### Error Handling - **403** - Returned if the account lacks `canDownload` permission or if the source is adult and the account's `max_age_rating` is below 18. Adult sources are silently dropped from the fan-out. ``` -------------------------------- ### GET /api/sources/latest Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Documentation for the GET /api/sources/latest endpoint. ```APIDOC ## GET /api/sources/latest ### Description Returns the newest series listing from a given source. The response is cached server-side for ten minutes per source and page, and concurrent requests for the same page are collapsed into one outbound fetch. ### Method GET ### Endpoint /api/sources/latest ### Parameters #### Query Parameters - **source** (string) - Required - The source ID. - **page** (integer) - Optional - Page number for pagination. ### Response #### Success Response (200) - **content** (array) - List of series cards. Each card may include `inLibrary` (boolean) and `librarySeriesId` (string) if the series is already in the library. #### Response Example { "content": [ { "inLibrary": true, "librarySeriesId": "123" } ] } ### Error Handling - **403** - Returned if the account lacks `canDownload` permission or if the source is adult and the account's `max_age_rating` is below 18. - **200** with `message: "already in library"` if the exact series is already in the library. - **409** with `duplicate` if a series with the same title came from a different source; retry with `"force": true` to add the second copy. ``` -------------------------------- ### GET /api/sources/popular Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Documentation for the GET /api/sources/popular endpoint. ```APIDOC ## GET /api/sources/popular ### Description Returns a listing of popular series from a given source, sorted by the source's own popularity ranking. The listing is cached separately from the newest listing. ### Method GET ### Endpoint /api/sources/popular ### Parameters #### Query Parameters - **source** (string) - Required - The source ID. - **page** (integer) - Optional - Page number for pagination. ### Response #### Success Response (200) - **popular** (boolean) - Indicates whether the source supports popular listing. If false, the source is not asked. #### Response Example { "popular": true } ### Error Handling - **403** - Returned if the account lacks `canDownload` permission or if the source is adult and the account's `max_age_rating` is below 18. ``` -------------------------------- ### POST /api/admin/extensions/catalog/:pkgName Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Performs actions on a specific extension, such as enabling, installing, updating, or uninstalling. ```APIDOC ## POST /api/admin/extensions/catalog/:pkgName ### Description Enables, installs, updates, or uninstalls an extension. The `enable` action switches on an installed extension's sources. ### Method POST ### Endpoint /api/admin/extensions/catalog/:pkgName ### Parameters #### Path Parameters - **pkgName** (string) - Required - The package name of the extension. #### Request Body - **enable** (boolean) - Optional - If `true`, enables the extension's sources. - **install** (boolean) - Optional - If `true`, installs the extension. - **update** (boolean) - Optional - If `true`, updates the extension. - **uninstall** (boolean) - Optional - If `true`, uninstalls the extension. ### Response #### Success Response (200) - **ok** (boolean) - Always `true`. - **sources** (array) - List of sources. - **on** (array) - Sources that are on. - **hidden** (array) - Hidden sources. - **registered** (array) - Registered sources. #### Error Response (409) - **error** (string) - `no_sources` when the extension is not installed or provides no source. #### Response Example ```json { "ok": true, "sources": ["source1"], "on": ["source1"], "hidden": [], "registered": ["source1"] } ``` ``` -------------------------------- ### GET /api/admin/settings Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Retrieves the server-wide settings, including the source order configuration. ```APIDOC ## GET /api/admin/settings ### Description Retrieves server-wide settings, including the source order (`source_prefs`) and other configuration. ### Method GET ### Endpoint /api/admin/settings ### Response #### Success Response (200) - **source_prefs** (object) - Contains the `priority` array representing the server-wide source order. #### Response Example { "source_prefs": { "priority": ["source1", "source2"] } } ``` -------------------------------- ### GET /api/admin/extensions/repos Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Fetches the configured extension repositories. ```APIDOC ## GET /api/admin/extensions/repos ### Description Retrieves the list of extension repositories. ### Method GET ### Endpoint /api/admin/extensions/repos ### Response #### Success Response (200) No specific response body is documented. ``` -------------------------------- ### GET /api/admin/settings Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Retrieves the server settings. Returns a single row with all settings fields. ```APIDOC ## GET /api/admin/settings ### Description Retrieves the server settings. Returns a single row with all settings fields. ### Method GET ### Endpoint /api/admin/settings ### Response #### Success Response (200) - **server_name** (string) - The server name. - **allow_registration** (boolean) - Whether registration is allowed. - **updater_hours** (number) - Updater interval in hours. - **extension_hours** (number) - Extension update interval in hours. - **extension_auto_update** (boolean) - Whether extensions auto-update. - **update_check** (boolean) - Whether update checks are enabled. - **install_ping** (boolean) - Whether install pings are enabled. - **install_ping_last** (string) - Last install ping timestamp. - **cleanup_read** (boolean) - Whether read cleanup is enabled. - **cleanup_read_days** (number) - Days for read cleanup. - **backup_hour** (number) - Hour of the nightly backup. - **scanlator_prefs** (object) - Scanlator preferences. - **auto_follow_on_failure** (boolean) - Whether auto-follow on failure is enabled. - **repair_enabled** (boolean) - Whether the nightly library repair is enabled. - **source_prefs** (object) - Source preferences. - **group_upgrade** (boolean) - Whether group upgrades are enabled. - **borrow_names** (boolean) - Whether chapter names are borrowed from another source. - **mangadex_langs** (array of strings) - MangaDex languages enabled besides English. - **unstated_lang** (string) - Language for sources and series without a stated language. - **extensions_configured** (boolean) - Computed: whether extensions are configured. - **mangadex_available** (array of strings) - Computed: available MangaDex languages. ### Response Example { "server_name": "My Server", "allow_registration": true, "updater_hours": 24, "extension_hours": 24, "extension_auto_update": true, "update_check": true, "install_ping": true, "install_ping_last": "2023-01-01T00:00:00Z", "cleanup_read": true, "cleanup_read_days": 30, "backup_hour": 2, "scanlator_prefs": {}, "auto_follow_on_failure": true, "repair_enabled": true, "source_prefs": {}, "group_upgrade": false, "borrow_names": false, "mangadex_langs": ["es-la"], "unstated_lang": "en", "extensions_configured": true, "mangadex_available": ["en", "es-la"] } ``` -------------------------------- ### GET /api/home Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Retrieves the shelves for the home screen, including on-deck books with their progress. ```APIDOC ## GET /api/home ### Description Returns the shelves the home screen is built from, including the on-deck books with their progress. ### Method GET ### Endpoint /api/home ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token for authentication. ### Response #### Success Response (200) - **content** (array) - The shelves the home screen is built from, including on-deck books with progress. #### Response Example { "content": [] } ### Error Handling Errors return a non-2xx status with `{ "error": "", "message": "" }`. ``` -------------------------------- ### POST /api/admin/tasks/verify/run Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Documentation for the POST /api/admin/tasks/verify/run endpoint, which starts a detached verification walk for chapter files. ```APIDOC ## POST /api/admin/tasks/verify/run ### Description Starts a detached verification walk that checks chapter files for a database restored without its chapter files. It returns immediately with a 200 status and either a started confirmation or a busy error if a walk is already in progress. ### Method POST ### Endpoint /api/admin/tasks/verify/run ### Response #### Success Response (200) - **ok** (boolean) - Always true when the walk started. - **started** (boolean) - Always true when the walk started. #### Response Example { "ok": true, "started": true } #### Error Response (200) - **ok** (boolean) - Always false when a walk is already running. - **error** (string) - Always "busy" when a walk is already running. #### Error Response Example { "ok": false, "error": "busy" } ### Notes - The verification walk is detached and runs asynchronously; the counts are not included in the immediate response. - Progress and results are available via `GET /api/admin/tasks` (polled every 5 seconds) under the `verify` entry's `lastResult`. - An audit row `library.verify` is written when the walk ends, containing `checked`, `missing`, `readLibraryMissing`, `unmounted`, and `ms` fields. - A `task.run` audit row with `task: 'verify'` is written at the press. - The walk never runs at boot or on a schedule. - A shutdown stops the walk between batches; already marked rows remain marked. ``` -------------------------------- ### POST /api/library/bulk/newest Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Starts a detached job to fetch the newest chapters for a batch of series. ```APIDOC ## [POST] /api/library/bulk/newest ### Description Starts a detached job to fetch the newest chapters for up to 500 series. The job is subject to the download gate and runs once per server. Returns immediately with a 202 and the total number of distinct IDs asked. ### Method POST ### Endpoint /api/library/bulk/newest ### Parameters #### Request Body - **ids** (array of string) - Required - 1 to 500 series IDs, each 1–64 characters. Duplicates are counted once. ### Response #### Success Response (202) - **ok** (boolean) - Always true. - **total** (integer) - Number of distinct IDs asked. #### Response Example { "ok": true, "total": 3 } #### Error Responses - **403** - `forbidden` - *You don't have permission to download chapters.* Returned when the member's `canDownload` permission is off or the account row cannot be read (fails closed; admins exempt, absent permission allows). - **400** - `bad_request` - *ids: one to five hundred series ids.* Returned when the body is not `ids` (including the old `seriesIds` key). - **409** - `busy` - *A Fetch newest run is already going. Wait for it to finish.* Returned when a run is already in progress. ``` -------------------------------- ### GET /api/admin/libraries Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Retrieves all libraries. Each library includes its `paths`, with the first folder listed first, then the rest by name. ```APIDOC ## GET /api/admin/libraries ### Description Retrieves all libraries. Each library includes its `paths`, with the first folder (the one `path` names) listed first, then the rest by name. ### Method GET ### Endpoint /api/admin/libraries ### Response #### Success Response (200) - **libraries** (array) - List of libraries, each with `id`, `name`, `paths`, and other fields. ### Response Example { "libraries": [ { "id": "lib1", "name": "Library 1", "paths": ["/manga", "/comics"] } ] } ``` -------------------------------- ### Run locally with Docker Compose Source: https://github.com/angelosha/uchiyomi/blob/main/CONTRIBUTING.md Sets up the environment file and starts the single-container release build (Dockerfile.aio) with Docker Compose. After running, open http://localhost:8080, create the admin account, and add a source by URL. ```bash cp .env.example .env # point LIBRARY_PATH at your manga docker compose up -d ``` -------------------------------- ### GET /api/admin/tasks Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Lists scheduled tasks, including the extensions task that keeps installed extensions current. ```APIDOC ## GET /api/admin/tasks ### Description Lists scheduled tasks, including the `extensions` task that keeps installed extensions current. ### Method GET ### Endpoint /api/admin/tasks ### Response #### Success Response (200) - **tasks** (array) - List of scheduled tasks, including the `extensions` task. #### Response Example { "tasks": [ { "name": "extensions", "lastResult": { "refreshed": true, "refreshError": null, "updated": 0, "failed": 0, "obsolete": 0, "updatesAvailable": 0, "newUpstream": 0, "removedUpstream": 0, "reposRestored": 0, "reinstalled": 0, "removedOutside": 0, "deferred": 0 } } ] } ``` -------------------------------- ### GET /api/admin/sources/check Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Reads the progress and result of a source check that was started via POST. Returns the same progress object until `running` is false, at which point `result` holds the verdict per source. ```APIDOC ## GET /api/admin/sources/check ### Description Reads the progress and result of a source check that was started via POST. Returns the same progress object until `running` is false, at which point `result` holds the verdict per source. ### Method GET ### Endpoint /api/admin/sources/check ### Response #### Success Response (200) - **running** (boolean) - Whether the check is still running. - **by** (string) - The user or trigger that initiated the check. - **startedAt** (string) - Timestamp when the check started. - **finishedAt** (string) - Timestamp when the check finished (if completed). - **total** (number) - Total number of sources to check. - **done** (number) - Number of sources already checked. - **current** (string) - Identifier of the source currently being checked. - **result** (object) - Verdict per source, each with `state`, `stage`, and `kind`. - **error** (string) - Error message if the check failed. #### Response Example { "running": false, "by": "admin", "startedAt": "2025-01-01T00:00:00Z", "finishedAt": "2025-01-01T00:01:00Z", "total": 10, "done": 10, "current": null, "result": { "source-id": { "state": "ok", "stage": "smoke", "kind": "site" } }, "error": null } ``` -------------------------------- ### Run the screenshot rig (scripts/shots/run.sh) Source: https://github.com/angelosha/uchiyomi/blob/main/docs/SCREENSHOTS.md Commands to run the screenshot rig. Use --yes to confirm, --only to select a subset, --site-dir to also write smaller copies to the marketing site, --record to capture the tour video instead of stills, and --login with SHOT_NET/SHOT_BASE for fixture shots. The desktop app's pages are captured from the real Electron app using SHOT_SERVER and xvfb-run. ```bash bash scripts/shots/run.sh --yes # everything bash scripts/shots/run.sh --yes --only home,library # a subset bash scripts/shots/run.sh --yes --site-dir /path/to/site # also refresh the marketing site's copies bash scripts/shots/run.sh --yes --record # the tour video instead of stills # the fixture shots (Admin → Sources) against a throwaway instance -- see "Shots that use a fixture" SHOT_NET= SHOT_BASE=http://:3000 \ bash scripts/shots/run.sh --yes --login : --only admin-extensions,crop-extensions # the desktop app's own pages, from the real Electron app SHOT_SERVER=http://127.0.0.1: xvfb-run -a node scripts/shots/desktop.mjs ``` -------------------------------- ### Migrate external database to one container Source: https://github.com/angelosha/uchiyomi/blob/main/docs/MIGRATING.md Migrates from an external database to a single container. Dumps the external database, stops the old stack, starts the one-container setup, restores the dump over the socket, and restarts the app. The old volume is left untouched. ```bash docker compose -f docker-compose.external-db.yml exec uchiyomi-db \ pg_dump -U yomi --no-owner --no-acl --clean --if-exists yomi | gzip > uchiyomi.sql.gz ``` ```bash docker compose -f docker-compose.external-db.yml down ``` ```bash curl -O https://raw.githubusercontent.com/AngeloSha/uchiyomi/main/deploy/docker-compose.yml docker compose up -d docker compose logs uchiyomi | grep -m1 'embedded Postgres' # "starting embedded Postgres 16" ``` ```bash gunzip -c uchiyomi.sql.gz | docker compose exec -T uchiyomi \ psql -q "postgres://yomi@/yomi?host=/run/postgresql" docker compose restart uchiyomi ``` -------------------------------- ### Launch the engine with buildLaunch Source: https://github.com/angelosha/uchiyomi/blob/main/desktop/engine/README.md The exact launch command the app uses to start the engine. It sets environment variables for paths, secrets, and the FlareSolverr URL, then runs java with the shim as the main class. The classpath is relative, so no path is on the command line; the process is spawned with windowsHide: true and every stdio handle piped. ```sh cd # the unpacked pack; the classpath is relative, so no path is on the command line UCHIYOMI_ENGINE_ROOT_DIR=/engine UCHIYOMI_ENGINE_TMP_DIR=/engine-tmp TEMP=TMP=TMPDIR= UCHIYOMI_ENGINE_AUTH_USERNAME= UCHIYOMI_ENGINE_AUTH_PASSWORD= UCHIYOMI_ENGINE_FLARESOLVERR_URL=http://127.0.0.1:/ jre/bin/java -Xmx768m -XX:+UseSerialGC -Djava.awt.headless=true -Djava.util.prefs.PreferencesFactory=dev.uchiyomi.IsolatedPreferences$Factory -cp bin/Suwayomi-Server.jarbin/uchiyomi-shim.jar -D…server.ip=127.0.0.1 -D…server.port= -D…server.webUIEnabled=false -D…server.initialOpenInBrowserEnabled=false -D…server.systemTrayEnabled=false -D…server.downloadAsCbz=true -D…server.autoDownloadNewChapters=false -D…server.flareSolverrEnabled=true -D…server.authMode=BASIC_AUTH -D…server.kcefEnabled=false dev.uchiyomi.EngineShim (spawned with windowsHide: true, every stdio handle piped) ``` -------------------------------- ### POST /auth/totp/setup Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Starts two-factor authentication enrolment by writing a pending secret and returning the secret, OTP auth URI, and QR code. ```APIDOC ## POST /auth/totp/setup ### Description Writes a *pending* secret and answers `{secret, otpauth, qr}`. Nothing is enforced until `POST /auth/totp/enable` confirms a code. While two-factor is already on, setup is **409** `{error: 'totp_enabled', message}` and the row is not touched. ### Method POST ### Endpoint /auth/totp/setup ### Response #### Success Response (200) - **secret** (string) - The pending secret. - **otpauth** (string) - OTP auth URI. - **qr** (string) - QR code data. #### Error Response (409) - **error** (string) - `totp_enabled`. - **message** (string) - Error message. #### Response Example { "secret": "string", "otpauth": "string", "qr": "string" } ``` -------------------------------- ### Run the performance rig: start instance and execute scroll/interact scripts Source: https://github.com/angelosha/uchiyomi/blob/main/web/test/perf/README.md Start a throwaway instance with the e2e up script, then run the performance scripts from the web directory. The scroll script runs in Chrome with CPU throttling or in Firefox unthrottled; interact.mjs is Chrome-only. VARIANTS=ab adds an A/B row per effect, AB_WHEN=on limits it to when the switch is on, EXTRA lets you define your own A/B row, and PERF_OUT writes raw JSON to a directory. ```sh KEEP=1 E2E_NET=perf E2E_PORT=18140 E2E_SUBNET=10.222.40.0/24 bash web/test/e2e/up.sh ``` ```sh cd web BASE=http://127.0.0.1:18140 node test/perf/scroll.mjs # Chrome, CPU throttled 4x / 6x BASE=http://127.0.0.1:18140 node test/perf/interact.mjs # layers, transitions, tilt BROWSER=firefox BASE=http://127.0.0.1:18140 node test/perf/scroll.mjs # Firefox, unthrottled VARIANTS=ab BASE=… node test/perf/scroll.mjs # + one row per effect taken away VARIANTS=ab AB_WHEN=on BASE=… node test/perf/scroll.mjs # …only with the switch on: what still costs EXTRA='{"my idea":".fx-mesh{contain:strict}"}' BASE=… node test/perf/scroll.mjs # your own A/B row PERF_OUT=/tmp/perf BASE=… node test/perf/scroll.mjs # also write the raw JSON there ``` -------------------------------- ### Test restore into scratch database Source: https://github.com/angelosha/uchiyomi/blob/main/docs/USAGE.md Tests a restore into a scratch database over the same socket: create it, load the dump, inspect tables and row count, then drop it. Recommended to do at least once while nothing is on fire. ```bash docker compose exec uchiyomi createdb -h /run/postgresql -U yomi scratch docker compose exec -T uchiyomi sh -c 'gunzip -c /backups/20260819-030000/db.sql.gz' \ | docker compose exec -T uchiyomi psql -q "postgres://yomi@/scratch?host=/run/postgresql" docker compose exec uchiyomi psql "postgres://yomi@/scratch?host=/run/postgresql" -c '\dt' -c 'select count(*) from lib_series' docker compose exec uchiyomi dropdb -h /run/postgresql -U yomi scratch ``` -------------------------------- ### Desktop file layout Source: https://github.com/angelosha/uchiyomi/blob/main/desktop/README.md Shows the file layout of the Electron shell: main.js starts the single instance, window, tray, first run, bridge, updates, and quit; supervisor.js orchestrates the startup and shutdown order of postgres, solver, engine, bff, and window. The other files handle sign-in, preload, IPC, environment, and utilities. ```text main.js ── single instance, window, tray, first run, bridge, updates, quit └─ supervisor.js start: postgres -> solver -> engine (if installed) -> bff -> window stop: bff ({type:'shutdown'}, 25 s) -> engine (stdin, 15 s) -> solver -> postgres ├─ postgres.js bundled PostgreSQL 16: initdb, pg_ctl, the Windows non-ASCII fallback, restore via psql ├─ solver.js the FlareSolverr-compatible Cloudflare solver (src/solver/*.ts, hidden windows) ├─ engine.js the extension engine, downloaded on first use (engine-pin.json, engine/, engine-shim/) └─ bff-entry.cjs the bff's entry: {type:'shutdown'} -> its own SIGTERM path signin.js the per-launch secret and the ONE request that carries it (POST /auth/desktop) preload.js window.uchiyomiDesktop (contract 3) / window.uchiyomiShell (the local pages) bridge.js the IPC handlers, each checking which page is calling env.js the bff's environment (contract 1) firstrun.* / loading.html / restore.js / updates.js / i18n.js / paths.js / ports.js / state.js / log.js ``` -------------------------------- ### GET /api/library/bulk/newest Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Gets the status of the Fetch newest bulk job. ```APIDOC ## [GET] /api/library/bulk/newest ### Description Retrieves the status of the Fetch newest bulk job. (Exact response not specified in source.) ### Method GET ### Endpoint /api/library/bulk/newest ``` -------------------------------- ### GET /img/sources/icon/{id} Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Documentation for the GET /img/sources/icon/ endpoint. ```APIDOC ## GET /img/sources/icon/ ### Description Returns a source's icon at 64px, resolved from the extension's declared icon or the site's favicon. If no icon is found, a lettered tile is rendered instead of a 404. ### Method GET ### Endpoint /img/sources/icon/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The source ID. ### Response #### Success Response (200) - Returns the icon image (binary) or a lettered tile. ### Error Handling - No 404 is returned for missing icons; a lettered tile is served instead. ``` -------------------------------- ### Create Suwayomi folder on Unraid Source: https://github.com/angelosha/uchiyomi/blob/main/docs/INSTALL.md Run this command in the Unraid terminal to create the folder for the uchiwayomi-suwayomi extension engine and set its ownership to UID/GID 1000. ```bash mkdir -p /mnt/user/appdata/uchiyomi-suwayomi && chown 1000:1000 /mnt/user/appdata/uchiyomi-suwayomi ``` -------------------------------- ### Build and run the extension engine pack Source: https://github.com/angelosha/uchiyomi/blob/main/desktop/engine/README.md Commands to build a pack for a platform and to run it manually. The pack command downloads the pinned Suwayomi-Server release, keeps jre/ and bin/Suwayomi-Server.jar, adds bin/uchiyomi-shim.jar and engine.json, and writes engine-pack-.zip plus .sha256 and a sizes .json. The run command launches a pack exactly the way the app does, for manual runs. ```sh node engine/pack.mjs --platform win-x64|mac-arm64|mac-x64|linux-x64 --cache .cache/suwayomi --out engine/build node engine/run.mjs --pack engine/build/engine-pack-linux-x64.zip --runtime /tmp/rt --root /tmp/data ``` -------------------------------- ### GET /api/admin/stats Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Documentation for the GET /api/admin/stats endpoint, which provides admin statistics and version information. ```APIDOC ## GET /api/admin/stats ### Description Returns statistics for the admin header and Overview page, including libraries, series total, members, cache bytes, last scan, backlog, database type, and member activity. Since v0.55.4, it also returns the running version from the server's package.json, or null if it cannot be read. ### Method GET ### Endpoint /api/admin/stats ### Response #### Success Response (200) - **libraries** (array) - List of libraries - **seriesTotal** (number) - Total number of series - **members** (array) - List of members with recent reading activity - **cacheBytes** (number) - Cache size in bytes - **lastScan** (string) - Timestamp of last scan - **backlog** (object) - Contains chapters and series counts - **database** (string) - Either 'embedded' or 'external' - **activity** (object) - Each member's recent reading activity - **version** (string|null) - Running version from server's package.json, or null if unreadable #### Response Example { "libraries": [], "seriesTotal": 0, "members": [], "cacheBytes": 0, "lastScan": "", "backlog": { "chapters": 0, "series": 0 }, "database": "embedded", "activity": {}, "version": null } ``` -------------------------------- ### Resize logo with Docker and Sharp Source: https://github.com/angelosha/uchiyomi/blob/main/logo-options/README.md Runs a Docker container to resize the logo source into the icon set. Mounts the logo-options directory and uses the yomi-bff:prod image with a Sharp resize command. After running, rebuild the web application. ```bash docker run --rm -v $PWD/logo-options:/w yomi-bff:prod node -e '...sharp resize...' ``` -------------------------------- ### GET /api/admin/health Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Documentation for the GET /api/admin/health endpoint, which provides health status and update check information. ```APIDOC ## GET /api/admin/health ### Description Returns health information, including an update check. The page reads from its own copy of this answer; this route asks GitHub nothing. ### Method GET ### Endpoint /api/admin/health ### Response #### Success Response (200) - **update** (object) - Update check information #### Response Example { "update": {} } ``` -------------------------------- ### GET /api/library/bulk/newest Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Documentation for the GET /api/library/bulk/newest endpoint, which reports the status and results of a bulk 'newest' run. ```APIDOC ## [GET] /api/library/bulk/newest ### Description Returns the current or last bulk "newest" run's status and per-series results. The response includes counts, timing, and a list of results with outcome and reason for each requested series id. ### Method GET ### Endpoint /api/library/bulk/newest ### Response #### Success Response (200) - **running** (boolean) - Whether a bulk run is currently in progress. - **done** (integer) - Number of series processed so far. - **total** (integer) - Total number of series in the run. - **startedAt** (string/null) - Timestamp when the run started, or null if no run has occurred. - **results** (array) - List of per-series results, in the order the ids were given. Only returned to the account that started the run and to admins; other members receive an empty array. - **id** (integer) - The series id. - **title** (string) - The series title, or an empty string if the id is not in the caller's library. - **outcome** (string) - One of `downloaded`, `up_to_date`, `skipped`, or `failed`. - **reason** (string) - A sentence explaining the outcome, present for all outcomes except `downloaded`. #### Response Example { "running": false, "done": 3, "total": 3, "startedAt": "2025-01-01T00:00:00Z", "results": [ { "id": 1, "title": "Series A", "outcome": "downloaded" }, { "id": 2, "title": "Series B", "outcome": "up_to_date" }, { "id": 3, "title": "Series C", "outcome": "skipped", "reason": "Chapter 12 was deleted from this server on purpose. Fetch again on the series page brings it back." } ] } ``` -------------------------------- ### GET /api/admin/tasks Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Documentation for the GET /api/admin/tasks endpoint, which lists admin tasks including the verify task and its latest status. ```APIDOC ## GET /api/admin/tasks ### Description Returns the list of admin tasks, including the `verify` task. The panel polls this endpoint every 5 seconds to get the latest status and results of the verification walk. ### Method GET ### Endpoint /api/admin/tasks ### Response #### Success Response (200) - **id** (string) - Task identifier, e.g., "verify". - **name** (string) - Human-readable task name, e.g., "Verify chapter files". - **schedule** (string) - Schedule description, e.g., "on demand · after a database-only restore". - **lastRun** (number | null) - Timestamp of the last run, or null if never run. - **lastResult** (object | null) - Result of the last run, or null if never run or if the run threw an error. - **ok** (boolean) - Whether the run completed successfully. - **checked** (number) - Number of rows whose file was looked for under roots that were not skipped. - **missing** (number) - Number of download-root rows marked as missing this run. - **readLibraryMissing** (number) - Number of read-library rows whose file is missing (not marked). - **unmounted** (string[]) - List of root paths that were considered unmounted or empty. - **roots** (number) - Number of roots walked. - **ms** (number) - Duration of the run in milliseconds. - **stopped** (string | null) - "shutdown" if the run was stopped by a shutdown, otherwise null. - **running** (boolean) - Whether the task is currently running. #### Response Example { "id": "verify", "name": "Verify chapter files", "schedule": "on demand · after a database-only restore", "lastRun": 1700000000000, "lastResult": { "ok": true, "checked": 100, "missing": 5, "readLibraryMissing": 2, "unmounted": ["/library-dl"], "roots": 2, "ms": 30000, "stopped": null }, "running": false } ### Notes - `lastRun` and `lastResult` are persisted in `server_settings.verify_last_run` and `server_settings.verify_last_result`, so a restart does not lose the last run information. - A run that threw an error stores a NULL result, so no stale healthy line is shown. ``` -------------------------------- ### Configure BACKUP_PATH Source: https://github.com/angelosha/uchiyomi/blob/main/docs/USAGE.md Sets the backup destination to a host directory. The directory must be writable by uid 10002 (the app's user); place it on a different physical disk than the Docker volumes so a failed drive doesn't take the backups with it. ```bash BACKUP_PATH=/mnt/backups/uchiyomi ``` -------------------------------- ### GET /api/v1/publishers Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Returns an empty list. ```APIDOC ## GET /api/v1/publishers ### Description Returns an empty list. ### Method GET ### Endpoint /api/v1/publishers ### Response #### Success Response (200) - Empty list. ``` -------------------------------- ### Watch Uchiyomi boot logs with docker compose Source: https://github.com/angelosha/uchiyomi/blob/main/docs/INSTALL.md Use this command to follow the logs of the 'uchiyomi' container to monitor its startup process. ```bash docker compose logs -f uchiyomi # watch it boot ``` -------------------------------- ### GET /api/v1/tags Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Returns an empty list. ```APIDOC ## GET /api/v1/tags ### Description Returns an empty list. ### Method GET ### Endpoint /api/v1/tags ### Response #### Success Response (200) - Empty list. ``` -------------------------------- ### POST /api/admin/tasks/extensions/run Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Starts the scheduled extensions check. Answers `{ ok: false, error: 'busy' }` while one is running, and `not_configured` when there is no engine. ```APIDOC ## POST /api/admin/tasks/extensions/run ### Description Starts the scheduled extensions check. Answers `{ ok: false, error: 'busy' }` while one is running, and `not_configured` when there is no engine. ### Method POST ### Endpoint /api/admin/tasks/extensions/run ### Response #### Success Response (200) - **ok** (boolean) - Whether the task started successfully. #### Error Response (409) - **ok** (boolean) - Always `false`. - **error** (string) - `busy` when a check is already running, `not_configured` when no engine is configured. #### Response Example { "ok": true } ``` -------------------------------- ### GET /api/v1/readlists/:id Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Returns 404 in both directions. ```APIDOC ## GET /api/v1/readlists/:id ### Description Returns 404 in both directions. ### Method GET ### Endpoint /api/v1/readlists/:id ### Parameters #### Path Parameters - **id** (string) - Required - Readlist ID. ### Response #### Error Response (404) - Not found. ``` -------------------------------- ### GET /api/v1/readlists Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Returns an empty page on purpose. ```APIDOC ## GET /api/v1/readlists ### Description Returns an empty page on purpose. ### Method GET ### Endpoint /api/v1/readlists ### Response #### Success Response (200) - Empty page. ``` -------------------------------- ### Set LIBRARY_PATH and start Uchiyomi with Docker Compose Source: https://github.com/angelosha/uchiyomi/blob/main/docs/INSTALL.md Use this bash command to point Uchiyomi at your existing manga library. By default, Uchiyomi runs as its own user and cannot write to your files; set PUID/PGID to your own ids (id -u, id -g) to allow renaming folders and deleting chapters. ```bash echo "LIBRARY_PATH=/path/to/your/manga" > .env docker compose up -d ``` -------------------------------- ### POST /api/admin/extensions/sources/bulk Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Switches every matching source in one statement and one registry reload. Takes `{ ids?, langs?, enabled }` (at least one selector). ```APIDOC ## POST /api/admin/extensions/sources/bulk ### Description Switches every matching source in one statement and one registry reload. Takes `{ ids?, langs?, enabled }` (at least one selector). ### Method POST ### Endpoint /api/admin/extensions/sources/bulk ### Parameters #### Request Body - **ids** (array of string) - Optional - Source IDs to switch. - **langs** (array of string) - Optional - Language codes to switch. - **enabled** (boolean) - Required - Whether to enable or disable the matching sources. ### Response #### Success Response (200) - **changed** (number) - Number of rows that actually flipped. - **hiddenLangs** (array) - Hidden languages. - **registered** (number) - Number of registered sources. - **skipped** (number) - Number of skipped sources. #### Response Example { "changed": 3, "hiddenLangs": ["en"], "registered": 10, "skipped": 0 } ``` -------------------------------- ### GET /api/v1/genres Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Returns real genres over the browsable series. ```APIDOC ## GET /api/v1/genres ### Description Returns real genres over the browsable series. ### Method GET ### Endpoint /api/v1/genres ### Response #### Success Response (200) - List of genres. ``` -------------------------------- ### GET /api/v1/books Source: https://github.com/angelosha/uchiyomi/blob/main/docs/api.md Returns an empty page. There is no chapter-level search. ```APIDOC ## GET /api/v1/books ### Description Returns an empty page. There is no chapter-level search. ### Method GET ### Endpoint /api/v1/books ### Response #### Success Response (200) - Empty page. ```