running two instances

General discussion about the media server. Feature requests. Hints, tips and tricks.
Locked
MoonKid
Posts: 7
Joined: Mon Mar 23, 2009 3:21 pm
AV Hardware: Twonky Media Server Ver 4.4.5
on Conceptronic Media Giant
used by Philips Streamium NP2900

running two instances

Post by MoonKid » Mon Jul 21, 2014 9:45 pm

I am running Twonkymedia 7.2.7 on a QNAP NAS (TS 239 Pro II).

I want to have two instances of Twonky listen on different ports on that system.

The background of it is, that my wife and I don't want to mix our archives.

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: running two instances

Post by phibertron » Mon Jul 21, 2014 10:38 pm

I used to have more on the topic on the other site,
These are the threads I dug up here on the topic

Twonky (How to run multiple instances with custom Navtree's)
http://twonkyforum.com/viewtopic.php?f=2&t=9408

Observations with multiple instances of Twonky Server 7
http://twonkyforum.com/viewtopic.php?f=2&t=11135

To be able to run multiple instances on your nas
your are going to have to be able ssh into it to make some changes to the startup script that launches twonky
.
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: running two instances

Post by phibertron » Mon Jul 21, 2014 10:57 pm

only as an example, as your nas will be using something different,
when one looks at the twonky.sh, you will see this section in it

Code: Select all

      echo -n "Starting $TWONKYSRV ... "
      "$TWONKYSRV"
      rc_status -v
To make it run two instances, it would look like this

Code: Select all

      echo -n "Starting $TWONKYSRV ... "
      "$TWONKYSRV" -instance 0
      "$TWONKYSRV" -instance 1
      rc_status -v
You will also probably have to take into account the other things I mentioned, in the posts I linked to earlier
possibly such as "-appdata" and "-logfile" switches for each instance to different paths
but this is only needed if you are trying to do things more than just run multiple instances
like different nav trees and what not
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

Locked