dsm-package.yaml reference
dsm-package.yaml describes a native-go or binary project. This example passes check in a native-go project created with --with files,jobs,login --package MyApp.
schema: 2package: MyAppversion: "0.1.0"build: 1displayname: My Appdescription: A native DSM package with files, jobs, and login.maintainer: Your Nameos_min_ver: "7.1-42661"arches: [x86_64, aarch64]
# Go backend; a binary project uses kind: binary and files.backend: kind: go dir: backend main: ./cmd/app
# Build the frontend before copying its output.ui: dir: frontend/dist build: cwd: frontend command: [pnpm, run, build]
# CLI login writes identity.capabilities: files: session jobs: {worker: sha256-v1} identity: standalone # Add root scripts with synopkgland add root-ops. # rootOps: true # Add delegate with synopkgland add delegate; see capabilities.delegate.
# Catalogs and glossary from the template.i18n: messages: i18n/messages glossary: i18n/glossary.json info: zh-TW: displayname: 我的 App description: 提供檔案、背景工作與登入功能的 DSM 套件。
# Select a Shared Folder at install time.install: sharedFolder: mode: select key: shared permission: rw
# Optional publisher information.metadata: license: MIT contact_email: you@example.com homepage: https://example.com
# Optional entry policy.# entry: app-privilege
# Optional Portal; DSM 7.1 needs an executor.# portal: {alias: my-app}
# Optional foreground service.# With jobs it also needs an until-revoked delegate.# daemon:# exec: bin/service# targets: {x86_64: daemon/x86_64, aarch64: daemon/aarch64}# args: []# env: {}# timeouts: {start: 30, stop: 30, status: 5, uninstall: 60}# uninstall_args: [cleanup]Top-level fields
Section titled “Top-level fields”Defaults are parser defaults; template values are marked. A Compose project cannot declare backend (PROJECT_RUNTIME_EXCLUSIVE); unknown keys raise STANDALONE_FIELD_UNKNOWN (errors). Every path must be nonempty, relative and inside the project (STANDALONE_PATH_INVALID, STANDALONE_PATH_OUTSIDE_PROJECT).
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
schema | integer | Yes | — | Exactly 2; STANDALONE_SCHEMA_INVALID. |
package | string | Yes | — | Matches ^[A-Za-z][A-Za-z0-9]{1,63}$; STANDALONE_PACKAGE_INVALID. |
version | string | Yes | — | One to four numeric dot-separated parts, quoted; STANDALONE_VERSION_INVALID. |
build | integer | Yes | — | 1–9999, appended as four digits; STANDALONE_BUILD_INVALID. |
displayname | string | Yes | — | Nonempty single line, no quotes or backslashes; STANDALONE_TEXT_INVALID. |
description | string | Yes | — | Same text rule; STANDALONE_TEXT_INVALID. |
maintainer | string | Yes | — | Same text rule; STANDALONE_TEXT_INVALID. |
os_min_ver | string | Yes | Template: 7.1-42661 | ^\d+\.\d+(\.\d+)?-\d+$; STANDALONE_OS_MIN_VER_INVALID; floors: platforms. |
arches | string[] | Yes | Template: [x86_64, aarch64] | Nonempty unique x86_64, aarch64, armv7; STANDALONE_ARCHES_INVALID. |
backend | object | Yes | — | Go source or per-architecture CGI binaries; STANDALONE_BACKEND_INVALID. |
ui | object or false | Yes | — | Static output dir and optional build command, or false for an identity_gateway App without an SDK window; STANDALONE_UI_INVALID. |
icon | path | No | SDK default | Square PNG ≥256×256 or icon_<size>.png (16–256, icon_256.png required, smaller sizes scaled); SVG refused. Build writes PACKAGE_ICON.PNG, PACKAGE_ICON_256.PNG and ui/images/app_<size>.png, each within the source’s 256 KiB; check/inspect report custom or default; STANDALONE_ICON_INVALID. |
capabilities | object | No | {} | Explicit declarations; invalid names or values: CAPABILITY_INVALID. |
i18n | object | No | None | Catalogs, glossary and translated Package Center text; STANDALONE_I18N_INVALID. |
daemon | object | No | None | Fixed foreground service; STANDALONE_DAEMON_INVALID. |
ctl | object | No | Disabled | Explicit API v1 commands, aliases and schemas; see Expose App commands. |
compose | object | No | None | Upstream Compose policy: no backend/daemon, web uses identity_gateway, headless omits it; optional composeMounts; DSM >= 7.2.1. |
identity_gateway | object | No | None | Signs DSM users into the daemon’s web UI; needs daemon or compose. See identity_gateway; STANDALONE_IDENTITY_GATEWAY_INVALID. Provider-only OIDC uses upstream_access: public; launch_path fixes the local menu destination. |
console | object | No | None | Native App with identity_gateway only: URL launcher plus administrator-only console; excludes Compose, ui.launch and portal. See Native UI and DSM console. |
install | object | No | None | sharedFolder selects a bounded share; settings declares private https-origin inputs with labels and explicit required, reused on upgrade or keep-data reinstall and bindable in Compose as {setting: key}; INSTALL_SETTINGS_INVALID. |
entry | string | No | API permissions policy | admin-only or app-privilege; STANDALONE_ENTRY_INVALID. |
portal | object | No | Disabled | {} or {alias: ...}; DSM 7.2-64570+ without executor, 7.1 with executor registration; STANDALONE_PORTAL_INVALID. |
login_style | object | No | CLI default | Login Portal colour, wallpaper and title image; needs portal. See login_style; STANDALONE_LOGIN_STYLE_INVALID, STANDALONE_LOGIN_STYLE_IMAGE_INVALID. |
root | object | No | None | root/ program settings: programs.<name> (kind, schema, run, job), stop (run at stop and upgrade) and state: true (root-only /volumeN/@synopkgland/<package> kept across upgrades). Needs capabilities.rootOps: true; STANDALONE_ROOT_PROGRAMS_INVALID; the executor must support them (EXECUTOR_ROOT_PROGRAMS_UNSUPPORTED). |
uninstall | object | No | None | purge (exec, args, env, timeout 2–3600 s, optional root) runs as the package account before the executor purge; state.items[].key lists deletable state with an uninstall.state.<key> text; UNINSTALL_INVALID. |
metadata | object | No | None | Publisher text, links and screenshots; STANDALONE_TEXT_INVALID. |
reproducible | object | No | None | build --verify-reproducible: inputs lists fingerprint dependency files, clean lists paths deleted before the second build (may use {arch}); see reproducible builds; REPRODUCIBLE_INVALID. |
backend
Section titled “backend”| Field | Type | Required | Default | Rule |
|---|---|---|---|---|
kind | string | Yes | — | go or binary; STANDALONE_BACKEND_INVALID. Unknown backend keys raise the same code. |
dir | path | For Go | — | Source directory; path rules apply. backend/internal/api/permissions.json must be valid; STANDALONE_API_PERMISSIONS_INVALID. |
main | string | No; Go only | ./cmd/app | Matches ^\./[A-Za-z0-9_./-]*$, no ..; STANDALONE_BACKEND_INVALID. |
files | architecture map | For binary | — | Exactly the declared architectures; missing: STANDALONE_BINARY_ARCH_MISSING; extra: STANDALONE_BACKEND_INVALID; path rules apply. |
| Binary rule | Error |
|---|---|
| File must exist. | STANDALONE_BINARY_MISSING |
| File must be regular, not a symlink or directory. | STANDALONE_BINARY_NOT_REGULAR |
| Resolved file must stay inside the project. | STANDALONE_PATH_OUTSIDE_PROJECT |
| Maximum size: 256 MiB. | STANDALONE_BINARY_TOO_LARGE |
| Little-endian Linux ELF with the correct bit width. | STANDALONE_BINARY_NOT_ELF |
| ELF machine must match the architecture. | STANDALONE_BINARY_ARCH_MISMATCH |
| Static linking; no dynamic interpreter. | STANDALONE_BINARY_DYNAMIC |
| Field | Type | Required | Default | Rule |
|---|---|---|---|---|
dir | path | Yes | — | Must contain app.js and app.css at build time; STANDALONE_UI_ENTRY_MISSING; path rules apply. |
build | object | With identity | None | capabilities.identity requires a build declaration; CAPABILITY_COMBINATION_INVALID. |
build.cwd | path | With build | — | Working directory; path rules apply. |
build.command | string[] | With build | — | Nonempty array of nonempty strings, run as arguments without a shell; STANDALONE_UI_BUILD_INVALID. |
ui: false omits the SDK window; the URL launcher and Package Center Open then use sso/open.cgi. It cannot combine with console, portal or rootOps, delegate, webapi, identity (STANDALONE_UI_NO_WINDOW_INVALID). See native gateway without an SDK window.
capabilities
Section titled “capabilities”CLI login writes identity; CLI root-ops writes rootOps.
| Field | Type | Required | Default | Rule |
|---|---|---|---|---|
files | string | No | Disabled | Only session; binary rejects it (CAPABILITY_UNSUPPORTED); else CAPABILITY_INVALID. |
jobs | boolean or object | No | Disabled | true or {worker: sha256-v1}, no other object keys; binary rejects it with CAPABILITY_UNSUPPORTED; invalid: CAPABILITY_INVALID. |
identity | string | No | Disabled | Only standalone; needs a UI build declaration (CAPABILITY_COMBINATION_INVALID); binary: CAPABILITY_UNSUPPORTED; else CAPABILITY_INVALID. |
rootOps | boolean | No | Disabled | Only true; needs valid root/*.sh files; else CAPABILITY_INVALID. Running operations needs administrator approval. |
delegate | object | No | Disabled | Enables jobs automatically; invalid policy CAPABILITY_INVALID; binary CAPABILITY_UNSUPPORTED; administrator approval required. |
capabilities.rootOps
Section titled “capabilities.rootOps”Place only fixed operation scripts in root/.
| Rule | Error |
|---|---|
| At least one script is required when enabled. | STANDALONE_ROOT_OPS_MISSING |
A root/ directory requires rootOps: true. | STANDALONE_ROOT_OPS_UNUSED |
Each filename matches ^[a-z][a-z0-9_]{0,31}\.sh$; only regular files, no symlinks. | STANDALONE_ROOT_OP_INVALID |
Each script is at most 16 KiB and starts with #!/bin/sh and a newline; valid UTF-8, no NUL bytes. | STANDALONE_ROOT_OP_INVALID |
Minimum DSM: 7.1-42661. | STANDALONE_OS_MIN_VER_INVALID |
capabilities.delegate
Section titled “capabilities.delegate”init --with delegate and add delegate write {scope: install-selected, operations: [files.moveFromStaging], destinations: [save], lifetime: until-revoked}; this is a CLI-generated declaration, not a parser default.
| Field | Type | Required | Default | Rule |
|---|---|---|---|---|
scope | string | Yes | CLI: install-selected | home, shared:<name> or install-selected. Shared names cannot contain slashes, backslashes, control characters, colons, edge whitespace, or equal . / ... install-selected needs until-revoked; CAPABILITY_INVALID. |
operations | string[] | Yes | CLI: [files.moveFromStaging] | Nonempty unique list. With until-revoked, exactly [files.moveFromStaging]. Without lifetime and destinations, choose from files.list, files.info, files.createFolder, files.checkPermission, files.write; CAPABILITY_INVALID. |
destinations | string[] | With until-revoked | CLI: [save] | 1–64 unique keys matching ^[a-z][a-z0-9_-]{0,63}$; CAPABILITY_INVALID. Omit with lifetime. |
lifetime | string | With destinations or moveFromStaging | CLI: until-revoked | Only until-revoked; omit for the other listed operations; CAPABILITY_INVALID. |
daemon
Section titled “daemon”| Field | Type | Required | Default | Rule |
|---|---|---|---|---|
exec | string | With an executable daemon | — | Payload-relative; ≤200 characters, no . / .. segments; letters, digits, _, -, and . after the first segment; STANDALONE_DAEMON_INVALID. |
targets | architecture map | With an executable daemon | — | One directory per declared architecture: relative, nonempty, inside the project, no .. or NUL; STANDALONE_DAEMON_INVALID. |
args | string[] | No | [] | ≤64 strings of ≤4096 bytes without NUL; only ${SYNOPKG_PKGDEST} and ${SYNOPKG_PKGVAR}; STANDALONE_DAEMON_INVALID. |
uninstall_args | string[] | No | None | Same rules, nonempty if present; runs after stop on uninstall; STANDALONE_DAEMON_INVALID. |
env | string map | No | {} | ≤64 entries; values use the argument rules; STANDALONE_DAEMON_INVALID. |
env.<name> | string | No | — | Key matches ^[A-Z][A-Z0-9_]{0,63}$. Rejects PATH, HOME, TMPDIR, ENV, BASH_ENV, SHELLOPTS, BASHOPTS, GODEBUG, GOTRACEBACK, LD_*, DYLD_*, SYNOPKG_*; STANDALONE_DAEMON_INVALID. |
timeouts | object | No | {start: 30, stop: 30, status: 5, uninstall: 60} | Only the four keys below; STANDALONE_DAEMON_INVALID. |
timeouts.start | integer seconds | No | 30 | How long start waits for the daemon to stay up; 2–3600; STANDALONE_DAEMON_INVALID. |
timeouts.stop | integer seconds | No | 30 | One allowance covers lock, dispatch, TERM, reap and inventory retirement; 2–3600; STANDALONE_DAEMON_INVALID. |
timeouts.status | integer seconds | No | 5 | 1–3600; STANDALONE_DAEMON_INVALID. |
timeouts.uninstall | integer seconds | No | 60 | How long uninstall_args may run after stop and before SIGTERM; independent of stop; 2–3600; STANDALONE_DAEMON_INVALID. |
Measure on a loaded NAS: a scrub or large copy can push a start past 5 seconds and a revoke past 9, so allow twice the slowest time; a higher timeout only makes DSM wait longer when something hangs. DSM allows 3600 seconds for start and stop; the preuninst bound is unknown.
| Combination or payload rule | Error |
|---|---|
Jobs may coexist with daemon only with delegate.lifetime: until-revoked. | CAPABILITY_COMBINATION_INVALID |
| Payload directories hold only regular files and directories, stay in the project, have no symlinks or setuid/setgid files, and total ≤512 MiB. | STANDALONE_DAEMON_PAYLOAD_INVALID |
| Executable must pass the binary file rules. | Binary errors listed above |
identity_gateway
Section titled “identity_gateway”Put the identity gateway in front of the daemon’s web UI; every rule below raises STANDALONE_IDENTITY_GATEWAY_INVALID.
| Field | Type | Required | Default | Rule |
|---|---|---|---|---|
sdk | string | Yes | — | SDK release (x.y.z) built from; it must contain the gateway, else STANDALONE_IDENTITY_GATEWAY_BUILD_FAILED. |
mode | string | Yes | — | none (retain App login), oidc, header or token. |
upstream | integer | Daemon only | — | Native loopback port; Compose derives a fixed bridge IP/container port, so omit it. |
listen.http, listen.https | integer | At least one | — | Ports distinct from upstream and oidc.issuer_port, not 5000 or 5001. |
passthrough | string[] | No | [] | Prefixes forwarded without sign-in, such as /share/; absolute paths without . or .., not / or under /_sso; ≤64. |
redirects | path map | No | {} | A key-path request redirects to the value path; both local. |
email_domain | string | No | nas.invalid | Domain of generated email addresses. |
session_ttl | integer seconds | No | 3600 | Session lifetime in header and token modes. 60–86400. |
roles | object | No | {claim: groups, admin: admin} | claim: claim name in oidc mode. admin: DSM administrator value. user: other users; omitted means none. Values match ^[A-Za-z0-9_.:-]{1,64}$. |
headers | object | header mode: user | — | Names for user, email, name, groups and uid, matching ^[A-Za-z0-9][A-Za-z0-9-]{0,63}$. |
oidc.issuer_port | integer | oidc mode | — | Provider port on 127.0.0.1. |
oidc.clients[] | object[] | oidc mode | — | 1–16 clients with unique id. |
oidc.clients[].id | string | Yes | — | Matches ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$; secret SYNOPKGLAND_SSO_SECRET_<ID>. |
oidc.clients[].redirect_paths | string[] | One of these two | [] | Local paths; the redirect URI is the opened address plus one. |
oidc.clients[].native_redirects | string[] | One of these two | [] | Exact custom-scheme redirect URIs for mobile apps. http, https, javascript, data, vbscript, file, blob and about are refused. |
oidc.clients[].pkce | boolean | No | false | true requires an S256 challenge. |
oidc.clients[].roles | object | No | Top-level roles | Same shape, for this client. |
oidc.rewrite_json[] | object[] | No | [] | {method, path, field}: rewrite an issuer URL in the app’s JSON answer to /_sso/authorize on the opened address, for apps that start sign-in from JSON. |
token.exec | string | token mode | — | A program in every daemon payload, with daemon.exec path rules. |
token.args | string[] | No | [] | Arguments for token.exec. |
account.on_delete[] | object[] | No | None | At most 16 actions in order when a signed-in DSM account is deleted. See Deleted DSM accounts. |
account.on_delete[].remove | string | One of these two | — | Relative path under /var/packages/<package>/var with {uid} or {name}: segments A-Z a-z 0-9 _ . - { }, no . or .., not under sso/. |
account.on_delete[].exec | string[] | One of these two | — | A program in every daemon payload, with daemon.exec path rules, then arguments; {uid} and {name} are the only placeholders, only in arguments. |
| Combination or payload rule | Error |
|---|---|
A native app needs daemon; a container app declares compose instead. For native apps the gateway becomes the daemon’s executable, runs daemon.exec with args as its child, and uninstall_args runs the app directly. | STANDALONE_IDENTITY_GATEWAY_INVALID |
Daemon payloads do not contain _sso/, where the gateway is installed. | STANDALONE_IDENTITY_GATEWAY_INVALID |
install.sharedFolder
Section titled “install.sharedFolder”Select or create a Shared Folder; neither mode deletes it on uninstall.
| Field | Type | Required | Default | Rule |
|---|---|---|---|---|
mode | string | Yes | — | select or create; STANDALONE_SHARED_FOLDER_INVALID. |
key | string | Yes | CLI init: shared | Matches ^[a-z][a-z0-9_]{0,31}$; cannot start with pkgwizard_, synopkg or change_; STANDALONE_SHARED_FOLDER_INVALID. |
name | string | With create only | — | Matches ^[A-Za-z0-9][A-Za-z0-9_-]{0,31}$; DSM names such as homes, users, volume1, usbshare1 are refused. Forbidden with select; STANDALONE_SHARED_FOLDER_INVALID. |
permission | string | Yes | CLI init: rw | ro or rw. Select mode needs an administrator to grant the package account access after installation; create mode grants it through DSM; STANDALONE_SHARED_FOLDER_INVALID. |
Catalog locales and DSM language codes are in platforms.
| Field | Type | Required | Default | Rule |
|---|---|---|---|---|
messages | path | With glossary | None | <locale>.json catalog directory; path rules apply. Missing English: STANDALONE_I18N_MESSAGES_MISSING; unsupported locale: STANDALONE_I18N_LOCALE_UNSUPPORTED. |
glossary | path | No | None | JSON glossary; needs messages (STANDALONE_I18N_INVALID); path rules apply; invalid: STANDALONE_I18N_GLOSSARY_INVALID. |
info | locale map | No | {} | Supported locales except en; English uses top-level text; unknown keys or locale: STANDALONE_I18N_INVALID. |
info.<locale>.displayname | string | No | Top-level text | Same single-line rule as displayname; STANDALONE_TEXT_INVALID. |
info.<locale>.description | string | No | Top-level text | Same single-line rule as description; STANDALONE_TEXT_INVALID. |
info also names the app in DSM: with a translation the build writes ui/texts/<DSM language>/strings and points the main-menu entry and window title at them. A locale without its own text shows English; without info the title stays English.
| Catalog or glossary field | Type | Required | Default | Rule |
|---|---|---|---|---|
| Catalog message key | string | Per message | — | Flat JSON object; dotted keys match ^[A-Za-z][A-Za-z0-9_-]*(\.[A-Za-z0-9_-]+)*$, values are strings; STANDALONE_I18N_CATALOG_INVALID. |
| Catalog key set | string keys | Yes | English keys | Exactly the en.json keys; STANDALONE_I18N_KEYS_MISMATCH. |
| Catalog placeholders | {placeholder} set | Yes | English placeholders | Same placeholders in each translated message; STANDALONE_I18N_PLACEHOLDER_MISMATCH. |
terms | object[] | Yes in glossary | — | JSON array; STANDALONE_I18N_GLOSSARY_INVALID. |
terms[].id | string | Yes | — | Term identifier; STANDALONE_I18N_GLOSSARY_INVALID. |
terms[].text | locale map | Yes | — | Supported locales, nonempty text; STANDALONE_I18N_GLOSSARY_INVALID. |
terms[].keys | string[] | No | [] | Existing English keys; STANDALONE_I18N_GLOSSARY_INVALID. Each listed translation needs its locale’s term, ignoring case; STANDALONE_I18N_GLOSSARY_MISMATCH. |
| Value or rule | Effect |
|---|---|
admin-only | Only administrators enter; administrators floor every route, including those a capability adds, and others do not see the launcher. A permissions.json route marked authenticated or public raises STANDALONE_ENTRY_WIDENED. |
app-privilege | Checks DSM Application Privileges; needs an authenticated route in permissions.json, else STANDALONE_ENTRY_INVALID. |
| Omitted | Uses the API permissions policy. |
| Any other value | STANDALONE_ENTRY_INVALID. |
| Backend prerequisite | Go backend with the entry gate wired in main.go; missing support or a binary backend: STANDALONE_ENTRY_UNSUPPORTED. |
portal
Section titled “portal”{} enables Application Portal with a generated alias.
| Field | Type | Required | Default | Rule |
|---|---|---|---|---|
alias | string | No | Lowercase package ID, or app- plus a stable hash if reserved | 1–64 lowercase letters, digits and hyphens, starting and ending with a letter or digit. Unknown keys or invalid alias: STANDALONE_PORTAL_INVALID. |
| Reserved alias | string | — | — | dsfile, indexdb, mobile, oauth, scripts, sharing, ssdp, synosdsjslib, synohdpack, webapi, webman, calendar, chatplus, contacts, drive, file, photo, sso, synologymeet; STANDALONE_PORTAL_INVALID. |
| Minimum DSM | version/build | Yes when enabled | — | 7.1-42661; STANDALONE_PORTAL_MIN_DSM. |
| Executor | capability | Below DSM 7.2-64570 only | — | rootOps, delegate or webapi; STANDALONE_PORTAL_REQUIRES_EXECUTOR. |
login_style
Section titled “login_style”A portal App carries a DSM login style for the alias login page and its Control Panel > Login Portal > Applications thumbnail. Without login_style the CLI uses its neutral default with the App icon as the title; check and inspect print the style.
| Field | Type | Required | Default | Rule |
|---|---|---|---|---|
color | string | No | #2F6BD8 | #RRGGBB; STANDALONE_LOGIN_STYLE_INVALID. |
wallpaper | path | No | CLI default | JPEG inside the project, ≥1920×1080 and ≤2 MiB; set with wallpaper_thumbnail. STANDALONE_LOGIN_STYLE_IMAGE_INVALID. |
wallpaper_thumbnail | path | With wallpaper | CLI default | 320×200 JPEG inside the project; STANDALONE_LOGIN_STYLE_IMAGE_INVALID. |
title | path | No | App icon | 680×124 PNG inside the project; STANDALONE_LOGIN_STYLE_IMAGE_INVALID. |
login_style without portal, or any other key: STANDALONE_LOGIN_STYLE_INVALID.
metadata
Section titled “metadata”All fields are optional; invalid values raise STANDALONE_TEXT_INVALID.
| Field | Type | Required | Default | Rule |
|---|---|---|---|---|
long_description | string or locale map | No | None | Text rules below; STANDALONE_TEXT_INVALID. |
changelog | string or locale map | No | None | Text rules below; the English entry supplies INFO text, else the first entry; STANDALONE_TEXT_INVALID. |
contact_email | string | No | None | Email with a dotted domain, no whitespace; STANDALONE_TEXT_INVALID. |
support_email | string | No | None | Same email rule; supplies a mailto: link when support_url is absent; STANDALONE_TEXT_INVALID. |
upstream | object or HTTPS URL | No | None | {name, url, license?}; URL shorthand is normalized to that catalog object; enables attribution warnings. |
homepage, source_url, issues_url, maintainer_url, distributor_url, helpurl | string | No | None | URL rules below; STANDALONE_TEXT_INVALID. |
license, distributor | string | No | None | Text rules below; STANDALONE_TEXT_INVALID. |
support_url | string | No | None | HTTP(S) URL or valid mailto: address; STANDALONE_TEXT_INVALID. |
screenshots | string[] | No | None | At most 5 https:// URLs of PNG or JPG images; STANDALONE_TEXT_INVALID. |
screenshots_mobile | string[] | No | None | Phone screenshots under the same rules; the App page shows them in a Mobile tab, and Package Center shows only screenshots. |
For upstream Apps, set metadata.upstream to {name, url} (or an HTTPS repository URL), name the original project as maintainer, yourself as metadata.distributor / metadata.distributor_url; maintainer_url points upstream. check warns on incomplete attribution; resolve TODOs before release.
| Metadata rule | Limit |
|---|---|
| Text values | ≤16,000 characters; no control characters except tab, newline and carriage return; STANDALONE_TEXT_INVALID. |
| Locale maps | ≤32 entries; keys match ^[a-z]{2}(-[A-Za-z]{2})?$; values use the text rules; STANDALONE_TEXT_INVALID. |
| URLs | HTTP(S), ≤2048 characters, no username or password; STANDALONE_TEXT_INVALID. |
| Entire object | JSON ≤32,000 characters; unknown keys refused; STANDALONE_TEXT_INVALID. |
compose with identity_gateway
Section titled “compose with identity_gateway”compose.files lists upstream Compose paths, with optional env_files and profiles, and compose.web: {service, port, health: {path, status}}. The SDK planner derives gateway ingress, so omit identity_gateway.upstream; use helpers only for packaged native helper targets. Headless Compose omits web and the gateway. Compose needs DSM >= 7.2.1, no daemon or backend, and supports only explicit composeMounts. See Compose manifest and Container App.
Use the real health endpoint and expected 2xx status; readiness does not follow redirects. check validates the declaration, not runtime HTTP or UID/storage; Compose ctl is unsupported. See Integrating an existing open-source App for upstream wrapping.
Launch mode
Section titled “Launch mode”Native SDK Apps use ui.launch: dsm-window | new-page, defaulting to dsm-window. Frontends on @synopackageland/ui keep that mode; other native frontends declare new-page, as the plain and binary scaffolds do. A standalone page uses the DSM origin and keeps ctx.fullPage, ctx.appIcon, session/SynoToken, launch params and entry policy.
Omit portal unless an alias is required: a new page needs no defaultAlias, Portal panel or Web Station alias. Schema 2 compose with identity_gateway defaults to new-page with a standalone launcher and no Portal; an explicit ui.launch overrides it. Native SDK Apps without a web service default to dsm-window.
Native UI and DSM console
Section titled “Native UI and DSM console”A native App with identity_gateway opts in with console: {} or console: {title: ...} to get two DSM entries: the main-menu entry opens the native UI in a new tab through a URL launcher, and the second opens the SDK UI in an administrator-only DSM window named ”console needs identity_gateway and cannot combine with Compose, ui.launch or portal. inspect checks both launchers and INFO dsmapplaunchname.
Shared runtime budgets
Section titled “Shared runtime budgets”daemon.timeouts may hold only timeouts, without a daemon executable, for Compose and workers. Start, stop and uninstall accept 2–3600 seconds and status 1–3600; defaults are 30/30/60/5. backend.timeout_seconds (default 60, 1–3600) bounds request and operation work; binary and Compose Apps without a CGI setting can enlarge the operation allowance through daemon.timeouts.status, keeping at least 60 seconds.
uninstall.purge.timeout defaults to 60 seconds and accepts 2–3600, with TERM and reap reserve. Unconfirmed cleanup keeps pending state; an accepted request does not prove it finished. They do not extend session, token, grant, login-rate or WebSocket bounds, or prove that DSM permits the same outer time. Compose startup has its own budget (see Compose manifest). Changed approved policy, root programs, payloads or task definitions still require reapproval.
Native daemon restart policy
Section titled “Native daemon restart policy”daemon.restart covers a directly owned native foreground child; Compose keeps its own supervision. Without the object the SDK supervisor uses always: every unrequested exit, including exit zero and a signal, restarts the daemon with jittered exponential backoff.
daemon: restart: {mode: on-failure, initial_seconds: 1, max_seconds: 30, max_attempts: 5, window_seconds: 300}mode is required (off or on-failure); numeric fields use the shown defaults when omitted or zero. Delays accept 1–3600 seconds, max_seconds at least initial_seconds, attempts 1–100 and the window 1–86400 seconds. on-failure restarts a nonzero exit or a signal and lets a clean exit succeed; off never restarts. Backoff stays inside the sliding retry budget, and exhaustion reports DAEMON_RESTART_LIMIT with the daemon showing failed until an explicit start or restart. Requested stops, package stop, upgrade and uninstall never restart it; initial startup keeps its deadline and fail-fast behavior.
The controller SDK must support daemon restart policy, including for mode: off: Go Apps use their Go SDK requirement, gateway Apps identity_gateway.sdk, other native daemons the CLI’s pinned SDK. inspect verifies the normalized policy; see the daemon policy guide.