Add a Login Portal address
An alias opens your app at https://<nas>/myapp/ after DSM sign-in. Declare portal in dsm-package.yaml; an administrator applies it.
Requirements
Section titled “Requirements”Portal needs DSM 7.2-64570 or later without an executor, or DSM 7.1-42661 with an approved one; below 7.2-64570 the executor registers the entry because DSM 7.1 rejects the unsigned web-config worker. add portal refuses a lower target without an executor.
os_min_ver: 7.2-64570portal: alias: myappAn alias is 1–64 lowercase letters, digits or hyphens, starting and ending with a letter or digit; without one, the default is the package name or app- plus 12 hex characters. The manifest reference lists the refused names.
Installation and removal
Section titled “Installation and removal”The installer suggests an alias; the entry stays off until an administrator applies it in Settings → Application Portal or Control Panel > Login Portal > Applications. DSM 7.1 has no alias step: the executor registers the entry. Apps targeting below DSM 7.2 expose the fixed portal.register and portal.unregister routes for Go, Rust, Python and Node, with executor approval as capabilities describes. A SynoToken never enables one.
Every Portal SPK includes instuninst_restart_services="nginx.service" in INFO: DSM removes the alias and reloads nginx asynchronously after uninstall, and on install and upgrade; no hook or executor cleanup does. If the old address keeps opening, save an application alias in Control Panel > Login Portal > Applications to request a reload.
Removing an entry from its own Portal page asks for confirmation; to restore it, open the DSM desktop, launch the app and choose Settings → Application Portal → Enable entry.
Open a Portal window
Section titled “Open a Portal window”Use the same NAS host you signed in to. The window fetches the SynoToken early: it prefers the desktop token, otherwise concurrent calls share a same-origin GET webman/login.cgi?enable_syno_token=yes under the Portal prefix with a five-second deadline; redirects, invalid responses and invalid tokens fail, and the token stays in memory. API and executor requests still need the DSM cookie and SynoToken; on a session error, sign in on the same host and reopen the app.
Use it
Section titled “Use it”Vue scaffolds include the Portal panel; a plain UI calls ctx.portal.mountPanel(element). ctx.portal exists only when portal is declared.
| Call | Result |
|---|---|
status() | {state, alias?, url?, canManage, controlPanel, defaultAlias}; state is active, inactive or unavailable. |
apply(alias) | Administrator sets an alias; returns the new status. |
disable() | Administrator turns the entry off; returns the new status. |
openControlPanel() | Opens Login Portal > Applications. |
Other signed-in users read portal.status and see the link or a request to contact an administrator.
Troubleshooting
Section titled “Troubleshooting”| Code | Action |
|---|---|
portal_alias_invalid, portal_alias_reserved, portal_alias_in_use | Choose a valid alias that no other app uses. |
admin_required | Ask a DSM administrator. |
portal_unavailable | Use Control Panel > Login Portal > Applications. |
STANDALONE_PORTAL_MIN_DSM, STANDALONE_PORTAL_REQUIRES_EXECUTOR | Use DSM 7.1-42661 with an executor or 7.2-64570 without. |
PORTAL_RELOAD_MISSING | Rebuild with the latest public CLI so INFO includes nginx.service. |
Codes are described in Errors.