WD Community

[GUIDE] How to install a second instance of Twonky Server on WD MyBook Live for Private Streaming

I have seen the topic come a few times on how to password protect a folder
so that parents can shield their children from inappropriate media

While Twonky Server does not have the ability at this point in time
to password protect or to limit folders or media items on a per client basis
it does have the ability to limit streaming as a whole on a per client basis

We can leverage this ability by running a second instance of Twonky Server
for the sole purpose of streaming restricted media on a per client basis
The primary instance will still run as normal for unrestricted media streaming

The following example is going to show you how to install a second instance
that is password protected from http access
and is configured for a Private folder share
and is configured on a per client basis

The following is meant for the WD MyBook Live Single not the WD MyBook Live Duo
(on the to do list)

The following guide will also work, if you used the following upgrade guide
http://community.twonky.com/twonky/topics/how_to_upgrade_twonky_server_on_wd_mybook_live

Required Tools (Free):
WinSCP can be found here http://winscp.net

Not Required Tools (Free):
Putty can be found here http://www.putty.org

The following Example is for a default WD MyBook Live
which means at this point in time, it is running Twonky Server 5.1.9
The below example will work for 6.x and 7.x as noted  at the end of the guide

1. The guide assumes Twonky is already enabled

Note:
Once completed the enable/disble option will apply to both instances

meaning that if this is disabled, they will both be disabled, and vice versa

The service and status that is shown here will only be the first instance

you will have to use the twonky config page to administer the second instance

2. Enable SSH access http://mybooklive/Ui/Ssh

3. Connect using WinSCP, user is “root” password is “welc0me”

4. The following is an example share that is not public

Note:
You can use an existing share, or create a new one from the WD Gui
Just lock it down to a specific user account

5. Open a Console Window by clicking the following menu item

6. Stop the Twonky service by entering the following command and pressing execute

/etc/init.d/twonky stop
  •  Then Close the Console Window

7. Open the file /etc/init.d/twonky

8. Edit the file /etc/init.d/twonky by adding the following string as shown in the below image

nice -n $twonky_nice "$TWONKYSRV" -D -instance 1 -appdata /CacheVolume/twonkymedia-1 -logfile /CacheVolume/twonkymedia-1/twonkymedia-log.txt

killall -r twonky
  • Then Save and Close the file /etc/init.d/twonky

9. Re-open a terminal window as was shown in step 5

10.  Start the Twonky service by entering the following command and pressing execute

/etc/init.d/twonky start

11. Configure the First Steps section

  • Give the server a unique name
  • Entter a username and password for web access

12. Configure the Sharing section

  • Configure sharing to only point to your Private Videos folder

13. Configure the Media Receivers section

  

  • Uncheck automatic sharing for new media receivers to disable it 
  • Check only allowed clients to enable them to stream from the private server
  • Then Click the Save Save Changes button

Note:
If your client is not listed, you should first turn it on for it to appear here
once added it will stay added to the list, even when powered off
All of the work done previously was to make this section be isolated,
so that the Public server client settings dont intermingle with these settings

14. Restart Twonky Server

  • Click the Restart Server button

15. Check DLNA visibility of the Twonky Servers

This is the view from a dlna client on my phone that is showing both instances of twonky

16. Check DLNA access to Twonky Public wich is -instance 0

This is the view from a dlna client on my phone that is showing access to Twonky Public

17. Check DLNA denied access to Twonky Private wich is -instance 1

This is the view from a dlna client on my phone that is showing access denied to Twonky Private

18. Check DLNA granted access to Twonky Private wich is -instance 1

This is the view from a dlna client on my phone that is showing access granted to Twonky Private

once the mac address for this client is checked as enabled under media receivers on the settings page

All Done!

You can do the same exact thing for 6.x

Where things are located will be depend on what guide you followed to upgrade

I use the following guide

http://community.twonky.com/twonky/topics/how_to_upgrade_twonky_server_on_wd_mybook_live

You can do the same exact thing for 7.x
Where things are located will be depend on what guide you followed to upgrade

I use the following guide
http://community.twonky.com/twonky/topics/how_to_upgrade_twonky_server_on_wd_mybook_live

In addition  the Twonky Web Interface settings will look like the following for 7.x
In replace of the images in steps 11, 12, 13, and 14

Note:
Twonky Private has its own appdata folder located in /CachVolume/twonkymedia-1

Note:
You can run the following command to check resource usage of twonky servers
The second instance should not tax the NAS if the amount of media is minimal

top -p $(pgrep -d',' twonky)

All done for now

if you see anything wrong or have any questions just let me know

Enjoy!

Support for Western Digital Hard Drives | Western Digital

Still Need Help?

Reach out to Support for more assistance.

Sign in to Your Support Account

Get up-to-date information about your products.

Western Digital Business Portal

Unlock benefits and tools for your business such as enterprise support, pricing and rebate tools, marketing, loyalty, rewards, and more.