Ship
You build an unsigned SPK, check it without installing, install it on a NAS with deploy or Manual Install, and read its state with status. The CLI does not sign, publish or submit a package.
Set it up
Section titled “Set it up”synopkgland checksynopkgland build --arch x86_64build writes dist/<package>-<version>-<build>-<arch>.spk, for example dist/MyApp-0.1.0-0001-x86_64.spk. Without --arch it builds every architecture in arches. --out-dir changes the folder. -o names one file and needs one --arch.
| Project | Architectures | Output |
|---|---|---|
native-go, binary | x86_64, aarch64, armv7 | One SPK per architecture. The architecture must be in arches. init -t native-go does not put armv7 in arches; add it yourself before you build for or deploy to an armv7 NAS. |
compose | x86_64, aarch64 | One SPK named <package>.spk. With the web gateway, one SPK per architecture: <package>-x86_64.spk and <package>-aarch64.spk. |
Install the Vue UI dependencies with npm install in frontend/ before the first build. See Quick start.
Inspect
Section titled “Inspect”synopkgland inspect dist/MyApp-0.1.0-0001-x86_64.spkinspect reads the SPK and does not install it. Its first section checks the DSM 7 package format and lists each error and warning with an SPK rule code. For an SPK that synopkgland built, a second section checks the build contract and reports the package and version, the platforms, whether the SPK is signed, the capabilities and which of them need administrator approval, the files, and which directories to review after an uninstall. It fails when either section finds an error; warnings alone do not fail.
inspect also checks an SPK that another tool built. It runs only the DSM format section for it. See Package scripts and interpreted languages.
Deploy
Section titled “Deploy”synopkgland deploy --dry-run --arch x86_64synopkgland deploy --host my-nas--dry-run prints the plan and never connects. deploy --host builds one SPK for one architecture, installs it, and prints the status. --host is required (HOST_REQUIRED).
--host takes a synoagentcli profile name, the host name or URL of a profile, or a bare host name. The CLI finds credentials in this order:
| Order | Source |
|---|---|
| 1 | The profile in ~/.synoagentcli/setting.json, when it has a URL, user name and password. |
| 2 | A profile with only a URL: DSM_PASSWORD, and DSM_USERNAME (default admin). |
| 3 | No profile: DSM_URL and DSM_PASSWORD, and DSM_USERNAME (default admin). A bare --host value becomes http://<host>:5000. |
The CLI reads a .env file in the current folder or a parent folder. It does not override variables that are already set. Keep .env out of version control. NAS_CREDENTIALS_MISSING means none of these sources gave a password.
Without --arch, deploy reads the CPU vendor from the NAS:
| CPU vendor | Architecture |
|---|---|
| Intel, AMD | x86_64 |
| Realtek, Rockchip | aarch64 |
| Annapurna | armv7 |
| Any other | Fails with DEPLOY_ARCH_UNDETERMINED. Pass --arch. |
native-go and binary projects refuse the Compose options --share, --run-as and --param (CLI_OPTION_INVALID) and --dev (DEVELOPMENT_INSTANCE_UNSUPPORTED).
Read the status and logs
Section titled “Read the status and logs”synopkgland status --host my-nassynopkgland logs --host my-nasstatus prints the installed state, the DSM status (or NOT_INSTALLED), the Open URL, and one state per declared capability: ready, needs-admin-approval, unsupported or blocked. See Capabilities. Add --json for {ok, command, data}. An error is {ok: false, code, message, hint}.
logs prints the Package Center status of the package, one line per row, and then the package name and readiness. It is not an application log. It runs synoagentcli, so that tool must be installed even when you use DSM_* variables. It returns NOT_INSTALLED when the package is not installed. logs has no --json.
For an existing native product, deploy builds and installs the SPK for the NAS architecture, and status reports its installed state. logs does not work on it.
Use it
Section titled “Use it”Version and upgrade
Section titled “Version and upgrade”| Field | Rule |
|---|---|
version | Digits separated by dots, up to four parts, such as 0.1.0 or 1.2.3.4. |
build | An integer from 1 to 9999. |
The package version is <version>-<build> with the build padded to four digits, for example 0.1.0-0001. Package Center shows it and the SPK file name contains it.
deploy compares your version with the installed one. It installs when version is higher, or when version is the same and build is higher than the installed build. The same version with the same or a lower build fails with DEPLOY_VERSION_INVALID. A lower version fails with DEPLOY_VERSION_INVALID and the message “Refusing downgrade”. Raise build for every SPK you hand to someone, and version for a feature release.
For a Compose project, deploy picks the next build number for you. An upgrade keeps the app data. See Data and removal. If the package uses delegate or root-ops, an upgrade pauses the executor and resumes it only when the approved pins still match. Otherwise an administrator approves again. See Capabilities.
Hand the SPK to someone else
Section titled “Hand the SPK to someone else”- Send the
.spkfor the NAS CPU.inspectlists the platforms inside. - On the NAS, choose Manual Install in Package Center and pick the file.
- The SPK is unsigned, so DSM may warn before it installs. Continue only if you trust where the file came from.
- For
delegateorroot-ops, a DSM administrator opens the app and approves once.
The CLI has no command that submits to Package Source or any other catalog. Users can add https://packages.synopkgland.com/ in Package Center to install the packages that are already listed there.
Limits
Section titled “Limits”| Limit | Value |
|---|---|
| Signing | The SPK is always unsigned. |
deploy | One architecture per run. |
| Minimum DSM | os_min_ver in dsm-package.yaml. Default 7.1-42661 for native-go and binary, 7.2.1-69057 for compose. --min-dsm on init and build accepts 7.0, 7.1, 7.2, 7.2.1 or a full 7.x-build value. |
| Compose build tools | A web gateway build needs Go 1.21 or later and builds with exactly Go 1.26.9 (GATEWAY_GO_MISSING). |
| Existing native products | build, check and inspect only. Their build range is 1 to 2147483647. |
Troubleshooting
Section titled “Troubleshooting”| Symptom or code | Cause | Fix |
|---|---|---|
STANDALONE_UI_BUILD_FAILED | The UI build failed, or its dependencies are not installed. | Run npm install in frontend/, then build again. |
STANDALONE_GO_MISSING | go is not on your path. | Install Go 1.25 or later. |
STANDALONE_ARCH_NOT_DECLARED | --arch names an architecture that is not in arches. | Add it to arches in dsm-package.yaml. |
HOST_REQUIRED | deploy, status or logs has no --host. | Pass --host, or use deploy --dry-run. |
NAS_CREDENTIALS_MISSING | No profile, and no DSM_URL and DSM_PASSWORD. | Create a synoagentcli profile or set the variables. |
DEPLOY_ARCH_UNDETERMINED | The NAS CPU vendor is not recognized. | Pass --arch x86_64, aarch64 or armv7. |
DEPLOY_VERSION_INVALID | version is the same as the installed one and build is not higher. | Raise build, or version. |
DEPLOY_VERSION_INVALID with “Refusing downgrade” | version is lower than the installed one. | Raise version above the installed one. |
NOT_INSTALLED from logs | The package is not installed on that NAS. | Run deploy first. |
blocked for delegate or root-ops | status cannot match the installed version to a built SPK. | Build the installed version in this project (dist/<package>-<version>-<arch>.spk), then run status again. |
Look up any other code in Errors.