RadioDJ - Free Radio Automation Software Forum

Install RadioDJ On Windows Server / Virtual Windows Server

Install RadioDJ On Windows Server / Virtual Windows Server
« on: April 23, 2017, 01:30:21 AM »
It has been a long time since I haven't post something on this forum... Too much work to handle.
But this weekend, I really wanted to try again on of the thing I really wanted to realize since... Hmmm well say 2 to 3 years : installing RDJ on a virtual Windows Server.
So I decided to share my experience, first because it has been a piece of cake to make things working... Second because if I want to re-create it, than the forum will be able to help me too be historizing this :D

Okay lets go.
First of all, I've decided to make this working on a Windows Server 2016. Don't ask me why, it's a "comfort" choice, because the interface is much cool than the previous ones.

So I've started with azure, choosing a Windows Server 2016 DataCenter Edition (there's actually no Desktop Experience version so we will need to trick it a little bit, but maybe this will be released in a few days).

When the server starts, everything is okay to run... Now let's install everything.


-o- MYSQL -o-
First, you will need to install MySQL Community Server.
https://dev.mysql.com/downloads/mysql/

Download and launch the installer (it's a 32bits installer but it will install the 64bits server) and install a normal server.

Write somewhere the login/pass of your root mysql account, and create another one for RadioDJ (it must be admin because RadioDJ will need to create its database & table)


-o- HEIDI SQL -o-
Now you will need Heidi, because it helps a lot and, if you want to migrate your actual radio, it'll help
https://www.heidisql.com/download.php


-o- .NET 3.5 framework package -o-
Go to your Server Manager, add a Feature, select .NET Framework 3.5 Features and install it...


-o- VIRTUAL AUDIO DRIVER -o-
The next step I will explain here is for the audio driver. Virtual Windows Server doesn't have a sound card and I've spent a lot of hours trying to find how I can get Windows thinking it has an audio driver.
The important thing to know is : don't use the trick through Remote Desktop saying to route the audio to the remote PC : RadioDJ will cut/crash the time you will close/loose your remote connection because the driver will be stopped.

We must have a driver that runs even if we are not connected through a remote connection. BUT... It means that when we connect, we can't use the remote audio routing (for a reason I don't actually know, when you set this, the audio driver I will present you below stops working... But I will investigate).

The only good driver I've found is VB Audio Virtual Cable :
http://vb-audio.pagesperso-orange.fr/Cable/index.htm

It is a free/donationware software and because it is soooo cool and so helpful, I really encourage you to give the author a donation (it's not a friend of mine but as a coder, I like to help good coders) ;-)

Unzip the file and run the installation AS AN ADMINISTRATOR (this is mandatory, otherwise it will not work).
You will need to restart your server, do it.


-o- RADIO DJ -o-
Now you are more or less ready to install Radio DJ, so follow the installation instructions on this website and enjoy...


-o- MIGRATION ? -o-
Okay, some of you will want to migrate their actual RadioDJ configuration to this server. Here are some other steps.

First of all, you will need to export the database of your actual version.

Using Heidi, click on Tools / Export SQL
- Choose the radiodj161 database ONLY
- On the settings, check "Table(s) CREATE" and on DATA select "DELETE + INSERT (truncate existing data)"

Save the file.

Edit it (because there will be an unknown bug on the export), and search for "history"...
Replace
CREATE TABLE `history` (
by
CREATE TABLE IF NOT EXISTS `history` (

Then on the server side, AFTER HAVING INSTALLED RadioDJ, launch Heidi, load the exported mysql file and execute it.

All your database should have been imported.

Second, you will need to export/import your audio files.
I've made a quick PHP program that will help for that :

http://www.radiodj.ro/community/index.php?topic=7232.msg42698#msg42698

You can run it installing/using XAMP

I've made a little bit modification on it so look at the last message on the thread if you've got copy error message.

Finally, you will probably have to copy your plugins & configuration.
Simply copy / paste your plugin folder for them to work again on the server.

And copy/paste also the file settings_general.xml... And of your logo.png if you have changed it.

---

Now launch your radiodj, click on Utilities, then Relocate Tracks
Specify the new folder(s) containing your audio files and Start...
This will find the files and rewrite their path to access them.

---

If you see RadioDJ going crazy (say having no files, or only your jingles, or things like that), it is certainly because it has set a lot of songs to disable... I don't know why it does that, but it happens sometimes.

Go to Heidi SQL, open a new Request Tab and type :
Code: [Select]
UPDATE songs SET enabled=1
Warning : it will re-enable ALL your disable audio files.

The better you've to do is it get the IDs of the files YOU've disable by storing the result of this request :
Code: [Select]
SELECT GROUP_CONCAT(id) FROM songs WHERE enabled=0
Copy the result...

Then you will be able to execute an updated version of my previous command on your server, something like :
Code: [Select]
UPDATE songs SET enabled=1 WHERE id NOT IN (...paste the id list here...)
So it should looks like a line like this (of course here the numbers are fake, you must paste the ones you've previously obtained by the GROUP_CONCAT command) :
Code: [Select]
UPDATE songs SET enabled=1 WHERE id NOT IN (289,332,405,412,563,1024,1077,1083,1090,1196,1237,1290,1379,1419,1434,1463,1504,1561)

-o- Encoders / Shoutcast ? -o-

Well if you're like me and do prefer to rent a shoutcast server, that is already configured to stream your radio, then you will need to configure the encoders section of Radio DJ ...
AND
To open the port in your Windows Server :
Click on Windows, then search for "Windows firewall with advanced security"
Into both inbounds & outbounds rules,
- add one Program rule for each authorize Radio DJ to operate with network
- add one Port rule, TCP, and indicates into local & remote port the one (or the multiple) to be used to stream to your shoutcast provider

I hope this will help you too guys. If I find some others things, I'll let you know.

Regards,

CutMaster / Laurent.

PS: you can listen to the result here : http://cloudrad.io/cutmaster  ;)
« Last Edit: April 23, 2017, 01:53:48 AM by cutmaster »
The Revival of WOW FM with Radio DJ

http://www.cloudrad.io/cutmaster

Best Dance Music from 80's, 90's to today

Offline neutralhills

  • ****
  • 341
  • Nil sine labore.
    • squirrel.fm
Re: Install RadioDJ On Windows Server / Virtual Windows Server
« Reply #1 on: April 23, 2017, 04:45:48 PM »
This motivated me to do some exploring in HeidiSQL, so, thanks for that! I learned a few new useful things. :)

Also, currently rocking out to WOW FM while I'm getting lunch ready.
Squirrel FM : Always playing with our nuts!
www.squirrel.fm
Studio systems running RadioDJ & Rivendell (occasional only)
Flow 8 Deck & PlayIt Cartwall for live mixing and assist.
Remote systems running RadioDJ
Pioneer DDJ-SX control surface.

Re: Install RadioDJ On Windows Server / Virtual Windows Server
« Reply #2 on: April 26, 2017, 04:37:12 PM »
Can I add to your tutorial for Microsoft hyper v copy your filename.vhd(filename where name of your file) file to a safe place so as to back it up in case something happens to your server you can have a back up i back up my vhd nightly just making a backup to a secondary physical system.
Nick DeFosset
GM/IT Operations
Heart Radio USA
www.heartradiousa.org
"The Station That Just Dosen't Play Your Grandmas Church Music"

Offline DJ Garybaldy

  • *****
  • 4271
  • Don't Shoot! I'm only the Moderator
    • DJ Garybaldy Blog
Re: Install RadioDJ On Windows Server / Virtual Windows Server
« Reply #3 on: April 26, 2017, 04:39:03 PM »
Can I add to your tutorial for Microsoft hyper v copy your filename.vhd(filename where name of your file) file to a safe place so as to back it up in case something happens to your server you can have a back up i back up my vhd nightly just making a backup to a secondary physical system.

Never hurts to have too many backups. I have at least 3 VDI's (Using VirtualBox) backed up of Windows 10 in different places.

Retired DJ & Proud USER of RadioDJ since 2010

https://djgarybaldy.blogspot.com/
https://djgarybaldy.blogspot.com/2020/08/radiodj-frequently-asked-questions-faq.html

Database repair: https://tinyurl.com/dbrepairradiodj

https://djgarybaldy.blogspot.com/p/about-me.html

Re: Install RadioDJ On Windows Server / Virtual Windows Server
« Reply #4 on: April 30, 2017, 07:06:53 PM »
Can I add to your tutorial for Microsoft hyper v copy your filename.vhd(filename where name of your file) file to a safe place so as to back it up in case something happens to your server you can have a back up i back up my vhd nightly just making a backup to a secondary physical system.

Absolutely right, that is a good idea  :D
The Revival of WOW FM with Radio DJ

http://www.cloudrad.io/cutmaster

Best Dance Music from 80's, 90's to today

Re: Install RadioDJ On Windows Server / Virtual Windows Server
« Reply #5 on: August 01, 2020, 12:58:51 PM »
Hi, I am installing radiodj on a windows 2016 platform as well and have installed the virtual audio cable software. However, I cannot select the virtual audio in Radiodj. The vc audio does show up in the devices though. Can you please explain how you got this working on ws2016?

Adrian