Git Product home page Git Product logo

Comments (25)

simojenki avatar simojenki commented on July 22, 2024 2

You need to set BONOB_NAVIDROME_URL to something so that bonob can find Navidrome.

Your ND_PORT is 4533, so you could try;

BONOB_NAVIDROME_URL=http://[IP OF YOUR NAS]:4533
or
BONOB_NAVIDROME_URL=http://[NETWORK NAME OF YOUR NAME]:4533

from bonob.

hakimh02 avatar hakimh02 commented on July 22, 2024 1

I JUST GOT IT TO WORK!

In the BONOB URL, I just had to change the internal port, to the external port (they're different).
All works now! Thank you guys @jicho @idolpx @simojenki

from bonob.

simojenki avatar simojenki commented on July 22, 2024

Are you using docker host network, or the default docker bridge network? (https://docs.docker.com/engine/reference/run/#network-settings)

bonob will not find your sonos devices if you are using bridge, as they are on a separate network. In that case you need to specify the IP address of one of your sonos devices using the BONOB_SONOS_SEED_HOST env var

from bonob.

hakimh02 avatar hakimh02 commented on July 22, 2024

Thanks @simojenki! That worked. I can see my Sonos devices now.
However, when trying to add the new Services through the Sonos app, I can see Bonob.
When hitten "Add to Sonos" it says "Check your network connection" within the Sonos application.
Is there something wrong?

Here's a screenshot of the Environment settings of the image in Docker, if that's of any help:

https://www.screenpresso.com/=7ZcGb

from bonob.

simojenki avatar simojenki commented on July 22, 2024

These URLs look a bit strange "http://simojenki-bonob1:4534/ws/sonos"

I suspect that you may need to specify BONOB_URL=http://[INSERT YOUR NAS HOSTNAME HERE]:4534

from bonob.

hakimh02 avatar hakimh02 commented on July 22, 2024

we getting there.
Now it redirects and lets meeting authenticate.
However, when entering my credentials, the following error is displayed:

Login failed!
Error:
connect
ECONNREFUSED
172.17.0.05:4533!

from bonob.

simojenki avatar simojenki commented on July 22, 2024

Can you pls send a screenshot similar to this one https://www.screenpresso.com/=T4BZb since you have made your changes?

from bonob.

hakimh02 avatar hakimh02 commented on July 22, 2024

sure:

https://www.screenpresso.com/=Sx75g

When I click on "Re-register" it says "Successfully registered"

from bonob.

simojenki avatar simojenki commented on July 22, 2024

Clicking "Re-register" re-registers the service definition with the sonos device. You then need to complete service sign in via the app on your phone.
I suspect that your BONOB_URL is still incorrect. xyz.synology.me looks like a public facing DNS name, for that to work you would need to allow port 4534 through your firewall and onto your NAS. Unless you absolutely need to do that I would highly recommend you do not expose you NAS to the internet. Also, bonob does not support https, you need to use something else to put https infront of bonob.
For bonob to work you do not need to expose it to the internet, you can run it on your local network, however you need the local NAS IP address or NAS hostname on your local network. For example the IP addresses of your sonos devices are in the 192.168.86.* network, if you NAS is also on that same network its' IP address will be 192.168.86.??. The NAS will also have a hostname on your network. When you configure the NAS you presumably do that via an admin UI in the browser, http://192.168.86.?? . Whatever that IP address is you can use in the BONOB_URL, ie. http://192.168.86.??:4534

from bonob.

hakimh02 avatar hakimh02 commented on July 22, 2024

too bad, it doesn't work.
I'm using a SSL certificate to use the URL instead of the IP for my NAS. It's not exposed outside of the local network.
I'm also using HTTPS not http, that doesn't work anymore since switching to https.

I've changed the URL to the IP etc, nothing worked. It only works until the last step of the authorization when using the DNS synology.me:4534 but doesn't let me authenticate with the above error.

Too bad!

from bonob.

simojenki avatar simojenki commented on July 22, 2024

What is doing the SSL/HTTPS offloading? bonob will not do that for you.

from bonob.

hakimh02 avatar hakimh02 commented on July 22, 2024

I do have a reverse proxy configured in the NAS to do that for Bonob and any other docker image.
and have also opened ports in my network.

from bonob.

simojenki avatar simojenki commented on July 22, 2024

If you are using https, then you need to use the port of the reverse proxy in the BONOB_URL env var, not the port of bonob itself.
ie. BONOB_PORT=4534 & BONOB_URL=https://my-secure-server.com
The reverse proxy then can map the https port (443) to the bonob port 4534

from bonob.

hakimh02 avatar hakimh02 commented on July 22, 2024

that didn't work either... really too bad! :(

from bonob.

jicho avatar jicho commented on July 22, 2024

@hakimh02 I've got Navidrome and bonob running on my Synology NAS without any issues...

Navidrome is started like this:

docker run -d \
    --name navidrome \
    --restart=unless-stopped \
    -m 256m \
    -v /volume1/music:/music:ro \
    -v /volume1/docker/navidrome:/data \
    -p 4533:4533 \
    -e PUID=1026 \
    -e PGID=100 \
    -e ND_LOGLEVEL=info \
    -e ND_LASTFM_ENABLED=false \
    -e ND_ENABLEDOWNLOADS=false \
    -e ND_COVERARTPRIORITY="folder.*, cover.*, embedded” \
    -e ND_SCANSCHEDULE=0 \
    -e TZ=Europe/Amsterdam \
    deluan/navidrome:latest

And bonob like this:

docker run -d \
    --name bonob \
    --restart=unless-stopped \
    -p 4534:4534 \
    -m 256m \
    -e TZ=Europe/Amsterdam \
    -e BONOB_SCROBBLE_TRACKS=true \
    -e BONOB_SONOS_SERVICE_NAME=musicbox \
    --network host \
    simojenki/bonob:latest

When both are running bonob is getting the hostname of my NAS, after that a click on the Register button on the bonob page and the bonob service can be connected in the Sonos App.

Key, in my case, is using --network host or in the GUI use the option Use the same network as Docker host.

Hopefully this helps you.

from bonob.

idolpx avatar idolpx commented on July 22, 2024

@hakimh02 do you have ND_BASEURL set to something in your Navidrome docker config?
Can you post your docker config for Bonob and Navidrome? That will help.

from bonob.

hakimh02 avatar hakimh02 commented on July 22, 2024

Hi @idolpx no, I did not setup ND_Baseurl for Navidrome:

Here's an image of the Navidrome container config: https://www.screenpresso.com/=VWaEf

Here's the config of Bonob: https://www.screenpresso.com/cloud/7ZcGb/

from bonob.

hakimh02 avatar hakimh02 commented on July 22, 2024

Thank you guys for your support.
So, I've tried out the above and I could register the devices and was able to go through the configuration, except for the last step.
When I enter my Navidrome credentials through the SONOS app, the following error is being displayed:

Login failed! Error: write EPROTO 140480537623880:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332: !

Here's my config:

BONOB:
https://www.screenpresso.com/=nQPUd

NAVIDROME:
https://www.screenpresso.com/=gkA9g

from bonob.

jicho avatar jicho commented on July 22, 2024

Looking at your bonob config you opened up bonob to the world, I don't think that is smart.

Besides that... When I go to https://hakimnas.synology.me:4533 don't get a reply, so it looks like you need to open the port in your router/firewall or when it's okay to only use everything inside your network you can change hakimnas.synology.me into the internal IP address of your NAS.

I'm assuming your NAS has a static IP.

In my case I'm using everything internally:

Setting name Value
BONOB_URL http://192.168.1.2:4534
BONOB_NAVIDROME_URL http://192.168.1.2:4533

In case you go for this, the IP need to match your NAS IP.

from bonob.

hakimh02 avatar hakimh02 commented on July 22, 2024

Nah, it's not open to the world, I'm just using an SSL certificate for the hostname, internally.
I believe the issue is because I'm using HTTPS instead of HTTP.

from bonob.

jicho avatar jicho commented on July 22, 2024

Problem solved, congrats and enjoy bonob/listening!

from bonob.

simojenki avatar simojenki commented on July 22, 2024

Great! Can we consider this issue resolved then?

from bonob.

hakimh02 avatar hakimh02 commented on July 22, 2024

from bonob.

simojenki avatar simojenki commented on July 22, 2024

I also found this thread on sonos forums that talks about how to set up bonob, navidrome on synology;
https://en.community.sonos.com/music-services-and-sources-228994/another-smb1-track-limit-workaround-on-synology-6861233

I am going to paste the text here verbatim for reference in the event that the original post goes away..

I am using Navidrome & Bonob to self-host my music library for the Sonos from Synology. No SMB1 but you do need Docker.
https://www.navidrome.org
https://github.com/simojenki/bonob

The below instructions assume Docker is already installed and running on your Synology NAS. I am on DSM 7. Hopefully this helps some folks. BTW - This works on S2 but doesn’t work with S1.

Download deluan/navidrome:latest (https://hub.docker.com/r/deluan/navidrome)

  • Create container, click advanced settings
  • Check enable auto-restart
  • Choose Volume tab
  • Add a couple of folders:
    Folder: “path to your music/” Mount path: “/music” (Check read-only)
    Folder: “/path for container data” Mount path: “/data”
    (I just created a “navidrome” folder inside of the docker folder in file station) so mine looks like:
    Folder: “docker/navidrome” Mount path: “data”
  • Choose Network tab
  • Check Use same network as Docker Host
  • Choose Environment Tab
  • Environment – default settings are all good
  • Apply then next, check “Run this container after the wizard is finished”

Open another browser tab and go to http://ip address of syno:4533 it will ask you to create a user name and password and then you’ll see the library syncing

Back to the Synology

Download simojenki/bonob

  • Create container, click advanced settings
  • Check enable auto-restart
  • Choose Network tab
  • Check Use same network as Docker Host
  • Choose Environment Tab
  • Add four environment variables:
    Variable: Value:
    BONOB_SONOS_AUTO_REGISTER true
    BONOB_SONOS_SERVICE_NAME Home Server (You can use anything you like)
    BONOB_NAVIDROME_URL http://ip address of syno:4533
    BONOB_URL http://ip address of syno:4534
  • Apply then next, check “Run this container after the wizard is finished”

Getting it working with Sonos (Direct from https://github.com/simojenki/bonob)

Initialising service within sonos app

  • Configure bonob, make sure to set BONOB_URL. bonob must be accessible from your sonos devices on BONOB_URL, otherwise it will fail to initialise within the sonos app, so make sure you test this in your browser by putting BONOB_URL in the address bar and seeing the bonob information page
  • Start bonob,
  • Open sonos app on your device
  • Settings -> Services & Voice -> + Add a Service
  • Select your Music Service, default name is 'bonob', can be overriden with configuration BONOB_SONOS_SERVICE_NAME
  • Press 'Add to Sonos' -> 'Linking sonos with bonob' -> Authorize
  • Your device should open a browser and you should now see a login screen, enter your navidrome credentials
  • You should get 'Login successful!'
  • Go back into the sonos app and complete the process
  • You should now be able to play music from navidrome
  • Within navidrome a new player will be created, 'bonob (username)', so you can configure transcoding specifically for sonos

from bonob.

guyjr avatar guyjr commented on July 22, 2024

A couple of notes on how I set mine up on Synology - followed mainly these instructions, but for the Navidrome container, I use Bridge instead of Host networking (better security), and in my case I have multiple music folders. My /music volume has symlinks on the Synology box pointing to my actual music folders, and the root of those folders is mounted into the Navidrome container like so:

example symlinks:

  • /volume1/MyMusic/FLAC
  • /volume1/MyMusic/MP3 No FLAC

Docker volume mapping:

  • Folder /volume1/MyMusicSymLinks -> /music
  • Folder /volume1/MyMusic -> /volume1/MyMusic

I also set PGID and PUID in each container to point to a new /sbin/nologin user set up for each container - again better security.

All works great, thank you @simojenki for this great project!

from bonob.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.