My convoluted Subsonic server setup

By , 2016-05-15 21:23

Since ending my colo server plan, my Subsonic server hasn’t been running. I used to just have all my media synced to the Proxmox server I had in colo, then bind-mounted that folder to the OpenVZ container that was running Subsonic.

I’ve now moved my Proxmox/Subsonic server to a little Zotac ZBOX on my LAN that only has one local disk so I figured I wouldn’t sync all my music over locally when it could just directly access it from my new FreeNAS box. Turns out this is a little bit more complex than I thought – here are the steps I did to get it working:

  1. Get all music onto the FreeNAS box. For this I’m still using BTsync. One client is on my Mac, sharing my iTunes library, the other is in a FreeNAS jail.
  2. Install Subsonic in an LXC container on the Proxmox server.
  3. Create an NFS export on the FreeNAS server and mount it as storage on Proxmox. I just used the “Add storage” option in the Proxmox Web UI rather than adding it to fstab, because I was lazy.
  4. Configure the LXC bind mount. Essentially, in /etc/pve/104.conf :
     mp1: /mnt/pve/freenas,mp=/mnt/freenas
  5. Set up Subsonic to scan the /mnt/freenas/music folder.
  6. Realize that Subsonic has issues with non-ASCII characters in filenames. Fix it by adding “export LANG=en_CA.UTF-8” to the subsonic.sh start script.
  7. Realize that Subsonic has no access to write to the NFS share, since the GIDs on the FreeNAS box and the Subsonic container don’t match. I use GID 500 = users as my main group on FreeNAS, so I created a group freenasusers with GID 500 in the Subsonic container and added the subsonic user to this group.

Probably missed some steps, but that’s the gist of it. I really need to get my blogging and documentation back on track.

Leave a Reply

 

Custom theme by me. Based on Panorama by Themocracy