Jump to content
  • Jud
    Jud

    You Can Take It With You

     

     

    YOU CAN TAKE IT WITH YOU

    How to Bring Your Home Music Collection Along Anywhere The Internet's Available

     

    subsonic_logo.png

     

     

    Tired of having to haul a portable HDD or stack of SD cards and a laptop with you if you want to listen to your music collection away from home, or doing without when you're in the car or out walking or jogging?  Sure there are streaming services, but I haven't found one yet that has the music in my home collection conveniently organized in resolutions up to 24/192 or even DSD. Here's an inexpensive DIY method that will allow you to listen to a good chunk of your home collection wherever you are, including outdoors or in the car, anywhere there's reasonable internet (including cell) service, using little more than your phone.

     

     

    What you'll need:

    • A home computer that can access the Internet, with your music collection available directly or via network.
    • Ownership of a web domain name (I do this through iwantmyname.com for $15 a year).
    • (Optional but highly recommended) A smartphone. Virtually nothing else quite so conveniently pulls your music from the web, is able via apps to present it to you in such a convenient format, or is quite so portable as a smartphone.
    • (Optional) A way to get digital audio from your smartphone, for example Apple's Camera Connection Kit (CCK), a/k/a the Lightning to USB 3 Camera Adapter. The CCK is $39, not a lot of money if you've gone to a little trouble to make your home audio collection available to your phone.
    • (Optional) If you like, a portable DAC plus headphones and/or a way to connect the DAC to your car audio.

     

     

    I'll walk you through installation of the following software:

     

    And there will be a couple of bits of advice about configuring the AVSub iPhone app.

     

    There are other ways to do all of this, and other software in particular.  Subsonic costs $12 a year (or $99 lifetime); there's a free alternative called Airsonic.  You can use a different web server than Caddy.  There are apps for Android phones, and alternative apps for iPhones.  You can go whole hog and get yourself a web site through a hosting service instead of hosting it from your own computer with a purchased domain name.  Or you can use Plex or JRiver instead of these programs and apps.  This is just the way I happened to wind up preferring, and I'll discuss why as we go along.

     

     

    1. Make a Name for Yourself

     

    There are many domain name providers.  I started with iwantmyname.com because it was recommended by my email provider, who I like a lot, and I haven't had any reason to regret that decision since.  Prices for top level domains (.com, .net, .org, etc.) vary widely, see https://iwantmyname.com/domains .  Create a domain name for yourself under one of these top level domains, and then a subdomain for Subsonic to use, for example subsonic.yourdomainname.org.  OK, we're done.

     

    Why do I prefer this to a full on web hosting service? It's a lot cheaper, for one thing. It's also a simpler one-and-done transaction, with none of the ongoing maintenance obligations on the hosting service or usage rules/restrictions for the user. And full on web hosting simply isn't necessary to get your music collection on the web.

     

     

    2. Prepare to Communicate with the Outside World (Securely)

     

    In your router configuration, forward the following ports: 80 and 443.  These ports are used by the Caddy web server to do its magic, as you'll see below, that automatically allows you to serve your music securely and password-protected, *if* you take reasonable precautions.  What do I mean by reasonable precautions?  I mean that the passwords you use for the administrator and the other user you'll create in Subsonic (section 4 below) should be very secure.  My recommendation is to use a good password manager that will work on both your PC and your phone.  (I use LastPass, which works as both a browser extension and a phone app.)  The password manager creates long complex passwords for you that are very difficult for hackers to crack, and stores them so you don't have to remember them.  Since the password manager has all your passwords, you'll want to protect it really well.  I do this in 2 ways: 

     

    • Come up with a long sentence that has significance for you so you'll remember it, that has punctuation and one or more dates.  Then take the first letter of each word of the sentence, plus all the punctuation and dates (numbers) as the password for the password manager.  You can then recall this password any time you need it, but for anyone else it's a long string of gibberish.
    • I have set up Last Pass to use 2-factor authentication with my phone (Google Authenticator and Authy are two authentication apps for phones, and LastPass also offers one of its own).  These apps provide a string of digits (usually 6) that changes once every minute or so, and LastPass requires me to enter the string after I've entered the main password, before I can access my stored passwords.  So even if a hacker's computer would manage the unlikely feat of cracking my long gibberish main password, the hacker would need my phone plus my face or phone unlocking code to access my stored passwords.

     

    OK, that's the security lecture.  It may sound like a PITA, but if you do this you'll be able not only to protect the computer you're serving music from, but using the same practices you can keep passwords secure for your and your family's credit cards, banking and financial information, etc.

     

     

    3. Install Subsonic

     

    For Windows and Mac, download and run the installer from http://www.subsonic.org/pages/download.jsp .  For Debian/Ubuntu-based Linux distros, follow the simple instructions at http://www.subsonic.org/pages/installation.jsp#debian .  For most Arch-based distros, you will want to install yay first from the terminal:

     

    sudo pacman -Syyu

     

    Then

     

    sudo pacman -S yay 

     

    Once yay is installed, the following should work

     

    yay -S subsonic

     

     

    OK, we're done.

     

    Why Subsonic?  I found the Airsonic documentation lacking in comparison.  Plex didn't like AIFF format, which is how all my music files are stored.  And though other folks love it, I've found the JRiver and JRemote user interfaces aren't to my personal taste.  Subsonic is reasonably simple to install and configure, and quite inexpensive.

     

     

    4. Configure Subsonic

     

    You should have a running Subsonic web page on http://localhost:4040/ , username and password both 'admin' (no quotes).  (If you don't in Linux, in a terminal type

     

    sudo systemctl start subsonic

     

    then

     

    sudo systemctl enable subsonic

     

    to have Subsonic start at boot time).  You'll want to go to Settings>Users and change the admin's password immediately; it's also highly recommended to create a new user that will eventually be the one signing on to AVSub (or another app) and playing your music. Make sure any users have the right to browse and view your music files. Under Transcoding, check the box and click Save to delete the on-the-fly transcoding that plays all your files as mp3, unless you actually want that.

     

    Under Windows and I assume MacOS(which I haven't tried), adding your music folder(s) should be trivial. Just go to Settings>Media Folders and add it/them.

     

    In Linux, it can be a little more involved.  First you want to be sure your music drive(s) is/are auto-mounted at boot time, and the traditional way to do that is to edit the /etc/fstab file.  If your drive is already set to auto-mount, or you feel reasonably comfortable doing this, or reasonably comfortable you'll be able to after a quick search to learn or remind yourself how, have at it (be sure to run mount -a before rebooting so you know if you've messed up that file and can walk back your changes - otherwise, you could render your Linux installation unbootable).  But if you're unsure, my recommendation is to stick to Windows or Mac.

     

    After your music drive is mounted in Linux, Subsonic may refuse when you try to add it in Settings>Media Folders.  No problem.  In a terminal, type

     

    ln -s wherever-your-music-directory-lives /var/music

     

    That makes a 'symbolic link' (same idea as a Windows shortcut) from where your files actually are to /var/music, where Subsonic expects to find your music files.

     

    Once you've added your music folder(s), do something else for a while, like go to sleep.  It takes Subsonic a long time to index your music files (on my computer with a USB3 connection to the external HDD, 10k tracks take overnight to complete).  Subsonic indexes your files alphanumerically by folder name unless you ask it to use metadata.

     

    OK, we're done configuring Subsonic.

     

     

    5. Install Caddy

     

    For Mac, searching the Web will get you instructions for installation using Homebrew.  For Windows download the amd64 zip file from https://github.com/caddyserver/caddy/releases and extract caddy.exe to a folder you've created on your main drive called Caddy.  Don't do anything else with it yet.  For Debian/Ubuntu-based Linux distributions the instructions at https://caddyserver.com/docs/install will give you the terminal commands.  For Arch-based Linux distributions, just type the following in a terminal:

     

    yay -S caddy

     

     

    6. Configure Caddy (like taking Caddy from a baby)

     

    I started looking at Caddy because (1) I don't like Apache, the most common webserver, very much - it's complicated to configure and way overkill for a simple task like acting as security for serving your music files, which is all we need a webserver for here; and (2) the server I favored instead, nginx ("engine-x"), disdains Windows to such an extent it doesn't even have an official 64-bit Windows release.  But as I began to look further, I realized the biggest reason to use Caddy is that it's Easy!, Easy!, Easy!  (Did I mention it's easy?)

     

    For example: You want your music to be served securely, and for that you have to obtain and renew a certificate that allows you to serve your Subsonic site as https:// instead of http:// .  For Caddy, here is what you have to do to obtain and renew the appropriate certificate and start serving your site securely: Nothing! Caddy obtains the certificate the first time it runs and takes care of timely renewals automatically, behind the scenes.  (There is no cost for this.)

     

    A second painful aspect of working with other common servers is the configuration file, which is long and full of obscure terms.  Not so for Caddy.  In fact for Windows we don't even need a configuration file, just a couple of tweaks to its startup command.

     

    - Windows

    Here's the entire startup command we'll need for Caddy in Windows, which you should create as a text file (in Notepad, not Word!), then rename to Start Caddy.bat and place in the Caddy folder where you put caddy.exe:

     

    cd letterformaindrive:\caddy
        caddy reverse-proxy --from yoursubsonicsubdomain.yourdomainname.whatever --to localhost:4040

     

    Of course you'll put real entries in place of the letter for your main drive and '...whatever' above, but that is everything you need in terms of configuring Caddy to act as a secure server for your music files that have been indexed by Subsonic.

     

    We should do one last automation step in Windows to have your web server run as a service that automatically starts up when your computer boots into the operating system.  For that you want to download, install and run NSSM (Non-Sucking Service Manager - yes, really) according to the short and simple directions at step 6.1 here - LINK (go to section 6.1).

     

    - MacOS

    I don't know.  Haven't done this on a Mac yet (waiting for the new MacBook Pros to come out).  But the configuration file should look like the one in the Linux instructions below.  If anyone wants to do this on a Mac and report back in the comments, that would be great.

     

    - Linux

    This is unbelievably dead simple.  There is in all likelihood a text file in the /etc/caddy directory (which should already exist as a result of installation) named Caddyfile (with no extension).  You want to either add to and comment out what's already there so that only the following remain as valid configuration commands, delete everything and add the following, or if no Caddyfile exists, simply create it:

     

    https://yoursubsonicsubdomain.yourdomainname.whatever
        reverse_proxy localhost:4040

     

    And that (using your real Subsonic subdomain name, of course) is *it* as far as the configuration that will tell Caddy to securely serve your music files from Subsonic.

     

    One last thing is to make Caddy start when Linux boots:

     

    sudo systemctl restart caddy
    sudo systemctl enable caddy

     

    It's restart rather than start, because if your Linux distribution automatically started Caddy upon installation, you want a restart to pick up the changes you've just made to the configuration.

     

    And we're done!

     

     

    7. Testing the Computer Installation

     

    Just type https://yoursubsonicsubdomain.yourdomainname.whatever (using your real subdomain of course) into the address field of a web browser.  You should see the Subsonic page to enter your username and password, and when you do so for admin or for the new user you created, this should take you to the pages with the various Subsonic settings.

     

    All right, we're on the web! Now all that remains to be done is to install a phone app that works with Subsonic (my preference, as noted above, is AVSub), and you'll have your music anywhere your phone gets internet service - anything from walks or runs to long drives in the car (many of these apps, including AVSub, are supposed to work with CarPlay), or just sitting outside.

     

     

    8. AVSub Settings

     

    You probably want as large a cache and preload buffer as possible.  This may cause AVSub to take a little longer to start playing a selection, but you won't get as many (or depending on your location and internet service, any) annoying dropouts or halts in the music.

     

    I have all formats set to original, and disallow transcoding.  I allow digital output up to 24/192 and have enabled DSD over PCM.  To play the highest resolutions like 24/192 and DSD you'll want a fast connection, probably Wi-Fi or 5G.  But with a good LTE connection, I've had success playing back 24/96 files.

     

     

    9. Enjoy!

     

     

     

    Links:

     




    User Feedback

    Recommended Comments



    Well, I chose the easy way out and synced to Apple Music.

    All of My own music synced to anywhere I have access to the internet (sort of lossless)

    Share this comment


    Link to comment
    Share on other sites

    17 minutes ago, yahooboy said:

    Well, I chose the easy way out and synced to Apple Music.

    All of My own music synced to anywhere I have access to the internet (sort of lossless)

     

    That's definitely one alternative. 🙂

    Share this comment


    Link to comment
    Share on other sites

    Is there an android app instead of AVSub?

    Share this comment


    Link to comment
    Share on other sites

    9 hours ago, AudioDoctor said:

    This seems like an awful lot of work to duplicate the Qobuz app...

    If Qobuz had all my Mobile Fidelity, Analogue Productions, and Three Blind Mice albums, I wouldn’t need this. 

    Share this comment


    Link to comment
    Share on other sites

    10 hours ago, AudioDoctor said:

    This seems like an awful lot of work to duplicate the Qobuz app...

     

    I've got lots of stuff I like to listen to that isn't available on Qobuz. The reverse is also true, that there are infinite numbers of tracks in Qobuz I don't care for. So something like shuffle play over my collection is possible here, but wouldn't work in Qobuz. Both are great to have available.

    Share this comment


    Link to comment
    Share on other sites

    Latest beta version of iPfire will allow you a even more simpler way. 

    I need to test myself first.

     

    IPfire will replace your router / DHCP server. 
     

    In theory it should allow you Roon remotely. 

     

    Share this comment


    Link to comment
    Share on other sites

    5 minutes ago, R1200CL said:

    Latest beta version of iPfire will allow you a even more simpler way. 

    I need to test myself first.

     

    IPfire will replace your router / DHCP server. 
     

    In theory it should allow you Roon remotely. 

     

    Roon has major issues if you aren’t on the same subnet. 

    Share this comment


    Link to comment
    Share on other sites

    ….agree. That’s why a vpn connection as road warrior may work. 

    Share this comment


    Link to comment
    Share on other sites

    14 minutes ago, R1200CL said:

    ….agree. That’s why a vpn connection as road warrior may work. 

    VPN usually puts you on a different subnet. 

    Share this comment


    Link to comment
    Share on other sites

    ……yes, usually.  When I used this some time ago with ipCop, (iPfire is a fork of ipCop), it was like sitting on my home network. 
    I can browse my files on the remote computer as I was home, everything was as I was locally. Using RDT on my virtual PC (Hyper V), was using same ip as if local. So no other subnet. 
     

    Anyway, I shouldn’t pollute this tread more 😀

     

    I know you’re good at networking, so if time, you may check out iPfire. Here you can have even create subnets in order to have pure audiophile network as well at home. If I ever find time I write about it. I have the installation here with dual SFP’s.

     

    SW is free. It cost you between $200 and maybe up to $400 in HW, depending of speed requirements combined with your personal firewall requirements. 
     

    However you can test this on any old PC, as long as you have dual network interfaces. And this is how one should start. To familiarize yourself with this way of managing your network. 10 years old PC is fine. 
     

    So actually I know for sure, those that have two locations, and like the network to look as you’re at home, use iPfire or similar, (not that I know any good options) and you don’t even use the road warrior function, but direct connection. 
     

    Road warrior is more, as name indicates, when you’re one the move, and need access locally to your home network. (Still functioning is is equal). 
     

    Share this comment


    Link to comment
    Share on other sites

    4 hours ago, firedog said:

    Sorry for being obtuse. I somehow totally missed that page.

     

    You're not, I miss stuff on the site all the time and have to Google to get there.  :-)

    Share this comment


    Link to comment
    Share on other sites

    6 hours ago, The Computer Audiophile said:

    If Qobuz had all my Mobile Fidelity, Analogue Productions, and Three Blind Mice albums, I wouldn’t need this. 

     

    5 hours ago, Jud said:

     

    I've got lots of stuff I like to listen to that isn't available on Qobuz. The reverse is also true, that there are infinite numbers of tracks in Qobuz I don't care for. So something like shuffle play over my collection is possible here, but wouldn't work in Qobuz. Both are great to have available.

     

    Different courses for different horses I guess.

    Share this comment


    Link to comment
    Share on other sites

    25 minutes ago, R1200CL said:

    ……yes, usually.  When I used this some time ago with ipCop, (iPfire is a fork of ipCop), it was like sitting on my home network. 
    I can browse my files on the remote computer as I was home, everything was as I was locally. Using RDT on my virtual PC (Hyper V), was using same ip as if local. So no other subnet. 
     

    Anyway, I shouldn’t pollute this tread more 😀

     

    I know you’re good at networking, so if time, you may check out iPfire. Here you can have even create subnets in order to have pure audiophile network as well at home. If I ever find time I write about it. I have the installation here with dual SFP’s.

     

    SW is free. It cost you between $200 and maybe up to $400 in HW, depending of speed requirements combined with your personal firewall requirements. 
     

    However you can test this on any old PC, as long as you have dual network interfaces. And this is how one should start. To familiarize yourself with this way of managing your network. 10 years old PC is fine. 
     

    So actually I know for sure, those that have two locations, and like the network to look as you’re at home, use iPfire or similar, (not that I know any good options) and you don’t even use the road warrior function, but direct connection. 
     

    Road warrior is more, as name indicates, when you’re one the move, and need access locally to your home network. 
     

     

    I don't mind alternative ideas in the thread at all.  The way I've described is just the one I personally wound up preferring so far.

     

    If one wanted really portable remote access to files kept at home on an IPFire installation, for example with a phone, would you do it through IPFire's VPN?  Is there a specific app, or simply the phone's web browser?  Would you be able, for example, to play 24/96 or 24/192 files without converting to 24/48?

     

    Thanks for any information you may have.

    Share this comment


    Link to comment
    Share on other sites

    7 minutes ago, AudioDoctor said:

     

     

    Different courses for different horses I guess.

     

    Absolutely.  Note that it isn't either/or but both/and (I use the Qobuz app remotely on my phone also).

     

    Edit: It's sort of a curated playlist idea, if the playlist was huge, you were the one who curated it over the course of many years, and Qobuz had all the music you wanted on your playlist.

    Share this comment


    Link to comment
    Share on other sites

    20 minutes ago, Jud said:

    Thanks for any information you may have.

    The only limitation is the speed available 😀

    20 minutes ago, Jud said:

    for example with a phone, would you do it through IPFire's VPN? 

    Yes, from latest information from iPfire project:

    https://blog.ipfire.org/post/ipfire-2-25-core-update-158-available-for-testing
     

    (I only used OpenVPN before, so I don’t know about IPSec, but there shouldn’t be any difference). 
     

    I want to comment on why you need a DNS service. Maybe not all readers understand why it’s needed. 
    And actually it’s not if you know you have a fixed official IP address. (Which normally cost money). 
    https://www.cloudflare.com/learning/dns/what-is-dns/

     

    So simple explanation is that you create a name unique to you on a service, and that service ensures whatever IP you have locally, you only use that name to access your home network. So it doesn’t matter if your local IP changes. You will always be able to access home.
     

    (Hm, wonder if that ever will happen to phone numbers 😀….well WhatsApp and similarities is almost that).


     

    Share this comment


    Link to comment
    Share on other sites

    1 hour ago, R1200CL said:

    ……yes, usually.  When I used this some time ago with ipCop, (iPfire is a fork of ipCop), it was like sitting on my home network. 
    I can browse my files on the remote computer as I was home, everything was as I was locally. Using RDT on my virtual PC (Hyper V), was using same ip as if local. So no other subnet. 
     

    Anyway, I shouldn’t pollute this tread more 😀

     

    I know you’re good at networking, so if time, you may check out iPfire. Here you can have even create subnets in order to have pure audiophile network as well at home. If I ever find time I write about it. I have the installation here with dual SFP’s.

     

    SW is free. It cost you between $200 and maybe up to $400 in HW, depending of speed requirements combined with your personal firewall requirements. 
     

    However you can test this on any old PC, as long as you have dual network interfaces. And this is how one should start. To familiarize yourself with this way of managing your network. 10 years old PC is fine. 
     

    So actually I know for sure, those that have two locations, and like the network to look as you’re at home, use iPfire or similar, (not that I know any good options) and you don’t even use the road warrior function, but direct connection. 
     

    Road warrior is more, as name indicates, when you’re one the move, and need access locally to your home network. (Still functioning is is equal). 
     


    Be careful, just be cause you can access stuff directly, doesn’t mean your on the same subnet. I VPN into my house all the time and can access anything. But, Roon works 20% of the time because my router won’t hand out an ip on the same subnet. 
     

    I’ll check out iPfire. Very interesting if it works. Thanks for the suggestion. Perhaps another article is coming :~)

    Share this comment


    Link to comment
    Share on other sites

    The only internet radio I listen to is Radio Paradise.  For my own music I use my qnap cloud and it works fairly well although slow to access.  I just pickup up an iPhone 12 and I use BT earbuds so not getting lossless.  I am contemplating repurposing my Pixel 2 XL as a music player (DAP) as it has reasonably up to date Android and good apps...USB Audio Player Pro.

    Share this comment


    Link to comment
    Share on other sites

    On 7/3/2021 at 1:59 PM, R1200CL said:

    I want to comment on why you need a DNS service. Maybe not all readers understand why it’s needed. 
    And actually it’s not if you know you have a fixed official IP address. (Which normally cost money). 
    https://www.cloudflare.com/learning/dns/what-is-dns/

     

    So simple explanation is that you create a name unique to you on a service, and that service ensures whatever IP you have locally, you only use that name to access your home network. So it doesn’t matter if your local IP changes. You will always be able to access home.

     

    Just a note that this reminds me of:

     

    These days ISPs in my experience won't change your IP address for months at a time, even if you supposedly have a dynamic IP address rather than a static one.  But if you find that suddenly your setup isn't working for no reason you can see, check to see if your ISP has changed your IP address.

     

    On Windows type in a command prompt:

     

    ipconfig

     

    In Linux, type in a terminal:

     

    ip addr

     

    If your IP address for the outside world has changed, you'll need to go to the domain name service and change your IP there accordingly.  (There's no charge for this at iwantmyname.com; not sure about other services.)

    Share this comment


    Link to comment
    Share on other sites




    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now




×
×
  • Create New...