Dev Center

Build Your Desired Packages on DiskStation

Synology provides a friendly and flexible development platform, whether you’re a system integration distributor or an enterprise program developer. With DiskStation’s comprehensive hardware/software integration, 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 DiskStation 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 DiskStation users. Users are also able to customize their DiskStation 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!

Audio Station Guide

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.

SNMP MIB Guide

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.

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.

Restrictions

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:

Description

--add

Create a new share named sharename.

--del

Delete every share named sharename. --del must follow by a boolean value. TRUE, synoshare will delete all the configuration and data of this share. FALSE, it will only delete the configuration of this share, user will still have to remove this directory from file system manually, otherwise DiskStation will restore the share with default privilege next time it restarts.

--rename

Rename a share folder from old_sharename to new_sharename. The new share name can not be renamed if it is already existed in the DiskStation.

--setuser

Modify the list of access privilege to the share, sharename. The third parameter is the user list of access privilege which will be modified.

NAModify the list of deny-access.ROModify the list of read-only privilege.RWmodify the list of read/write privilege.
The fourth parameter is the action to the user list of access privilege.
+ Append the user_list to the original user list of access privilege
- Remove the user_list from the original user list of access privilege
= Replace the original user list of access privilege with the new user_list

The format or limitation of each argument is described in Restrictions. Only the super-user is permitted to run this utility.

Restrictions

The first character of a shared folder name cannot be a minus sign or a space, and the last character cannot be a space character either.

Shared folder names in the following are reserved for system use only:

global

homes

home

printers

.

..

surveillance

usbbackup

usbshare

esatashare

share_description The shared folder description is case sensitive and limited up to 64 displayable Unicode characters. It can be an empty string.

share_path It has to be a valid directory to the shared folder. If the path is not existed, synoshare will create it automatically.

user_list Separate each username with a comma, ",". It allows groupname as well, but please append "@" in front of the groupname. It will return an error if either username or groupname does not exist.

Hiding a shared folder in "My Network Places" does not affect its access right. The access right of the hidden shared folder will remain unchanged. Users who have the proper access rights to the shared folder can still access it by entering "\\server name\shared folder name".

adv privilege Configure the advanced privileges of this shared folder. When accessing this folder with FTP or File Station, the following settings will be applied in addition to the current shared folder privileges.

You should specify this value in decimal. You may choose 0 or a number constructed from the sum of the following values:

Disable directory browsing Value: 0x1

Disable modification of existing files Value: 0x2

Disable file downloading Value: 0x4

adv privilege Configure the advanced privileges of this shared folder. When accessing this folder with FTP or File Station, the following settings will be applied in addition to the current shared folder privileges.

Exit Status

The synoshare utility returns 0 when exits successfully, or >0 if any error occurs.

Description

Set network adapter, iface, to Manual IP follow by two parameters: ip and mask.

--set_gateway

Manually assign default gateway when all the network adapters are set to Manual IP.

--set_dns

Manually assign DNS server when all the network adapters are set to Manual IP.

--set_mtu

Set the MTU value of the network adapter. The default value is 1500. The MTU will only take affects when the DiskStation is connected to Gigabits network.

--set_hostname

Modify the server name on the DiskStation.

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:

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

List all the available service. It will only list the current running service if parameter, running, is being specified.

--enable, --disable

Enable or disable the specified service. Not only the specified service will be saved to the current settings once the service has been enabled or disabled, the service will also be started or stopped immediately.

--start, --stop, --restart

Start, stop, or restart the specified service without modifying the settings. Before starting the service, it will check if the service has been enabled yet.

--keyon, --keyoff

Enable or disable the settings of the specified service. The settings will be saved without interrupting the service.

--detail

Display all the information related to the specific service.

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.

Restrictions

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