Skip to content

Instantly share code, notes, and snippets.

@jacobkossman
Last active February 14, 2019 16:52
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacobkossman/a8baf2e6a6ca63308f66c84f47f52100 to your computer and use it in GitHub Desktop.
Save jacobkossman/a8baf2e6a6ca63308f66c84f47f52100 to your computer and use it in GitHub Desktop.
FreeNAS - How to setup SubSonic with HTTPS

Basic Install

  1. Log in to FreeNAS GUI
  2. Click Plugins on top menu bar
  3. Choose Subsonic -> Install
  4. Refresh
  5. Click Plugins on top again
  6. Turn SubSonic on
  7. Add storage to your music folder and make sure it is mounted
  8. Click SubSonic in Plugins dropdown in left menu
  9. Click the link to visit subsonic (localip:4040) and update admin password

HTTPS

Make sure you have both a CA and a certificate (can be generated in System > CAs / System > Certificates). Download the .key and .crt for both and move them somewhere you can access them (in storage on your subsonic jail)

  1. SSH into FreeNAS box
  2. run jls to view jails which will return all your active jails with ids
  3. Find your subsonic jail ID and run jexec ID replacing ID with the appropriate number
  4. You should now see something like this root@subsonic_1:/
  5. Run the following (assuming you have a CA of "SSH-CA" and a certificate of "SubSonic"):
    • cd /mnt/software
    • cat SubSonic.crt SubSonic.key SSH-CA.crt > subsonic.crt
    • openssl pkcs12 -in subsonic.crt -export -out subsonic.pkcs12
    • You should be able to use any password when in prompts you, not 100% if you can use different password for later step when you create the keystore
    • /usr/pbi/subsonic-amd64/bin/keytool -importkeystore -srckeystore subsonic.pkcs12 -destkeystore subsonic.keystore -srcstoretype PKCS12 -srcstorepass subsonic -srcalias 1 -destalias subsonic
    • cp subsonic.keystore /subsonic.keystore
  6. Go back to FreeNAS GUI and click the Subsonic icon in plugins on the left. Select "Enable SSL" and browse to your root folder and select the keystore file.
@rheaghen
Copy link

rheaghen commented Jul 20, 2018

after failing during step 5, I was able to successfully generate my own keystore using only this:

/usr/pbi/subsonic-amd64/bin/keytool -genkey -alias server -keyalg RSA -keysize 2048 -keystore subsonic.jks 
/usr/pbi/subsonic-amd64/bin/keytool -certreq -alias server -keyalg RSA -file subsonic.csr -keystore subsonic.keystore

@rheaghen
Copy link

does anyone have a path back to SSL with freenas 11.2? the "Enable SSL" option is no longer available with this new UI, unless I'm mistaken...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment