Dev Center
A friendly development platform for creative package design
Build Your Desired Packages on Synology NAS
Synology provides a friendly and flexible development platform, whether you’re a system integration distributor or an enterprise program developer. With the comprehensive hardware/software integration of Synology NAS, you can easily build packages just the way you like. Supported programming languages vary from C, C++, Java, and scripting languages like Perl and Python. Most importantly, with a million-strong user base, your package is assured a high level of exposure once published on Synology’s Package Center. Now, let’s show you why Synology is your ideal NAS platform and how to start developing and distributing your package to Synology NAS users!

Average One Million Downloads Every Month
Due to our highly integrated hardware and software, Synology’s Package Center has achieved an average of one million package downloads per month. This further assures your package is exposed to large number of Synology NAS users. Users are also able to customize their Synology NAS with the rich content of Package Center, and your package is making this possibility even further.

Solid Customer Base
Synology’s established customer base includes consumer-level users, small to medium businesses, and large enterprises. This variety of users stimulates high demand for equally varied packages, meaning you’ll always find the right market or user when distributing your package.

Flexible Platform
With Synology’s developer-friendly platform, the most common languages like C, C++, Java, and other scripting languages are supported, so you can use the programming language you are familiar with. That means you can spend less time worrying about programming languages and spend more time creating creative and unique packages.

Professional Technical Advice
If you require technical advice during development, Synology's engineering team is available to provide assistance, ease your debugging efforts, and help you better focus on creating packages.
Development Flow

Apply
Simply apply for package development, and we’ll contact you shortly for more details regarding package evaluation. Apply Now

Create
In the Dev SDK, you'll find related documents and build tools for creating packages, as well as resources for building plugins and other enhancement for existing Synology applications.

Verify
After completing your build, simply contact us and submit your package. We will design verification case specifically for your package.

Publish
Congratulations! We will publish your package to the popular Package Center, and your package will also receive a detailed introduction page on the Package Center home.
Development Tool
To make development easier, we have prepared handy tools and development guides. You’ll find everything you need regarding development here. Happy building!
The 3rd Party Developer Guide
This guide provides details about creating packages for Synology DiskStation products. It introduces structure, compilation, language selection, user interface, and package publication - everything you need to start creating a package.
Toolkits and GPL source
These cross-compile tools allow you to create packages with the most common languages on a single PC. To ease the process for you, most widely used libraries are built-in.
File Station API Guide
This API guide gives detailed instruction on how your package can communicate with File Station and access the files stored in it.
DiskStation CLI Guide
This guide explains DiskStation administration using command line scripts.
SSO API Guide
Leverages the advantage of Synology SSO Server to enable the single sign-on feature for your web applications.
Audio Station Guide
With this guide, you are able to build lyric modules and allow users to search lyrics from external resources.
Surveillance Station WEB API Guide
This guide provides details regarding how to use the Web API to access the Live View image of the Surveillance Station on DiskStation, as well as how to activate the recording function and embed this to your own website, allowing you to control Surveillance Station with an custom web interface.
Download Station Guide
You can add external search engines or even build your own download modules for external hosting spaces, to enable DiskStation to access the files stored on the hosting sites.
SNMP MIB Guide
The MIB guide offers you instructions on how to monitor your Synology product via the SNMP protocol.
Virtual Machine Manager API Guide
This API guide gives detailed instructions and specifications on how to allow your applications to interact with Virtual Machine Manager.
Calendar API Guide
This guide provides detailed information on how to use API to access events, tasks, and task lists on Synology Calendar, as well as manipulate your calendar data, such as creating a new calendar and adding events, changing the due time, setting an alert, or updating information in your calendar, allowing you to control Synology Calendar with a custom interface.
Web Developers
Getting Started
Welcome to Synology Web Developers! The guide contains command tools which will allow your applications to make use of the resources on Synology DiskStations. Please note that the following page is only available in English. Thank you for your understanding.
Content
1. PHP Package Developer Note
If PHP package is going to involve SDK command tool, package developer will have to set SUID bit and create symbolic link to Synology SDK commands in /usr/syno/bin/ while the package installation. Synology SDK commands tools then will be able to work in PHP scripts.
Example - Command to set SUID bit to Synology SDK tool |
---|
DiskStation> /bin/chmod 4755 /usr/syno/sbin/synouser DiskStation> /bin/ln -s /usr/syno/sbin/synouser /usr/syno/bin/ DiskStation> /bin/chmod 4755 /usr/syno/sbin/synogroup DiskStation> /bin/ln -s /usr/syno/sbin/synogroup /usr/syno/bin/ DiskStation> /bin/chmod 4755 /usr/syno/sbin/synoshare DiskStation> /bin/ln -s /usr/syno/sbin/synoshare /usr/syno/bin/ DiskStation> /bin/chmod 4755 /usr/syno/sbin/synonet DiskStation> /bin/ln -s /usr/syno/sbin/synonet /usr/syno/bin/ DiskStation> /bin/chmod 4755 /usr/syno/sbin/synoservice DiskStation> /bin/ln -s /usr/syno/sbin/synoservice /usr/syno/bin/ DiskStation> /bin/chmod 4755 /usr/syno/sbin/synowin DiskStation> /bin/ln -s /usr/syno/sbin/synowin /usr/syno/bin/ |
2. DiskStation Administration Commands
2.1 synouser -- managing local users
Synopsis
synouser {--help}
synouser {--add} username passwd full name expired email app privilege
synouser {--del} username...
synouser {--rename} old username new username
synouser {--modify} username passwd full name expired email
Description
--add
--del
--rename
--modify
The format or limitation of each argument is described in Restrictions. Only the super-user is permitted to run this utility.
Restrictions
username The user name is not case sensitive and limited from 1 to 64 UTF-8 characters, excluding the following symbols: ! " # $ % & ' ( ) * + , / : ; < = > ? @ [ ] \ ^ ` { } | ˜
The first character cannot be a minus sign or a space, and the last character cannot be a space.
passwd The password is case sensitive and limited up to 127 displayable characters, including letters, numbers, signs, and space.
You may choose an empty password or specify your own password, which will be encrypted before being stored in the user database.
full_name The user description can include up to 64 displayable UTF-8 characters. This field may be left empty.
expired This account is expired or not. You should specify 0 (not expired) or 1 (expired).
email The email address of this user. This field may be left empty.
app_privilege Set a decimal number to assign user's privilege to access applications. You may choose 0 to make this user access no application or a number constructed from the sum of the following values:
FTP
Value 0x01
File Station
Value 0x02
Audio Station
Value 0x04
Download Station
Value 0x08
Surveillance Station
Value 0x10
For example, the value of a user's privilege who is able to access FTP, Audio Station and Surveillance Station is 21 (21 = 0x15 = 0x01 + 0x04 + 0x10).
Exit Status
The synouser utility returns 0 when exits successfully, or >0 if any error occurs.
Limitation
When user is created, no welcome email will be sent.
Examples
The following example shows how to change the admin password to "1".
Example - Set admin's password |
---|
DiskStation> /usr/syno/sbin/synouser --setpw admin 1 |
Create user syno with password '1' and full name 'Synology Inc.'. Applications that this user can access are FTP, File Station, Audio Station, Download Station and Surveillance Station.
Example - Create user syno |
---|
DiskStation> /usr/syno/sbin/synouser --add syno 1 "Synology Inc." 0 synology@example.com 31 |
2.2 synogroup -- managing local groups
Synopsis
synogroup {--help}
synogroup {--add} groupname username...
synogroup {--del] groupname...
synogroup {--rename} old groupname new groupname
synogroup {--memberg} groupname username...
Description
--add
--del
--rename
--member
The format or limitation of each argument is described in Restrictions. Only the super-user is permitted to run this utility.
Restrictions
groupname The group name is not case sensitive and limited from 1 to 15 UTF-8 characters, excluding the following symbols: ! " # $ % & ’ ( ) * + , / : ; < = > ? @ [ ] n ˆ ` { } | ˜
The first character cannot be a minus sign or a space, and the last character cannot be a space.
Exit Status
The synogroup utility returns 0 when exits successfully, or >0 if any error occurs.
2.4 synonet -- managing network settings
Synopsis
synonet {--help}
synonet {--dhcp} iface
synonet {--manual} iface ip mask [--dont restart service]
synonet {--set_gateway} gateway
synonet {--set_dns} dns
synonet {--set_mtu} iface MTU
synonet {--set_hostname} hostname [--dont restart service]
Description
--dhcp
--manual
--set_gateway
--set_dns
--set_mtu
--set_hostname
The format or limitation of each argument is described in Restrictions. Only the super-user is permitted to run this utility.
Restrictions
iface It is limited to the following two strings only:
eth0
eth1 (Supported on DiskStation with two LAN ports only)
ip, mask, gateway, dns Those inputs should be in the format of IPv4.
hostname The server name is not case sensitive and limited from 1 to 15 displayable characters, which may consist of letters, numbers, underscores and minus signs. The first character must be a letter.
MTU It is limited to the following values only:
1500
2000
3000
4000
5000
6000
7000
8000
9000
Exit Status
The synonet utility returns 0 when exits successfully, and >0 if any error occurs.
Examples
The below example will show you how to manually assign eth0 with the following information:
IP: 192.168.14.64
Netmask: 255.255.0.0
Default gateway: 192.168.15.254
DNS server: 192.168.252.254
Example - Set DiskStation to Manual IP |
---|
DiskStation> /usr/syno/sbin/synonet --manual eth0 192.168.14.64 255.255.0.0 DiskStation> /usr/syno/sbin/synonet --set_gateway 192.168.15.254 DiskStation> /usr/syno/sbin/synonet --set_dns 192.168.252.254 |
The below example will show you how to set your DiskStation to the new Hostname, cn406e.
Example - Set New Host Name to DiskStation |
---|
DiskStation> /usr/syno/sbin/synonet --set_hostname cn406e |
2.5 synoservice -- managing setting of serivces
Synopsis
synoservice {--help}
synoservice {--list} [running]
synoservice {--enable | --disable} service...
synoservice {--start | --stop | --restart} service...
synoservice {--keyon | --keyoff} service...
synoservice {--detail} service...
Description
--list
--enable, --disable
--start, --stop, --restart
--keyon, --keyoff
--detail
Restrictions
service The settings of the following services are available to be set up.
web Web Station
photo Photo Station
netbkp Network backup service
download Download Station
media DLNA service
audio Audio Station
itunes iTunes service
mysql MySQL service
printer Printer service
surveillance Surveillance Station
userhome User Home Service
ftp FTP server
telnet Telnet service
ssh SSH service
nfs NFS service
afp Apple File Protocol service
samba CIFS service
filestation File Station
https HTTPS service
Exit Status
The synoservice utility returns 0 when exits successfully, or >0 if any error occurs.
Examples
To enable ssh service
Example - Enable Service 'ssh' |
---|
DiskStation> /usr/syno/sbin/synoservice --enable ssh |
To enable ssh in ds_configure.sh when group install. Use --keyon instead of --enable, because the services are not started when ds_configure.sh is called.
Example - Enable Service 'ssh' When Group Install |
---|
# ds_configure.sh # Enable service ssh /usr/syno/sbin/synoservice --keyon ssh |
2.6 synowin -- managing workgroup or ADS domain setting
Synopsis
synowin {--help}
synowin {--joinWorkgroup} workgroup
synowin {--joinDomai} {short_domain_name | full_domain_name} username password [-d dns_ip] [-i kdc_ip] [-n netbios_name] [-f fqdn_name]
Description
--joinWorkgroup
--joinDomain
Restrictions
workgroup The name of a Workgroup can contain 1 to 15 characters. Invalid characters include: [ ] ; : " < > * + = n / | ? ,
If your workgroup name includes the character '&', users of Mac OS 10.4.4 or earlier versions will not be able to connect to DiskStation via samba.
domain_name If the input domain contains period, ”synology.com”, it will be treated as full domain name. If it is "synology", it will be treated as short domain name.
kdc_ip The DC (Domain Controller) IP.
Specify a DC IP and DiskStation will try to communicate with it. If there is more than one IP, insert a comma in between each of them. Add an asterisk (*) after the last DC IP if you wish, and DiskStation will try to communicate with other DC when all specified ones failed. You will need to add a comma between the asterisk and the last IP.
netbios_name The NetBIOS name of the domain.
fqdn_name The FQDN (DNS name) of the domain.
Exit Status
The synowin utility returns 0 when exits successfully, or >0 if any error occurs.
3. Synology Error Numbers
Table 1: List of Synology Error Numbers
Symbol | Value | Description |
---|---|---|
ERR SUCCESS | 0x0000 | The operation was successful. |
ERR NOT ENOUGH MEMORY | 0x0100 | Insufficient memory allocation. |
ERR OUT OF MEMORY | 0x0200 | The operation ran out of the memory. |
ERR ACCESS DENIED | 0x0300 | Access is denied. |
ERR LOCK FAILED | 0x0400 | Unable to lock a file. |
ERR UNLOCK FAILED | 0x0500 | Unable to unlock a file. |
ERR PATH NOT FOUND | 0x0600 | The path not found. |
ERR FILE NOT FOUND | 0x0700 | The file not found. |
ERR FILE EXISTS | 0x0800 | The file is already existed. |
ERR OPEN FAILED | 0x0900 | Failed to open the file. |
ERR READ FAILED | 0x0A00 | Failed to read data from the specified device. |
ERR WRITE FAILED | 0x0B00 | Failed to write data to the specified device. |
ERR CREATE FAILED | 0x0C00 | Failed to create file or directory. |
ERR BAD PARAMETERS | 0x0D00 | The parameters are invalid. |
ERR INVALID SERVERNAME | 0x0E00 | The server name is invalid. |
ERR INVALID DOMAINNAME | 0x0F00 | The domain name is invalid. |
ERR INVALID NETNAME | 0x1000 | The format of IP address is invalid. |
ERR SERVER UNREACHABLE | 0x1100 | Failed to locate Windows domain controller. |
ERR INVALID SHARENAME | 0x1200 | The share name is invalid. |
ERR SHARE EXISTS | 0x1300 | The share is already existed. |
ERR NO SUCH SHARE | 0x1400 | The share does not exist. |
ERR TOO MANY SHARES | 0x1500 | The maximum number of share has been exceeded. |
ERR INVALID GROUPNAME | 0x1600 | The group name is invalid. |
ERR GROUP EXISTS | 0x1700 | The group name is already existed. |
ERR NO SUCH GROUP | 0x1800 | The group does not exist. |
ERR TOO MANY GROUPS | 0x1900 | The maximum number of group has been exceeded. |
ERR INVALID USERNAME | 0x1A00 | The user name is invalid. |
ERR INVALID PASSWORDNAME | 0x1B00 | The format of the password is invalid. |
ERR USER EXISTS | 0x1C00 | The user exists. |
ERR NO SUCH USER | 0x1D00 | The user does not exist. |
ERR WRONG PASSWORD | 0x1E00 | The password is incorrect. |
ERR TOO MANY USERS | 0x1F00 | The maximum number of user has been exceeded. |
ERR KEY NOT FOUND | 0x2000 | Failed to find the specified keyword. |
ERR KEY EXISTS | 0x2100 | The specified keyword is already existed. |
ERR SECTION NOT FOUND | 0x2200 | Failed to find the section. |
ERR SECTION EXISTS | 0x2300 | The section is already existed. |
ERR NOT ENOUGH QUOTA | 0x2400 | Insufficient space with the user's quota. |
ERR NOT ENOUGH VOLUME SPACE | 0x2500 | Insufficient free space in the volume. |
ERR SEEK FAILED | 0x2600 | Seek operation is failed. |
ERR STAT FAILED | 0x2700 | Stat operation is failed. |
ERR RENAME FAILED | 0x2800 | Failed to rename. |
ERR NOT ENOUGH SPACE | 0x2900 | Insufficient free space in the file system. |
ERR OP FAILURE | 0x2A00 | Failed to execute the specified operation. |
ERR DEV UNCONFIG | 0x2B00 | The device is not ready. |
ERR DEV UNMOUNTED | 0x2C00 | The device is not mounted. |
ERR OP UNREGISTERED | 0x2D00 | The operation is not allowed. |
ERR TIMER EXPIRED | 0x2E00 | The timer has expired. |
ERR USER BATCH CONFLICT | 0x2F00 | Duplicated names found. |
ERR READ GEO | 0x3000 | Failed to read geometry from the specified (disk) device. |
ERR USAGE | 0x3100 | Invalid usage of parameters. |
ERR UPDATE OFFSET | 0x3200 | Illegal offset found while verifying the checksum of patch files. |
ERR CHECKSUM | 0x3300 | Illegal checksum (of a patch file). |
ERR OPEN RAWDEVICE | 0x3400 | Failed to open the raw device. |
ERR OPEN OPTFILE | 0x3500 | Failed to open the configuration file of installation. |
ERR READ RAWDEVICE | 0x3600 | Failed to read data from the raw device. |
ERR WRITE RAWDEVICE | 0x3700 | Failed to write data to the raw device. |
ERR BADPATCH | 0x3800 | Illegal patch file. |
ERR REMOVE FAILED | 0x3900 | Failed to remove file. |
ERR MOVE FAILED | 0x3A00 | Failed to move file. |
ERR COPY FAILED | 0x3B00 | Failed to copy file. |
ERR MKDIR FAILED | 0x3C00 | Failed to create directory. |
ERR MMAP FAILED | 0x3D00 | Failed to map file to memory. |
ERR FORMAT ERROR | 0x4000 | Failed to make file system. |
ERR NO BACKUP SET | 0x5000 | The backup set does not exist. |
ERR NO DEST ID | 0x5100 | The dest ID in local (/etc/synolocalbkp.conf) does not exist. |
ERR BACKUP INFO FAIL | 0x5200 | Fail to get backup info in the shared memory. |
ERR BAD DEST PATH | 0x5300 | The format of local backup destination is invalid. |
ERR RM SHM FAIL | 0x5400 | Failed to remove the shared memory ID. |
ERR EXPORT APPLICATION | 0x5500 | Failed to export application. |
ERR IMPORT APPLICATION | 0x5600 | Failed to import application. |
ERR NO VOLUME ID | 0x6000 | The volume ID cannot be found. |
ERR NO DISK ID | 0x6100 | The disk ID cannot be found. |
ERR NOT ENOUGH SD | 0x6200 | Insufficient hard disks. |
ERR SD SIZE NOT ALIGN | 0x6300 | The selected hard disks do not have the same capacity. |
ERR DEVICE BUSY | 0x6400 | Failed to destroy the volume, because it is occupied by someone. |
ERR INVALID SD | 0x6500 | Invalid SD. |
ERR FORMAT FAIL | 0x6600 | Failed to reformat the disk. |
ERR CANNOT REBUILD DISK | 0x6700 | Failed to rebuild the disk. |
ERR BROKEN RAID CONF | 0x6800 | Incorrect RAID information. |
ERR DISK TOO SMALL | 0x6900 | The capacity of the disk is too small. |
ERR CANNOT GET MNTINFO | 0x6A00 | Failed to get mount information. |
ERR BROKEN DISK INFO | 0x6B00 | Incorrect disk information. |
ERR_DISK_IO_FAILED | 0x6C00 | Disk I/O fails. |
ERR_BAD_DISKSECTOR | 0x6D00 | Bad sectors found. |
ERR_UDPD_INVALID_HANDLE | 0x7100 | The specified handle is invalid. |
ERR_UDPD_RUNNING_HANDLE | 0x7200 | The specified handle is busy. |
ERR_UDPD_INVALID_EVENT | 0x7300 | The specified event is invalid. |
ERR_UDPD_INVALID_PARAMETER | 0x7400 | The specified parameters are illegal. |
ERR_UDPD_EXIT_ABNORMAL | 0x7500 | The daemon exits abnormally. |
ERR_UDPD_NOT_ENOUGH_SPACE | 0x7600 | The specified space is not enough. |
ERR_UDPD_TIMEOUT | 0x7700 | Time out before receiving complete packet. |
ERR_UDPD_INIT_FAIL | 0x7800 | Failed to initialize the specified handle. |
ERR_UDPD_SEND_FAIL | 0x7900 | Failed to send the specified data. |
ERR_UDPD_RECV_FAIL | 0x7A00 | Failed to receive the specified data. |
ERR_MANUTIL_PERM | 0x7B00 | The specified burn-in function is invalid. |
ERR_UNKNOWN | 0x8000 | The error cannot be determined by the function you called. |
ERR_SYS_UNKNOWN | 0x8100 | System encounters an error, but the function you called can't tell you the real error. |
ERR_VOLUME_SIZE_TOO_LARGE | 0x8200 | The specified volume size exceeds the limit. |
ERR_VOLUME_NOT_FOUND | 0x8300 | Failed to find the volume. |
ERR_VOLUME_READ_ONLY | 0x8400 | The volume is read only. |
ERR_YP_BIND | 0x9000 | Ypbind occurs error when you join NIS domain. |
ERR_QUOTA_NOT_FOUND | 0x9100 | The user has not been specified with the volume quota. |
ERR_QUOTA_PARAM_INVALID | 0x9200 | Either the quota file is corrupted, or the command or qouta type is invalid. |
ERR_QUOTA_MOUNTING | 0x9300 | Failed to remount the file system to enable user/group quota. |
ERR_QUOTA_QUOTACHECK | 0x9400 | Failed to execute quotacheck. |
ERR_QUOTA_QUOTAON | 0x9500 | Failed to execute quotaon. |
ERR_QUOTA_QUOTAOFF | 0x9501 | Failed to execute quotaoff. |
ERR_FORK_FAIL | 0x9600 | Failed to fork. |
ERR_RAID_ENUM_FAIL | 0x9700 | Failed to enumerate system RAID devices. |
ERR_ENUM_FAIL | 0x9800 | Failed to enumerate. |
ERR_INVALID_PATHNAME | 0x9900 | Invalid volume path. |
ERR_SERVICE_EXISTS | 0xA000 | The service is already existed. |
ERR_SERVICE_NOT_EXISTS | 0xA100 | The service does not exist. |
ERR_NOT_DIRECTORY | 0xA200 | The path you specified is not a directory. |
ERR_DIRECTORY_NOT_EXISTS | 0xA300 | The directory does not exist. |
ERR_SERVICE_NOT_SET | 0xA400 | The service has not been set. |
ERR_IS_DIRECTORY | 0xA500 | The path you specified is a directory. |
ERR_PATH_CONFLICT | 0xA600 | Source and destination file are identical (same file name or hard link). |
ERR_FAT_FILESIZE_TOO_LARGE | 0xA700 | The file size exceeds 4GB in FAT file system. |
ERR_FAT_FILENAME_ILLEGAL | 0xA800 | The file contains illeagle char in FAT file system. |
ERR_USER_CANCEL | 0xA900 | Action cancelled by user . |
ERR_INTERRUPTED | 0xAA00 | Interrupted by a signal. |
ERR_ENCKEY_VERIFY | 0xAB00 | Share Encryption: Incorrect encryption key. |
ERR_ENCKEY_LOST | 0xAC00 | Share Encryption: Local copy of encryption key lost. |
ERR_BDB_FILE_DEPRECATED | 0xB000 | The BDb file has been deprecated. |
ERR_BDB_FILE_BAD_FORMAT | 0xB100 | The file opened for BDb is incorrectly formatted. |
ERR_BDB_GET_FAILED | 0xB200 | The BDb get failed. |
ERR_BDB_SET_FAILED | 0xB300 | The BDb set failed. |
ERR_BDB_DELETE_FAILED | 0xB400 | The BDb delete failed. |
ERR_BDB_CURSOR_FINISH | 0xB500 | The BDb CursorGet has finished. |
ERR_NO_SUCH_FTYPE | 0xB600 | No scuh fType value. |
ERR_RESERVED_GROUP | 0xB700 | The gid is less than GID_MIN. |
ERR_RESERVED_USER | 0xB800 | The uid is less than UID_MIN. |
ERR_LOOKUP_DOMAIN_GROUP | 0xB900 | wbinfo -g timeout when building domain group db |
ERR_LOOKUP_DOMAIN_USER | 0xBA00 | wbinfo -u timeout when building domain user db |
ERR_INTERFACE_EXISTS | 0xBB00 | The specified interface is already existed. |
ERR_NO_SUCH_INTERFACE | 0xBC00 | The specified interface does not exist. |
ERR_TOO_MANY_INTERFACE | 0xBD00 | The interfaces exceeds the limitation. |
ERR_INVALID_PATH | 0xBE00 | Invalide path. |
ERR_SIZE_TOO_SMALL | 0xBF00 | The capacity of the disk is too small. |
ERR_NAME_EXISTS | 0xC000 | The name is already existed. |
ERR_EXCEED_ISCSI_SIZE_IN_VOLUME | 0xC100 | The reserved size of iSCSI file exceeds the limit. |
ERR_FS_NOT_FOUND | 0xC200 | Failed to find the file system. |
ERR_NAME_TOO_LONG | 0xC300 | File name is too long. |