A client for the Synology DSM Web API, for
Jennifer programs: log in (with 2-step
verification and trusted devices), read the system summary, work with
File Station (shared folders, listing, creating, renaming, copying, moving,
deleting, upload and download), deploy and run virtual machines in Virtual
Machine Manager, manage local users, groups, shared folders and their
permissions, and administer the NAS: certificates, snapshots, health,
updates, power, packages, services, scheduled tasks and Hyper Backup.
Container Manager deploys Compose projects and runs containers. call reaches any other API under /webapi,
and DSM's numeric error codes come back as readable messages.
Infrastructure as Code (IaC). Users, groups, shared folders and their
permissions, services, virtual machines and Compose projects can be
provisioned from a Jennifer program kept in version control and reviewed like
any other code. The create verbs are not idempotent: createUser,
createShare, createGuest and createProject fail when the name exists. A
re-runnable script lists what exists first (users, shares, guests,
projects); setUserPassword, setSharePermission and setService can be
applied again. There is no plan or diff step, and the deck does not detect
drift.
jvc add @deckyard/synologyThis vendors the deck to vendor/<scope>/synology/. Without jvc, unpack the
src/ subtree of a release archive (<scope>-synology-<version>.tar.gz) there.
import "@deckyard/synology/" as synology;
def c as synology.Client init synology.client("nas.example.com");
$c = synology.withCaCert($c, fs.readBytes("nas.pem"));
$c = synology.login($c, "backup", "secret");
synology.mkdir($c, "/backup/2024", true);
synology.upload($c, "/backup/2024", "db.sql.gz", fs.readBytes("db.sql.gz"), true);
for (def f in synology.files($c, "/backup/2024")) {
io.printf("%s %d\n", $f.name, $f.size);
}
$c = synology.logout($c);
Jennifer 0.26.0 or newer, the default jennifer binary (not
jennifer-tiny), and the net capability. DSM 6.2 or newer; DSM 7 is the
main target, and Container Manager needs DSM 7.2.
tools/check-all.sh # the full gate, as CI runs it
jennifer test src/synology_test.j # the test overlay
tools/check-docs.sh # docs against the code
tools/pack.sh dist # build the release archiveLGPL-3.0-only, see LICENSE. Copyright (C) 2026 mplx <mplx@jennifer-lang.dev>.
tools/check-headers.sh checks every source file's SPDX header against
deck.toml.