Raspberry Pi - Listen to your music streaming with Ampache

Here's a new tutorial for remote playback you have at home, and via a functional web interface thanks to Ampache.

Ampache-text-logo-en

 

We have already seen several method to broadcast your music : MPD and Subsonic. Today it is another tool that you can install : Ampache.

I took as prerequisites that the music would be installed in the directory /media. Here I copied/pasted from my iTunes library directory.

Capture_d_écran_11_06_13_19_09

 

  1. Install Ampache and its themes
    apt - get install –y ampache ampache-themes

    (You may need to install mysql-server)
    When installing validate the configuration of the web server application (an Apache Server)

  2. Change the rights of the directory where is located the Ampache database
    chown -R www-data:www - data/usr/share/ampache/www
  3. Edit the file /etc/PHP5/apache2/PHP.ini and change the value of max_execution_time by setting its value to 60
  4. Restart Apache
    Service apache2 restart
  5. Now you need to connect to the ip of your machine : http://<IP of the raspberry>/ampache
    Capture_d_écran_12_06_13_19_03
    Check that everything is green and then select your installation language
  6. Step 1 : fill the screen with the information requested to the database
    Capture_d_écran_12_06_13_19_21
  7. Step 2 : Configure the database. You may need to first download the file /usr/share/ampache/www/config/ampache.cfg.php with the link provided on the page
  8. Step 3 : create an admin for the first connection account
    Capture_d_écran_12_06_13_20_00
  9. Et hop dès le début une mise à jour 🙂
    Capture_d_écran_12_06_13_20_04
  10. You can then add your music either from directory on the server or from catalogues already existing on other Ampache servers (It tells you a mega giant music library ? 🙂 )
    Capture_d_écran_12_06_13_20_39
  11. You can configure your catalog
    Capture_d_écran_12_06_13_21_01
  12. Here is the result after the addition of music
    Capture_d_écran_12_06_13_21_30
  13. For a remote connection with an external application, You must allow the use of the API :
    Capture_d_écran_13_06_13_19_08
  14. You can now connect to your server. IOS you have iAmpache (iPad compatible with zoom) and Amdroid for Android.
    Amdroid : audio player for Ampache on Android

    Amdroid : audio player for Ampache on Android

    iAmpache : lecteur audio pour Ampache sous iOS

    iAmpache : audio player for Ampache IOS

    For a connection from the internet, Remember to open your firewall per port 80 in TCP and use a domain like no - ip name (You can read the tutorial here).

So much for Ampache. On the same principle you can also install Subsonic. The list of guests is available here.

You may also like...

  • TuxGasy

    Merci pour ce tuto!
    However, It lacks some details :
    - It is necessary to restart apache after you modify the php.ini file
    - You need to install the MySQL Server
    - Step capture error 2 configuration

    • MySQL installs automatically with Ampache-driven dependence. Pour le reste je vais corriger 🙂
      Thank you

  • I've always had trouble with the app Android for Ampache and the slowness of a particular connection. It works properly in you ?

    • I have not tested roaming but locally only. So it is not very revealing. Thanks for the info.

  • Halukard

    HS : Excellent taste level music if you took you even catch ^^

    I now have my nas which allows me to do that, but I had looked the above at the time rather than on subsonic and java which pretty pumped me my resources.

    • The screenshots of the web interface it is me (avec les Black keys 🙂 )

  • Goran

    Great musical taste 🙂

  • Sango

    Hello,

    Unable to pass the step # 1 : everything is “Green”, but after validation of the step # 1, I get the following error message :
    Error: Unable to make Database Connection can't connect to local MySQL server through socket ' /var/run/mysqld/mysqld.sock’ (2)

    Do you have an idea of the problem ?

    Thank you in advance.

    • Hello,
      MySQL works well ? ps -ef | grep mysql
      If this is not the case should be
      service mysqld start

    • Sango

      error on my part : Let's install myslq-server (car il ne s’installe pas avec ampache 😉 )
      Thanks for your tutorial !
      @

  • Spart34

    Hello,

    Like any other tutorial of this site, I am very interested in the instalation of Ampache on my server RPI (almost installed using the info from this site).
    However, There is mention of the Apache Server. Gold, as you listed it in the tutorial on the installation of a web server, NGINX is lighter and therefore more suited to RPI than Apache.
    Being familiar with NGINX configuration, I'm looking for the NGINX for Ampache configuration file.
    Would you have it handy?
    In advance thank you.

    • Hello,
      Unfortunately not. Memory I had failed with NGinx or so he integrated Apache. So I did not config Nginx. However if you arrive I'm interested ! 🙂

  • vinzouille

    hello,

    I did install ampache.
    Local no worries however from the net…
    Forbidden

    You don't have permission to access this file on this server.
    Cheyenne/2.2.8 Server at localhost Port 80

    The port 8080 is open on the freebox and I did a chmod-r 775 on/usr/share/ampache/www
    (I also did it on/var/www).
    Si tu as une idée je suis preneur 🙂

    • vinzouille

      port 80 Open forgiveness… with a redirect on port 80 PI

      • You use Apache ? Have you looked into its full message log (that the browser corresponds to the HTTP error) ? There must be more info on the reason dating ? Can be a restriction of access to your site to only the local network

        • vinzouille

          Hello,

          as lowest says yes I use apache and chrome.
          While rummaging through the developer options I could find as an info:
          403 (Forbidden)
          Not talking short, apparently I have a pb of law on a directory so that I'm willing to bet that I did a chmod 755 everywhere

          • Sorry, Apache I do control not. You have to look in the logs (Surely in/var/log)

        • vinzouille

          OK I'll look.
          HS breakfast. I installed MPD by following your tutorial + un commentaire expliquant la config pour pouvoir utiliser le client android ça marche du feu de Dieu 🙂

  • vinzouille

    Salut merci pour la réponse rapide 🙂
    Yes I turn with Apache.
    Je vais regarder les logs ce soir je te tiens au courant 🙂

  • Christophe

    Thank you for this tutorial, I was looking for a long time a solution to host my music on my Pi Raspberry !
    The coup, je vais me lancer pour d’autres tutoriaux de votre site 😉

  • Lionel

    Merci pour ce tuto.
    Just a question : I do not see the player in the interface; I am obliged to go through iAmpache to listen to the music. Yet, There is a HTML5 player according to the site of Ampache.
    Is this a problem due to the Raspberry or I omitted something ?
    Thank you.

    • See if it is not a new feature since writing the article

  • Pingback: Qué hacer con un Raspberry Pi | Aqui - Log()

  • Pingback: Qué hacer con un Raspberry Pi | Aqui Carattino()

Handpicked links

disk Page Caching using disk: enhanced Database Caching 139/483 queries in 0.299 seconds using disk Served from: pihomeserver.fr @ 2017-08-31 19:21:43 by W3 Total Cache -->