Since QNAP has dropped support for the old and outdated iTunes server that came pre-setup in Settings (Firefly Media Server), I searched for an alternative. I have discovered the excellent forked-daapd, which does the same as FMS, but better and more up to date. It has a ton of features - you can connect an Apple Remote, stream to AirPlay devices, etc.
Since installing something meant for Linux directly on QTS can be tricky sometimes, it took me some time to find a solution. This thread awoke my hopes, but it is nearly 10 years old and of course, all the download links are dead. So I continued searching and without further ado, I will tell you what I found:
A way to install forked-daapd on your QNAP device in 2020! I only tested this on my TS-451 with QTS 4.14.24 on firmware 4.4.2.1262, but I gather it should work on basically any QNAP NAS with the ability to install Container Station.
1) Container Station
Go to the QNAP App Store and download "Container Station". Open it. It will ask you for a folder to put its stuff in. I just created a folder "Containers" in the root of my NAS. Doesn't really matter what you put here, just make sure you remember and put it in anytime I mention the "Container"-folder. Then close "Container Station" again.
2) User Setup
For security reasons, you should now set up a separate User that has only the rights to access the "Container"-folder you just specified and your music library. Go to "Settings" -> Users -> Create -> Create a new User. Give it a name ("dockeruser" for me) and some "not-easy-to-guess" password (you are not gonna need this ever again - at least not for this tutorial). Click "Edit" under the point "Shared folder permission" and then check the checkmarks "RW" for the "Container"-Folder and the checkmark "R" for your Multimedia folder (if your music is there. Else, the folder your music is in). All others should stay empty. Click on "Create" to finish the setup of the user.
3) Find out ID of newly created user
SSH into your NAS.
(if you haven't set up SSH yet: go to Settings -> Telnet/SSH and activate SSH there. If you don't need this otherwise, you should deactivate it again after this tutorial, since it's a potential security risk. After you have activated it, open a command line interface ("command prompt" on Windows, "Terminal" on Mac) and then type
Code: Select all
ssh username@IP
Then type
Code: Select all
id dockeruser
4) Install forked-daapd
Now open Container Station. Go to "Create Container" and type "daapd" into the search field. You should find "linuxserver/daapd". Click on "Install". Choose the latest version.
5) Configure forked-daapd
A configuration window will open. First of all, you can change the name if you wish to do so. Optional. Then, click on "Advanced settings". We will need to adjust some things here:
- Environment: add a field named "GUID" here and in column "value", put in the value "gid" you noted down in step 3). Then add a field "PUID" and put in the value "uid" you noted down in step 3).
- Network: in the dropdown for "network mode", choose "Host".
- Shared Folders: here, add a field in the category "Volume from Host". Choose the folder of your music library in the Dropdown in the first field. In the field "Mount Point", you must put "/music" (without ""). Check only the box that says "Read" next to it. Optionally, you can also specify a location for the config file here. I tried to put it into the folder "Container" once and everything got messed up, so I would recommend you leave it at default.
6) Accessing the log
Click on "Overview". As soon as the install has finished (shouldn't take longer than a couple of seconds), your container should appear here. Click on it. You will now see the log output at the bottom. This will help you diagnose any problems. The logging level can be changed in the config file (see below). The log will ideally tell you that it started scanning. On my NAS, it scanned about 200 titles every 5 seconds. Pretty fast!
7) Web Interface
Congrats, you're finished! You can access the web interface of your new server at IP:3689 (where IP is the IP address of your NAS - so probably something like
Code: Select all
192.168.0.44:3689
Don't forget to deactivate your SSH if you don't need it anymore. Log out of the shell using
Code: Select all
logout
Further (optional) Infos:
8 ) [OPTIONAL] Editing the config file
If you want to do that to personalise your daapd install, click on Settings while you're inside the window where your container log is shown. Then navigate to "Advanced Settings" -> "Shared Folders" and note down the path that is shown next to "/config" it will likely be long and convoluted. Then, use SSH again. You can now edit the file by typing "vi PATH" (where PATH is the path you just noted down). If you don't know how to use vi, please google "vi use". You will find plenty of tutorials. Inside the config file, you will find the chapter "library configuration". Here, you can set many interesting things (the file is self explanatory). Use name to adjust the name of your iTunes server. Use directories to specify a subfolder of your music library, if only that one should be scanned. You can also specify multiple here. Be aware that they must always begin with /music ! Use loglevel to adjust the amount your log outputs (should only be changed for debugging).
If you want to make your life easier accessing the config file in the future, you can create a symbolic link. Just type
Code: Select all
cd ACC_PATH
Code: Select all
ln -s PATH
Note: you need to restart your container for any config changes to take effect. Just click on "Stop", and, when it has finished, "Start".
9) [OPTIONAL] Setting up Apple Remote
If you want to set up a remote to control your server (which was the whole point of setting it up in my case), then go to the web interface and navigate to "Settings" -> "Remotes & Outputs". Then, open the remote app on your iOS device and click "Manually add a library". It will now display a code. Go back to the web interface and refresh the page (F5 on windows, Cmd+R on Mac). It should show your device and enable you to enter the code. You can now control the server from your mobile device, yay!
References:
- This excellent tutorial taught me how to set up a container on a QNAP device
- Web page of the used docker container
- Explanation page of the used docker container
- The original forked-daapd where I believe the docker container comes from
Have fun with forked-daapd!
Toby
PS: This is my first post on this forum, I hope I've done everything right...