This is an old revision of the document!

Installing Twonkymedia UPnP Server

This will allow proper UPnP serving to Playstation 3 & XBOX360 Consoles - something alot more interesting now they both support mpeg4 (Divx/Xvid) Codecs. UPnP is improved in 1.04 firmwares but this will add the feature to 1.03 Firmwares. This tutorial is originally from here - PS3 Forums

TwonkyMedia isn't free, but it includes a 30-day trial. According to their website, it currently costs $39.95 for a TwonkyMedia license (version 4.4.x). Twonky don't provide telephone or email support for software installed on to a DNS-323, so make sure that it is working for you properly before buying the license key.

Which Version to Install?

Twonky Server version 4.4.18 installs most easily and works well, but is no longer being updated for more recent UPnP clients or getting new features. Additionally it allows you to edit the navigation trees for example to include A-Z sorting of large music or video collections.

Currently the latest version is 6.0.1, which can also install and run without problem, but requires some configuration changes after installation. Extending the navigation tree requires editing XML files, or at least replacing the default XML files with downloaded versions (eg from this QNAP forum post)

Downloading the Twonky software

Download links for 4.X, 5.X and 6.X versions of the software are available from this links on this page of the Twonky website.


Enable telnet

To install TwonkyMedia, you must first enable a telnet server on the DNS-323. Some might consider this hacking, and it does require some basic knowledge of Linux, so if you're not comfortable with Linux or don't want to modify your DNS-323's startup process and config, I would not recommend proceeding. (This is not a permanent change and can be easily backed out.)

Telnet Install Instructions

Another way (and the way I went) was to install MLDonkey, which not only installs Telnet but also a edonkey/torrent interface for your DNS-323, all by copying a few files via ftp.

NOTE = Since the firmware 1.05, the DNS-323 has BitTorrent support.

Install TwonkyMedia 4.4.18

Now, you can install TwonkyMedia version 4.4 for D-Link DNS-323, Version 4.4.18 is available from the Twonky website.

Twonky are not producing more 4.4.x versions; you can get version 5.0.x, 5.1.x or 6.x versions from the Twonky media site, but see the additional notes below.


The archive includes a setup program that will copy the necessary files to you NAS, and modify the boot files accordingly - no setup necessary. You just need to run the NASSetup.exe program on your PC, then follow the instructions.

The TwonkyMedia server will be installed at /mnt/HD_a2/twonky.

The TwonkyMedia autostart script will be installed at /mnt/HD_a2/

The TwonkyMedia web interface will be accessible at http://<fill in your DNS-323's ip address>:9000/configpage/index.html

Other Operating Systems

If you need to install via some other operating system, you will need to FTP the files, and modify the autostart file, fun_plug to start twonkymedia.

Create the directory /mnt/HD_a2/twonky. Copy the following files and directories to /mnt/HD_a2/twonky: twonkymedia twonkymedia-default.ini cgi-bin plugins resources twonkymediaserver

Start server by running twonkymedia.

Additional Configuration for version 6.0.1 (also needed for version 5.X?)

After installing Twonky you will have a file called in the root of your first shared drive. You need to modify this file to avoid your DNS-323 breaking if you have a large media library (pink lights and missing file shares). If you do this from Windows then use a text editor that is aware of “Unix line endings”, like notepad++.

The example file below shows the suggested changes with comments.

route add -net netmask dev egiga0

cd /mnt/HD_a2/twonky
# The lines above are written by the twonky installer and show the install 
# directory for this twonky installation. The new file and directory 
# that is created below should be inside it.

# On the DNS-323, /tmp, /var and /mnt are in the root partition (/). The root 
# partition is entirely in RAM and has total size 9.7MB. 

# By default Twonky 6.0.1 is built to log to /tmp/TwonkyMediaServer-log.txt,
# and other data is stored in /var and /mnt.

# Two problems: 
# 1/ The available space in / is quickly filled, the DNS-323 stops serving files
# and the status lights on the front go pink.
# 2/ Any saved twonky configuration is lost after a reboot, including the 
# license key.

# So we need to change the Twonky configuration to store this data on the big 
# disks instead. This is easy to do by editing the script (this file!)

## First create a directory for working files:
# mkdir /mnt/HD_a2/twonky/appdata
# or create it using Windows File explorer in \\yourNas\Volume_1\twonky

# Add 2 command line options to change the location of the application data 
# (which includes the ini file) and log file:
/mnt/HD_a2/twonky/twonkymedia -logfile /mnt/HD_a2/twonky/TwonkyMediaServer-log.txt -appdata /mnt/HD_a2/twonky/appdata &
# You should also edit the file /mnt/HD_a2/twonky/appdata/twonkymedia-server.ini to 
# set suitable values for uploaded and cached media files using the settings for 
# servermanagedmusicdir, servermanagedpicturedir and servermanagedvideodir

# More about command line options: Any option in the .ini file can be used with a 
# leading '-' on the command line. For example -disablelocalssdp 0

# You can test different options directly via HTTP (browser address bar)

Symlinks could be used to fix the problem instead, described here:

## First create a directory for working files:
# mkdir /mnt/HD_a2/twonky/appdata
# or create it using Windows File explorer in \\yourNas\Volume_1\twonky
## And a file for log data like this
# touch /mnt/HD_a2/twonky/TwonkyMediaServer-log.txt

Then add these lines near the beggining of
ln -s /mnt/HD_a2/twonky/appdata /var/twonkymedia
ln -s /mnt/HD_a2/twonky/TwonkyMediaServer-log.txt /tmp

Alternative method for installing Twonky 6.0.30

(This alternative section - between the two groups of three parallel lines - was inserted by Briain on 07/02/2011)

I've just successfully updated a DNS-323 (Hardware Version B / D-Link FW 1.08) to Twonky 6.0.30 and have created an alternative file. It's based on adding the above recommended symlinks to the file and overwriting the Twonky created before first running Twonky. Basically, you can install Twonky 6.0.30, replace with the one below, reboot the D-Link and that's it done. I've tested it on a D-Link DNS323 HW Ver B which has 31,500 FLAC files and it all works well.

First install it as described above, but at the start of the installation process, remove the tick from the 'run it' box (so it doesn't start as soon as it's installed). Then copy the below script, paste it into Notepad++ and select EOL conversion to Unix format, then save it as

Copy this new to the D-Link and thus overwrite the one Twonky has created. You might have to Telnet into it and chmod 777 /mnt/HD_a2/ (the existing Twonky created one) before you can drag and drop the new version onto the Volume_1 share. Once you have replaced it with the below version, reboot the D-Link and it will start Twonky using the revised script (then remember to set your media paths in the twonky config web page).

# Twonky 6.0.30 start-up script for D-Link DNS-323 NAS 07 Feb 2011
# Uses symlinks to move db and cache from /var and log from /tmp
# This protects NAS OS, prevents db rebuild at boot and loss of share paths etc
# If section creates files and directories first time Twonky (or NAS) is re-started
# If section also changes permissions of /views to enable easy tree changes
# Remainder is run on all subsequent reboots

/sbin/route add -net netmask dev egiga0

if [ ! -f /mnt/HD_a2/twonky/sym_var ]; then
    /bin/mkdir /mnt/HD_a2/twonky/sym_var
    /bin/touch /mnt/HD_a2/twonky/TwonkyMediaServer-log.txt
    /bin/chmod -R u+rwx,g+rwx,o+rwx /mnt/HD_a2/twonky/resources/views

/bin/ln -s /mnt/HD_a2/twonky/sym_var /var/twonkymedia
/bin/ln -s /mnt/HD_a2/twonky/TwonkyMediaServer-log.txt /tmp
cd /mnt/HD_a2/twonky
/mnt/HD_a2/twonky/twonkymedia  &

Note 1 Don't worry if you forget to disable the 'run after installation' tick-box option during the installation process. The D-Link will show its pink lights, but you can still Telnet into it, delete the Twonky created file then reboot the D-Link (Twonky will not start). You can then add the revised and reboot the D-Link (which will then work okay).

Note 2 Optionally, once you have unzipped the Twonky 6.0.30 installation files (and before running the installation process) you can (if you wish) change the trees at this stage (my latest custom versions are available here on the Qnap forum). If you do not wish to do that at this stage, you can still change them later (without having to use Telnet) as the above script changes the permissions in the /twonky/resources/views directory (so the trees can also be changed by simply dragging and dropping them using Windows Explorer at a later date).

(ESPAÑOL) Instalando Twonkymedia UPnP Server

Este producto le brindará un apropiado UPnP Server para las consolas PlayStation 3 y XBox 360 — algo mucho más interesante ahora que ambos soportar MPEG4 (DivX/Xvid) Codecs. UPnP fue mejorado en el firmware 1.04, pero habia sido agregado en el firware 1.03.

Este tutorial fue originalmente publicado aqui = PS3 Forums

TwonkyMedia NO ES GRATIS, es una versión de prueba por 30 días. De acuerdo con su sitio, el costo es actualmente de US$39.95 for una licencia de TwonkyMedia (version 4.4.x)


Habilite telnet

Para instalar TwonkyMedia, ud debe primero habilitar un servidor de Telnet en el DNS-323. Hay quienes lo consideran un hackeo, y requiere un conocimiento básico de Linux. Si no se siente seguro en Linux o no quiere modificar el proceso de arranque y configuración de su DNS-323, le recomendamos no proceder (No es un cambio permanente y puede ser fácilmente recuperado).

Telnet Install Instructions

Otra manera (y la que utilice) fue instalar MLDonkey, el cual no solo instala Telnet sino tambien una interface edonkey/torrent en tu DNS-323, todo copiando unos archivos via ftp.

NOTA = Desde el firmware 1.05, el DNS-323 tiene soporte a BitTorrent

* Instalar TwonkyMedia 4.4.11 *

Ahora, ud puede instalar la version 4.4.11 de TwonkyMedia para D-Link DNS-323 Originally from Here.


El archivo incluye un programa de instalación que copiará los archivos necesarios a tu NAS, y modificará los archivos de inicio correspondientes. Ninguna configuración adicional es requerida.

Ud solo necesita ejecutar el programa NASSetup.exe en tu PC y seguir las instrucciones que se indican.

El servidor TwonkyMedia será instalado en /mnt/HD_a2/twonky.

El script de autoarranque de TwonkyMedia será instalado en /mnt/HD_a2/

La pagina web de TwonkyMedia será accesible en http://<su IP del DNS-323's>:9000/configpage/index.html

Otros Sistemas Operativos

Si ud necesita instalar a través de otro sistema operativo, ud necesitará pasar por FTP los archivos, y modificar el archivo de autoarrnque, fun_plug, para iniciar el TwonkyMedia. (Favor ampliar estas instrucciones si lo considera necesario). Le recomendamos usar Windows !

Traducido por amunoz_tico


Personal Tools