Awesome Music server = Your existing Ubuntu 8.10 Desktop + Ampache + Rhythmbox, Oh My!
One of the problems we were running into in our home was the distribution of media files, specifically music. My desktop has a nice 300+ Gigs of hdd space on it, so it's fairly easy for me to host all of the music on separate partitions (pretty useful when the smaller systems in the house need to update, or fresh install), but the transferring of files over the lan got tiresome, and my wife likes quite a bit of my music collection, and is really out of room on her laptop. Likewise, my daughter's desktop is in serious need of hdd space, and she has a growing musical "habit". Also, I want my music in places other than the room my desktop is in, other than the apartment my computer is in, and I don't have an mp3 player large enough for all of my files.
The solution was to find a way to host all of the files on my desktop, and to allow access to them in a nice streaming sort of way. I didn't want to just open up lan access to my partitions, I only share out one small folder for samba, and like to keep it that way. So I went out and found me some Ampache! And it was good...Ampache is a PHP based music server that uses a MySql database to store its information. It allows users to browse online music collections, build playlists, stream content to a desktop music player, or even download the tracks. There is quite a bit of flexibility with Ampache, it's theme-able, providing a nice user interface, has album art support and all the bells and whistles you could want. You can add users through the web interface and set access levels, so security is a no-brainer. There's a working demo here to get a feel for how it plays.
I simply installed the "AMP" portion of the LAMP stack on top of my existing Ubuntu desktop installation (this is easily done using the tasksel command from the terminal), installed and told Ampache to catalog all of the files in my music partition, and ran it from there. Then the hits kept on coming, I found a nice plugin for Rhythmbox that connects to the Ampache backend and loads your Ampache catalog right in your music browser! Happy, if you like Rhythmbox. Also, in Amarok2 there is built in support for subscribing to Ampache servers. Neat.
So, after enabling the plugin on all of the client computers, all they have to do is fire up Rhythmbox, and they all have seamless access to my entire music collection. They get thier music fix, I look like a wizard!
Now, Ampache is in the repo, so after enabling community repo's, apt should get 'er done, but I have it installed manually. Here's how to do it:
- Install the rest of the LAMP stack by opening a terminal and typing in
sudo tasksel
select LAMP server and continue, following the instructions and answering the questions provided. Make sure to write down all of your answers!
- Also install phpMyAdmin To help manage the database in an easy way.
sudo apt-get install phpmyadmin
Now you can browse to
localhost/phpmyadminwith Firefox and login with the credentials you created during the LAMP install and create the required database and user for Ampache. Write this information down. - Install Ampache
- Using the command line you can do this with apt-get
sudo apt-get install ampache ampache-themes
- OR You can get the latest, most up to date release manually. You just need to
- Download the package by visiting this link
- Unpack it into your directory of choice, your
/var/www/folder is a good candidate if you are using a default LAMP install, and rename it so that it is easy to browse to. Something like/var/www/music/ - Open your web browser to
localhost/musicand follow the instructions. You will need the username and database information you created in phpmyadmin. Make sure to write down user name information when you create your Ampache admin user.
- Using the command line you can do this with apt-get
- Now you should be able to browse to
locahost/musicwith Firefox, and log in. So go ahead and do this.- Go to the admin tab, and choose
Add Catalog. Fill in the form and submit. This can take some time for large file systems. - In the admin tab, choose
Add Usersand add as many users as you need. - Still in the admin tab, choose
add acland add in some access control lists. Make the first one- Name
Stream Access - Start Address
0.0.0.0 - End Address
255.255.255.255 - Level
Read - User
Ampache User (system) - Key Leave Blank
- Type
Stream Access
make another one
- Name
Interface Access - Start Address
0.0.0.0 - End Address
255.255.255.255 - Level
View - User
Ampache User (system) - Key Leave Blank
- Type
Web Interface
- Name
- Go to the admin tab, and choose
- In your terminal
sudo gedit /var/www/music/config/ampache.cfg.php
and find the section that looks like this
; Use Access List ; Toggle this on if you want ampache to pay attention to the access list ; and only allow streaming/downloading/xml-rpc from known hosts xml-rpc ; will not work without this on. ; NOTE: Default Behavior is DENY FROM ALL ; DEFAULT: false ;access_control = "false"
and change it to look like this
; Use Access List ; Toggle this on if you want ampache to pay attention to the access list ; and only allow streaming/downloading/xml-rpc from known hosts xml-rpc ; will not work without this on. ; NOTE: Default Behavior is DENY FROM ALL ; DEFAULT: false access_control = "true"
Save the file and exit gedit.
- Almost Done! Repeat this next section on every client computer.
- Get the Rhythmbox plugin by clicking here. The home page for this plugin is here, and a discussion on the Ampache forums about it can be found right here.
- Unpack the plugin into the client computer's
/home/YOUR_USER_NAME/.gnome2/rhythmbox/pluginsfolder and fire up Rhythmbox. - In Rhythmbox go to
Edit==>Pluginsand click on the new Ampache plugin, and click configure. - If the lan ip of the server is 192.168.1.3, and it should be static, then set the url to
http://192.168.1.3/music/server/xml.server.phpFor good measure you can enter in the password for the user, but leave the name blank. - Save your settings and wait for the library to load, this may take some time for large collections. Also, these setting work for me, if you have problems, check out the forum link I posted.
You should now have your music collection showing up in everybody's Rhythmbox library! Neat! This is particularly useful if you have a laptop in the living room or kitchen, and your collection of music is in the bedroom or study, and you need some tunes! You can also use this on a server with access from the internet if you have a static ip, or use DynDNS.org or some similar service. I use it to listen to music on my netbook while on campus. We also seem to be more into using the web interface than the Rhythmbox interface, since it simply can do more with the music. This setup (Ampache) is particularly nice, since it is not desktop environment, music player, 3rd party protocol or platform dependent. All you really need is an internet browser. What's more: This solution is 100% F/OSS.
What's also great about this setup? Now you have a working lamp install, and can experiment with other platforms (like Drupal!), and learn yourself some new skills.
Drawbacks? Well,the plugin doesn't seem to be actively maintained (any takers?), and if you use it you have to wait for the library to load every time you start Rhythmbox and this hang can take a few. Other than that, Ampache works wonderfully for us, I hope it works well for you, too!
Let me know what you think!
EDIT 2-2-2009:
As if my favorite media server application wasn't already awesome enough: Ampache is getting video support! Hell yes!


daap
rhythmbox has DAAP built right into it, all you have to do is start it, point it at your collection, and enable the daap plugin. Then enable the daap plugin on all the clients, and, as long as they're on the same subnet, your server will show up right in their rhythmbox and your music is seamlessly integrated. It works well for my 50 GB collection.
If you want to keep your server headless, or just dont want to leave rhythmbox running all the time, you can install mt-daapd, which is in the repos, and will do the same thing for your rhythmbox clients.
daap
So, if all you need is lan access and your music player has support for it, DAAP can work for you, but if you are interested in accessing your files from the internet, or want more bells and whistles, then Ampache is a fun, stable, and very usable way to go. Ampache can solely run off the web interface, freeing up any need for a specific music player, or even operating system. The web interface also allows you to create, save, or download playlists, show others what you are listening to, and use an embedded flash mp3 player as well, which is nice when you're on the road or at someone else's computer (so long as you have decent upload capacity at home).
I've also heard of using Coherance with Ampache, and using an UPnP device to stream the music to, instead of a computer. This is my next step.
squeezecenter
I have not used Ampache, so cannot speak about its functions, but I have been using Squeezecenter for some time. It is a music server with a web forntend that lets you stream to any device or player that will play an mp3 stream. There is also a Java app player that works well. You can stream over the internet, and it handles large collections and random playlists really well. It is still in active development as it is the music server for a device called the squeezebox. Squeezecenter is open source, and they have a debian repo that works for Ubuntu installs. It can also stream pretty much any format you may have collected over time.
Mobile streaming?
Does that stream to say..my internet enabled Centro? I am waiting for something that can do that...or waiting to find something that can stream to my cell form home. That...would be sweet.
streaming to cell from squeezecenter
Just FYI
On a similar note, I, along with a helpful contributor, have managed to create a "drop box" using Samba that allows anyone with access (local LAN usually) to add files and directories to a common share, but *not* and this is the important bit, be able to delete anything... Useful for storing your family photos and we also use it for storing our music too.
http://www.theopensourcerer.com/2008/04/17/a-shared-drop-box-using-samba/
Cheers
Download link
you have a quote in the ampapache download link.
download link
Fixed...thank you!
what about sshfs?
This sounds little complicated. Isn't it just a matter of automounting folders in another machine with sshfs? It has been a stable and fast solution in my home.
There's really nothing
There's really nothing wrong with sshfs, or complicated about this one. All you do is:
Optionally you can
The benefit of this is what I find to be a particularly snazzy web-based front end, with a built in player, that requires absolutely nothing from the client devices. It requires no specific media player, no specific desktop environment, no specific operating system, and no other protocol other than what is already a part of a typical installation on 99.999% of systems: an internet browser, (and optionally a media player that can handle a stream).
What's more, you can connect to this from absolutely anywhere, track who is listening to what, etc. I'm not saying this solution is for everyone, but it's something we find very useful and fun! What's even more than that, I have heard of people successfully using Coherence to connect to the Ampache backend, and then using upnp enabled devices (such as the PS3) to interact with the databse acting as a front end...even neater! So you just browse the entire media library from your PS3, or similar device, right on your TV.
I know there are several ways to go about sharing media on a lan, or over the internet for that matter, and there are drawbacks and benefits to each all of these ways. Here is my favorite set up. I find it very flexible, stable, attractive and easy to use!
http://www.kplaylist.net/
http://www.kplaylist.net/ .... being using it for 5+ years. Still the best and easiest option for exactly what you are wanting to achieve.
Best damn player in the universe!
What's nice about Kplaylist: it appears simple, clean with a nice polished look, and lightweight.
Drawbacks: This simplicity appears to leave the interface not quite as full and feature rich as Ampache's for my taste. The Ampache interface is just more...engaging and information rich. There is just more information about what is going on with the music and what is available, and it is presented in a more exciting way. Also, I don't see a way to allow streams to play on music players other than the embedded player on Kplaylist. In other words, to download the playlist and play it on rhythmbox or winamp something like this. Perhaps this is a feature not advertised on the site, and not enabled in the demo? It seems a pretty basic feature, so it should be there. If it is, it's not easy to locate, so the usability score drops.
Also, can you access the backend of Kplaylist with plugins? How easy is it, if you can? Can you use it with Coherence, and make it upnp compatible? How does it fare on internaet enabled mobile devices like a palm centro or blackberry? (Without icecast)
It seems the two approaches, Kplayklist and Ampache, share some basic qualities: Icecast integration, custom playlist creation, a multiuser environment with an optional shoutbox, and other basic features, but Ampache stays on my server, since it seams more feature rich...more options for the end user, and still easy to use. Perhaps I'll give kplaylist another whirl, I passed it up on my search for solutions when I found Ampache because it seemed overly simple, and Ampache seemed more complete.
So, when you guys let the rest of us know about your solution, can you please try to be more specific about WHY it's better for you, and what problem does it solve, and not just "This is the best...etc."? That would be great. I'm hoping to hear more great solutions from my readers, keep 'em coming.
I love suggestions and am a big fan of options, particularly open source options,so keep 'em coming!
playing from browser
Easy as pie
Volume?
subsonic
ampache + ampache
hm...
If I understand you, you want to be able to set up your downstairs (satellite) system to access your upstairs music library (server), and use a third system, your laptop, to control both of them in sync.
The ampache support irc room is in #ampache on freenode.
I asked and this is what I was told:
So you want to set up your server (upstairs) with
mpd -> icecast, and have it controllable using democratic play, tuning your clients into the icecast stream. I believe that once that is set up, you can mess with the configuration any way you want.I would really like to know the outcome, let me know!
Where is the flash player?
Easy...
After logging in, in the upper right hand corner there is widget to select to "stream" the playlist, which will spit out the playlist file which you can open with just about any desktop media player,
or to use the "flash player" to play the playlist,
which will pop up the embedded flash player.
Hope that helps.
Ampache Installation
For use on a palm pre for a non geek...
little confused...
re:little confused
Post new comment