I wanted to share with the community a set up that made me really happy. Now I can access more than 500GB of music from raspbian using my android mobile as a remote control. The music server I'm using is mpd, and my music files are stored in a remote server accessible through the internet using ssh. To automatize the operation, I configured autofs and ssh rsa key authentication and works like a charm!
Here is what I did (SERVER and USER represent your specific remote host and user):
1- Install software
Code: Select all
sudo apt-get update
sudo apt-get install mpd mpc sshfs autofs
Code: Select all
sudo ssh-keygen -t rsa
sudo ssh-copy-id USER@SERVER
Add the following line to /etc/auto.master:
Code: Select all
/mnt /etc/auto.sshfs uid=1000,gid=1000,--timeout=30,--ghost
Add you remote mounts to /etc/auto.sshfs
Code: Select all
SERVER -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs\#USER@SERVER\:
Code: Select all
sudo service autofs restart
ls /mnt/SERVER
I'm running mpd as pi user. Here is a summary of the options active in /etc/mpd.conf:
Code: Select all
music_directory "/mnt/SERVER/musica/id3db"
playlist_directory "/home/pi/mpd/playlists"
db_file "/home/pi/mpd/tag_cache"
log_file "/home/pi/mpd/mpd.log"
pid_file "/home/pi/mpd/pid"
state_file "/home/pi/mpd/state"
sticker_file "/home/pi/mpd/sticker.sql"
user "pi"
audio_output {
type "alsa"
name "bcm2835 ALSA"
device "hw:0,0"
format "44100:16:2"
mixer_type "software"
mixer_device "default"
mixer_control "PCM"
mixer_index "0"
}
5-Start mpd and update your database
This may take some hours, depending on your connection and the size of your music library.
Code: Select all
sudo service mpd restart
mpc update
From linux, I'd recommend GMPC, and from andriod, MPDroid. For windows clients, I cannot recomend any, but there seems to be plenty of them: http://mpd.wikia.com/wiki/Windows_Compatibility
Cheers.