Skip to content
Syno Package Land
Language: English

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.

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-64570
portal:
alias: myapp

An 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.

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.

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.

Vue scaffolds include the Portal panel; a plain UI calls ctx.portal.mountPanel(element). ctx.portal exists only when portal is declared.

CallResult
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.

CodeAction
portal_alias_invalid, portal_alias_reserved, portal_alias_in_useChoose a valid alias that no other app uses.
admin_requiredAsk a DSM administrator.
portal_unavailableUse Control Panel > Login Portal > Applications.
STANDALONE_PORTAL_MIN_DSM, STANDALONE_PORTAL_REQUIRES_EXECUTORUse DSM 7.1-42661 with an executor or 7.2-64570 without.
PORTAL_RELOAD_MISSINGRebuild with the latest public CLI so INFO includes nginx.service.

Codes are described in Errors.