Skip to content

DSM APIs and External Resources

This page provides links to official Synology documentation and resources for DSM package development.

Synology Package Developer Guide

The official Synology documentation for package development:

Section URL Description
Overview Getting Started Prerequisites and introduction
Package Structure Package Structure SPK file format
INFO File INFO File Package metadata
Scripts Scripts Lifecycle scripts
Privilege Privilege Configuration Service user and permissions

Resource Acquisition (DSM 7+)

Section URL Description
Overview Resource Acquisition Resource files overview
Data Share Data Share Shared folder permissions
Port Config Port Config Firewall port definitions
Web Service Web Service WebStation integration
MariaDB MariaDB 10 Database resources
PostgreSQL PostgreSQL PostgreSQL resources

DSM Integration

Section URL Description
DSM Integration DSM Integration Overview
Resource Files Resource Files DSM 7 resource worker
Package Center Package Center Package Center integration

Script Environment Variables

Synology provides standard environment variables in package scripts:

Variable Description
SYNOPKG_PKGNAME Package name
SYNOPKG_PKGVER Package version
SYNOPKG_PKGDEST Package installation directory
SYNOPKG_PKGVAR Package variable directory (/var/packages/<pkg>/var/)
SYNOPKG_DSM_VERSION_MAJOR DSM major version (e.g., 7)
SYNOPKG_DSM_VERSION_MINOR DSM minor version (e.g., 2)

For the complete list, see Script Environment Variables in the official documentation.

Source and Tools

Official Synology Resources

Resource URL Description
pkgscripts-ng GitHub Official build toolkit
GPL Source SourceForge Toolchains and kernel sources
Archive archive.synology.com Old DSM releases and toolchains

SynoCommunity Resources

Resource URL Description
spksrc Repository GitHub Main build framework
spkrepo GitHub Package repository server
Package Feed packages.synocommunity.com Official package repository

DSM Knowledge Base

General DSM administration and troubleshooting:

Topic URL
ACL Management KB Article
Package Center KB Article
SSH Access KB Article

DSM Version Reference

DSM 7.x

Version Status Key Changes
DSM 7.2 Current Stricter service management, new resource types
DSM 7.1 LTS Primary target for most packages
DSM 7.0 EOL Initial DSM 7 release

DSM 6.x

Version Status Key Changes
DSM 6.2.4 LTS Primary target for DSM 6 packages
DSM 6.2 Supported Last major DSM 6 release
DSM 6.1 EOL Deprecated
DSM 6.0 EOL Deprecated

Key DSM 7 vs DSM 6 Differences

Feature DSM 6 DSM 7
Service User Configurable sc-<pkgname> (fixed)
Package Trust Configurable Synology-signed only
Resource Files Basic Full support
Web Service conf/resource DSM 7.0+ only
Shared Folder Permissions Groups System internal users

See DSM 7 Migration Guide for migration details.