Track/Directory import


 ☰  menu

Installing RadioDJ on a virtual server by cutmaster / Laurent

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.

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

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

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 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 : 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 : 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 : 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) : 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.