Synology

Starting or Stopping Synology Package from the Command-Line

If, in any case, the DSM web interface of your Synology NAS does not work, you may need to list, start, and stop the installed packages of your Synology NAS from the command line.

In this article, I will show you how to access the Terminal of your Synology NAS. I will also show you how to list the installed packages of your Synology NAS from the command line. I will also show you how to start and stop Synology packages from the command line.

Table of Contents:

  1. Enabling SSH on Synology NAS
  2. Connecting to the Synology NAS via SSH
  3. Listing Installed Synology Packages
  4. Checking the Status of Synology Packages
  5. Stopping Synology Packages
  6. Starting Synology Packages
  7. Conclusion
  8. References

Enabling SSH on Synology NAS:

To start and stop Synology packages from the command line, you will have to access the Terminal of your Synology NAS.

To access the Terminal of your Synology NAS, you will have to enable the SSH service of your Synology NAS.

To do that, open the Control Panel app and click on Terminal & SNMP as marked in the screenshot below.

From the Terminal tab, check Enable SSH service and click on Apply.

Click on OK.

The SSH service of your Synology NAS should be enabled.

Connecting to the Synology NAS via SSH:

To access the Terminal of your Synology NAS, you will need to know the IP address of your Synology NAS.

You can find the IP address of your Synology NAS in the System Health widget as marked in the screenshot below. There are other methods of finding the IP address of your Synology NAS. For more information, read the article How Do I Find the IP Address of My Synology NAS.

To access the Terminal of your Synology NAS via SSH, open a terminal program on your computer and run the following command:

$ ssh <username>@<ip-address>

Here, <username> is your Synology login username and <ip-address> is the DNS name or IP address of your Synology NAS.

In my case, the command is:

$ ssh shovon@192.168.0.120

As you’re accessing the Terminal of your Synology NAS via SSH for the first time, you will be asked to verify the fingerprint of your Synology NAS. Type in yes and press <Enter> to verify the fingerprint.

Type in the login password of your Synology user and press <Enter>.

You will be logged in to the Terminal of your Synology NAS via SSH. You can run any command you want here.

Listing Installed Synology Packages:

You can list all the installed packages of your Synology NAS with the following command:

$ sudo synopkg list --name

All the installed packages of your Synology NAS should be listed, as you can see in the screenshot below.

Checking the Status of Synology Packages:

You can check whether a Synology package Docker (let’s say) is stopped or running with the following command:

$ sudo synopkg status Docker

As you can see, the package Docker is in started state. It means that the package is running.

Stopping Synology Packages:

To stop a running Synology package Docker (let’s say), run the following command:

$ sudo synopkg stop Docker

The Synology package Docker should be stopped.

You can also confirm that the Docker package is stopped by checking the package status with the following command:

$ sudo synopkg status Docker

Starting Synology Packages:

To start a stopped Synology package Docker (let’s say), run the following command:

$ sudo synopkg start Docker

The Synology package Docker should be started.

You can also confirm that the Docker package is running/started by checking the package status with the following command:

$ sudo synopkg status Docker

Conclusion:

I have shown you how to access the Terminal of your Synology NAS in this article. I have also shown you how to list the installed packages of your Synology NAS from the command line. I have also shown you how to start and stop Synology packages from the command line.

References:

[1] Synology DiskStation Manager 3rd-Party Package Developer Guide

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.