Madsonic Documentation

Installing Madsonic

Madsonic features several flexible installation options. Select the one which suits you best:

Important!

Immediately after installing Madsonic you should change the admin password to secure the server. Point your browser to the Madsonic web page (see URL below), and log in with username admin and password admin. Go to Settings > Users to change password and create new users.

Java installation

Introduction

Java is a technology originally developed by Sun Microsystems, and acquired by Oracle. The following are the prevalent implementations:

  • OpenJDK: The OpenJDK project is an open-source implementation of the Java SE Platform.
    This is the default version of Java that is provided from a supported Ubuntu repository.
    Currently, there are two versions available, openjdk-7 and openjdk-8.
  • Oracle Java: Oracle Java is the proprietary, reference implementation for Java.
    This is no longer currently available in a supported repository.
    However, one may install a supported version of Java (7 or 8) via Oracle's website, or via the WebUpd8 PPA.

Oracle Java installation

Ubuntu

To add the WebUpd8 Oracle Java PPA repository and install Oracle Java in Ubuntu, use the following commands:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update

Java 8


sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default

Debian

To add the WebUpd8 Oracle Java PPA repository and install Oracle Java in Debian, use the following commands:

sudo echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
sudo apt-get update

Java 8


sudo apt-get install oracle-java8-installer


After the installation is finished and you wish to see if it was successfully, you can run the following shell command:

java -version

It should return something like this:

Java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

If for some reason, the Java version in use is not 1.8.x, you can try to run the following command:

to display: sudo update-java-alternatives --list
to config: sudo update-alternatives --config java

Windows

To add Java, use the following installer: Java 8 or later (Download).

After the installation is finished and you wish to see if it was successfully, you can run the following shell command:

java -version

It should return something like this:

Java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Apple

To add Java, use the following installer: Java 8 or later (Download).

After the installation is finished and you wish to see if it was successfully, you can run the following shell command:

java -version

It should return something like this:

Java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Requirements

  • JAVA Version 1.8.0_131
  • Tomcat Server 8.x
  • Jetty 8.x

Windows installation

Windows Installer

On Windows, the easiest way to install Madsonic is using the provided Windows Installer: madsonic-x.x-setup-xx.exe.

It installs Madsonic as a service, available in Control Panel > Administrative Tools > Services, that is started automatically when you log on to Windows.

It also creates links in the Start Menu: Start > All Programs > Madsonic. From this menu you can start/stop the Madsonic service, open the Madsonic web page, or change basic settings such as which port number Madsonic should use. You can also click on the little yellow submarine tray icon.

If you're upgrading an existing Madsonic installation, you don't have to uninstall the old version first. In any case, the existing Madsonic settings are preserved.

After installing and starting Madsonic, open the Madsonic web page on http://localhost:4040.

Mac installation

Mac Installer

Requirements: Java 8 or later (Download).

Download the installation package and run it. This installs Madsonic.app in Applications. Start it by opening Applications and click the Madsonic icon. A small Madsonic icon will appear in the menu bar. If you want Madsonic to start automatically when you log in, open System Preferences > Accounts and add Madsonic to the list of Login Items.

After installing and starting Madsonic, open the Madsonic web page on http://localhost:4040.

Advanced configuration

To change the port number, Java memory settings or other startup parameters, edit /Applications/Madsonic.app/Contents/MacOS/universalJavaApplicationStub.

Troubleshooting

If Madsonic doesn't start properly you can troubleshoot it by starting it from the command line: /Applications/Madsonic.app/Contents/MacOS/universalJavaApplicationStub.

Also check the logs in /Library/Application Support/Madsonic.

Debian/Ubuntu installation

Linux Installer

This installation option applies to Debian Linux, including Ubuntu.

  • First, install Java: sudo apt-get install openjdk-8-jre
  • Download the Madsonic .deb package and install it: sudo dpkg -i Madsonic-x.x.xxxx.deb

Notice that the installer configures your system to start Madsonic automatically when booting. After installing, open the Madsonic web page on http://localhost:4040.

Change user

By default the Madsonic process is run as the root user. To improve security it is strongly advised that you run it as a dedicated user with less powerful privileges. You can specify this user by setting the MADSONIC_USER variable in /etc/default/madsonic.

Note that non-root users are by default not allowed to use ports below 1024. Also make sure to grant the user write permissions in the music directories, otherwise changing album art and tags will fail.

Advanced configuration

To change the port number, Java memory settings or other startup parameters, edit the MADSONIC_ARGS variable in /etc/default/madsonic. To restart Madsonic, do sudo service madsonic restart

Troubleshooting

Check the logs in /var/madsonic.

Red Hat/Fedora installation

This installation option applies to Red Hat Linux, including Fedora.

  • First, install Java: sudo yum install java-1.8.0-openjdk
  • Download the Madsonic .rpm installation package and install it: sudo yum install --nogpgcheck Madsonic-x.x.xxxx.rpm
  • If nothing happens, try to remove the old version first (all settings will be retained): sudo yum remove Madsonic

Notice that the installer configures your system to start Madsonic automatically when booting. After installing, open the Madsonic web page on http://localhost:4040.

Change user

By default the Madsonic process is run as the root user. To improve security it is strongly advised that you run it as a dedicated user with less powerful privileges. You can specify this user by setting the MADSONIC_USER variable in /etc/sysconfig/madsonic.

Note that non-root users are by default not allowed to use ports below 1024. Also make sure to grant the user write permissions in the music directories, otherwise changing album art and tags will fail.

Advanced configuration

To change the port number, Java memory settings or other startup parameters, edit the MADSONIC_ARGS variable in /etc/sysconfig/madsonic. To restart Madsonic, do sudo service madsonic restart

Troubleshooting

Check the logs in /var/madsonic.

FreeBSD installation

This installation option applies to FreeBSD.

  • Update FreeBSD System: sudo freebsd-update fetch install
  • Update FreeBSD Ports: portsnap fetch update
  • cd /usr/ports/multimedia/madsonic
  • sudo make install clean

Troubleshooting

Check the logs in /var/db/madsonic.

Centos installation

This installation option applies to Centos.

  • First, install Java: sudo yum install java-1.8.0-openjdk
  • Download the Madsonic .rpm installation package and install it: sudo yum install --nogpgcheck Madsonic-x.x.xxxx.rpm
  • If nothing happens, try to remove the old version first (all settings will be retained): sudo yum remove Madsonic

Notice that the installer configures your system to start Madsonic automatically when booting. After installing, open the Madsonic web page on http://localhost:4040.

Change user

By default the Madsonic process is run as the root user. To improve security it is strongly advised that you run it as a dedicated user with less powerful privileges. You can specify this user by setting the MADSONIC_USER variable in /etc/sysconfig/madsonic.

Note that non-root users are by default not allowed to use ports below 1024. Also make sure to grant the user write permissions in the music directories, otherwise changing album art and tags will fail.

Advanced configuration

To change the port number, Java memory settings or other startup parameters, edit the MADSONIC_ARGS variable in /etc/sysconfig/madsonic. To restart Madsonic, do sudo service madsonic restart

Troubleshooting

Check the logs in /var/madsonic.

Stand-alone installation

Requirements: Java 8 or later (Download)

This is Madsonic with an embedded Jetty server, and can be installed on any Windows, Linux, Unix, FreeNAS, unRAID etc operating system.

  • Unpack madsonic-x.x.xxxx-standalone.tar.gz to MADSONIC_HOME/standalone. MADSONIC_HOME is typically c:\madsonic
    on Windows, and /var/madsonic on Unix-based operating systems.
  • Optionally configure the startup script MADSONIC_HOME/standalone/madsonic.sh
  • Execute the startup script. (Typically you will configure your operating system to execute the script automatically at start-up.)
  • Open the Madsonic web page. The default address is http://localhost:4040.

Synology installation

Requirements: Java 8 or later (Download).

DSM Package Center
  • prepare Synology hardware
  • uupdate to latest Synology DSM firmware
  • create new Volume
  • create shared folder: Public
  • create folder: <Public>\Madsonic (for backup/restore)
  • activate User home service
  • install Perl module
  • install JavaManager module
  • download latest java jdk =< 1.8.0_131
  • upgrade Java
  • reboot Synology
  • check Setting: select installation from all publisher
  • install madsonic-6.x.xxxx-DSM6.spk
  • set read/write access to share/volume for user Madsonic

Java Notes

  • Update to latest Java Version if you have problems with SSL.
https://bugs.openjdk.java.net/browse/JDK-8175885 Link
http://bugs.java.com/view_bug.do?bug_id=8173960 Link

Install Notes

  • The first start take some time before the web interface is accessible.

Advanced configuration

To change the port number, Java memory settings or other startup parameters, edit
the variables in /usr/syno/synoman/webman/3rdparty/Madsonic/madsonic.sh.

Troubleshooting

Check the logs in /usr/syno/synoman/webman/3rdparty/Madsonic/madsonic_sh.log.

QNAP installation

Requirements: Java 8 or later (Download)

DSM Package Center

  • Install plugin: QMadsonic_6.x.xxxx.qpkg.

Openmediavault installation

DSM Package Center

Requirements:

Installation:

  • Go to the OMV Plugin section
  • Install plugin: openmediavault-madsonic_6.x.xxxx_all.deb.
  • WAR installation

    Requirements: Java 8 or later (Download). A servlet container supporting Servlet 2.4 and JSP 2.0.

    Use this option if you want to deploy Madsonic in an external server, such as Tomcat, Jetty, GlassFish or Geronimo. Madsonic comes packaged as a standard Java web application, madsonic.war, which can be easily deployed in any compatible servlet container. The most commonly used server is Tomcat, and the rest of this section describes how to install or upgrade Madsonic on a Tomcat server.

    • Stop Tomcat if it's running.
    • Remove these files and directories if they exist:
      • TOMCAT_HOME/webapps/madsonic.war
      • TOMCAT_HOME/webapps/Madsonic
      • TOMCAT_HOME/work
    • Copy the file madsonic.war to TOMCAT_HOME/webapps.
    • Start Tomcat.
    • Point your web browser to http://localhost/madsonic (or http://localhost:8080/madsonic if you installed Tomcat on port 8080.)

    Notes

    • If you installed Tomcat as a Windows Service, you can start and stop it from the service manager: Control Panel > Administrative Tools > Services.
    • TOMCAT_HOME refers to the directory in which you installed Tomcat.
    • On Windows this is normally C:\Program Files\Apache Software Foundation\Tomcat 8.0
    • On Linux, Madsonic keeps its files in /var/madsonic. Depending on your configuration, Tomcat may not be permitted to create this directory, in which case you have to create it manually: mkdir /var/madsonic; chown tomcat:tomcat /var/madsonic

    Troubleshooting

    If you experience any problems, please make sure you follow the installation instructions above. Here's a list of suggestions of what to do if it still doesn't work:

    • Restart Tomcat.
    • Reinstall Madsonic.
    • Upgrade to the latest Tomcat version (at least if you're using Tomcat 8.0 or earlier).
    • Look for errors in the Madsonic log, c:\madsonic\madsonic.log or /var/madsonic/madsonic.log.
    • Look for errors in the Tomcat logs, TOMCAT_HOME/logs.
    • Post a message to the Madsonic forum. Please let us know what Madsonic version, Tomcat version and operating system you're using. Also, please give a detailed description of the problem. This way, we'll be able to help you faster.

    General Notes

    Madsonic 6.3 used folder structure:

    
        madsonic/
        │     
        ├── madsonic.sh
        ├── madsonic.bat
        ├── madsonic.log
        ├── madsonic.war
        ├── madsonic-booter.jar
        ├── madsonic.properties
        │ 
        ├── lastfmcache/
        │   └── last.fm cache ...
        │ 
        ├── genre/
        │   └── genremap.cfg
        │ 
        ├── conversion/
        │   ├── audio/
        │   └── video/
        │ 
        ├── db/
        │   ├── madsonic.data
        │   ├── madsonic.script
        │   └── madsonic.properties
        │ 
        ├── db.backup/
        │   └── backup files ...
        │ 
        ├── jetty/
        │   └── app cache ...
        │ 
        ├── picons/
        │   └── channel picture cache ...
        │ 
        ├── lucene66/
        │   └── search cache ...
        │ 
        ├── logs/
        │   └── log files ...
        │ 
        └── thumbs/
        │   └── thumbnail cache ...
        │ 
        └── transcode/
            ├── ffmpeg.exe
            ├── lame.exe
            └── xmp.exe
            
        
    
        /madsonic.properties
        
        #Madsonic preferences.
        LogfileLevel=DEBUG
        Port=8080
        HttpsPort=0
        ScanMode=MIXED
        GettingStartedEnabled=false
        UploadFolder=f\:\\Media\\Incoming
        PodcastFolder=f\:\\Media\\Podcast
        PlaylistBackupFolder=f\:\\Media\\Playlists\\Backup
        PlaylistExportFolder=f\:\\Media\\Playlists\\Export
        PlaylistImportFolder=f\:\\Media\\Playlists\\Import
        TranscodeFolder=d\:\\madsonic\\transcode
        Theme=madsonic_4kblack