Sonerezh – Your own Spotify

If you have your own server, one of the very first service you want to install is a web portal to access to all your musics from anywhere.

This is basically what Spotify is doing, to listen music by streaming with the possibility to create and share playlists, but not on your own server and with no control. Obvisouly, you may want to change that with an Opensource alternative.

The most popular alternative is Subsonic, written in Java (Kind of heavy then), but a new one is emerging, with a modern design and much lighter, I call Sonerezh.

Sonerezh, on top of having one of the new domain extension (.bzh, from Brittany – FRANCE), it’s written in PHP and HTML5, has a flat design, allows automatic metadata extraction, and automatically convert your audio file in MP3.

Sonerezh album

You can also make simple search and manage your playlist easily (on top of sharing them).

Sonerezh is also multi user and 2 access levels.

They even have a demo, perfect to let you try and feel how smooth and intuitive Sonerezh is.

Interested to install Sonerezh on your own server? Here is how:



To install Sonerezh on Ubuntu/Debian style of distro, you will need a web server like Apache, PHP and MySQL. If you don’t have those, simply follow this guide.


1) Install the needed requirements

You will first need git installed to clone their repo, and also PHP GD and libav-tools (To convert your tracks in MP3).

In root (Or with sudo), run:

apt-get install git-core php5-gd libav-tools

Then, make sure <code class="docutils literal"><span class="pre">mod_rewrite</span> is enabled (Still in root):

a2enmod rewrite


2) Clone their git repository into your /var/www

Still in root, clone their repository with:

cd /var/www
git clone


3) Give permission to your web server user

Still in root:

chown -R www-data:www-data /var/www/sonerezh


4) Create a dedicated database

The easiest way is probably to use PHPMyAdmin if you are not familiar with SQL language.

Simply create a database called sonerezh and add a user on it.


5) Create a dedicated virtualhost

I strongly suggest you to have a dedicated virtualhost to be able to access to your Sonerezh instance through sub.domain.tld for example and even to force HTTPS. To do so, you will need:

1) Create a A redirection in your DNS server/registrar with something like music.domain.tld to your IP

2) Have SSL certificate ready. If not you can read this tutorial. (Optional)

3) Create your virtualhost as following:

In /etc/apache2/sites-enabled/, create a file called sonerezh (or reuse one of yours), In root:

nano /etc/apache2/sites-enabled/sonerezh

and paste the following content:

<VirtualHost *:80>
        ServerAdmin webmaster@domain.tld
        ServerName music.domain.tld
        Redirect / https://music.domain.tld

<IfModule mod_ssl.c>
<VirtualHost *:443>
        SSLEngine on
        SSLCertificateFile /etc/ssl/certs/myblog.pem
        SSLCertificateKeyFile /etc/ssl/private/myblog.key

        ServerAdmin webmaster@domain.tld
        ServerName music.domain.tld

        DocumentRoot /var/www/sonerezh

        <Directory /var/www/sonerezh>
        Options -Indexes
        AllowOverride All
        <IfModule mod_authz_core.c>
            Require all granted

    CustomLog   /var/log/apache2/sonerezh-access.log "Combined"
    ErrorLog    /var/log/apache2/sonerezh-error.log


Adapt the content (Servername, webmaster email, SSL certificate, directory,…). If you don’t want to use SSL, you will need to tweak a bit this virtualhost.

When done, save the file (CTRL+X then Yes) and reload apache: (In root)

/etc/init.d/apache2 reload


6) Run the web installer

Simply go to http://music.domain.tld to launch the web installer.

Sonerezh installation

It will check if all requirements are met and you will simply need to fulfill the database configuration part and few info to create the admin account + list your musics.

And you’re good to go!


Loves to discover web-based apps to install on his own server@home and write articles about it


Add a comment