Install custom packages on a QNAP NAS

Introduction

To install custom packages which are not available in the App Center of the QTS 5.x operating system for QNAP network attached storages (NAS), the options are described below. All tests were performed on a QNAP TS6-653A NAS.

QNAP support recommendation:

  • Install QPKG applications from the app center. See Tutorial [1].
  • Installing qpkg via ssh environment is not recommended since no logs are generated, which makes it harder to troubleshoot if something goes wrong.

Comment: According to my experience, the recommended procedure by QNAP may not make the application available in the terminal or may require specifying the full path of the executable binary, however, without information where the executable binary is stored, ie the path.

Add repository to App Center

Adding additional package repositories to the App Center of the QTS 5.x Operating System by QNAP  by adding the following URL is described elsewhere [2]:

https://www.myqnap.org/repo.xml

Add Entware package manager

The Entware(-std/-ng) [3,4] or  QNAPware (an fork of Entware for QNAP NAS) [5] package manager can be installed on QNAP NASes, of which Entware seems more up-to-date. Installing the Entware .qpkg manually in the command line after connecting with ssh to your NAS will give output in the terminal pointing you to the binary:

NAS> wget https://bin.entware.net/other/Entware_1.03a_std.qpkg
NAS> sudo sh Entware_1.03a_std.qpkg
NAS> echo "source /opt/etc/profile" > .profile
NAS> echo "export PATH=$PATH:/opt/bin/opkg" >> .profile
NAS> sudo /opt/bin/opkg update

Examples:

# OPTION 1: Install via Entware repository
NAS> sudo opkg install nano
NAS> sudo /opt/bin/opkg install git # after changes in .profile have become effective you can also use sudo opkg install git
#Option 2: Install from QNAP repository
NAS> wget https://www.myqnap.org/repo/QGit_2.39.1_arm_64.qpkg
NAS> sudo sh QGit_2.39.1_x86_64.qpkg 

Notes:

  • Important! For changes in the shell, ie .profile, to become effective, you have to logout from ALL (!) ssh connections and re-connect.
  • Optware is not longer available in the QNAP App Center since 2019 and is considered discontinued [6].
  • More support is available in the QNAP discussion forum, for which registration is required. [7]
  • Select the correct architecture of your QNAP NAS to download the correct package (eg, QNAP TS-653A  => x86 64-bit architecture).
  • Using Option 2, the installed package will be installed in the NAS default volume qpkg folder, for example at the DataVol1 which is /share/CACHEDEV1_DATA/.qpkg/ .

References:

[1] https://www.qnap.com/en/how-to/faq/article/how-to-install-qnap-applications-qpkg-files-manually
[2] https://www.myqnap.org/install-the-repo/
[3] https://entware.net/
[4] https://github.com/Entware/Entware/wiki/Install-on-QNAP-NAS
[5] https://github.com/zyxmon/qnapware
[6] https://wiki.qnap.com/wiki/Install_Optware_IPKG
[7] https://forum.qnap.com

http://wilmarigl.de

de_DE_formalGerman