Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ [REQUEST] Navidrome #789

Open
leokeba opened this issue Apr 11, 2023 · 20 comments
Open

✨ [REQUEST] Navidrome #789

leokeba opened this issue Apr 11, 2023 · 20 comments
Labels
enhancement New feature or request prevent stale Prevents stale being applied

Comments

@leokeba
Copy link
Contributor

leokeba commented Apr 11, 2023

Navidrome Music Server / Streamer

Hi, I am looking to integrate Navidrome into HAOS. It is a powerful music server based on the subsonic protocol, and it implements a web player similar to the Deezer / Spotify experience, but with your own self-hosted music collection.

I know Jellyfin / Emby / Plex can provide similar services, but I want something that's build with music in mind, plus I have a big library with lots of favorites and stuff so migration is not a good option for me.

It has a docker image here : https://hub.docker.com/r/deluan/navidrome

I am not asking you to implement it all by yourself

Rather, I would like a bit of advice/help on how to do it, probably using one of your addons as a template. If you think this would be a good addition to this repo, then I will make a PR. This is also a learning opportunity for me.

Let me know if you have any ideas / directions / recommandations for me. Thanks :)

@leokeba leokeba added enhancement New feature or request prevent stale Prevents stale being applied labels Apr 11, 2023
@alexbelgium
Copy link
Owner

alexbelgium commented Apr 11, 2023

Hì, thanks for the proposal! I indeed have very little time to implement a new addon but I've struggled a lot learning to build ones so I can help you with pitfalls.

I'll write something a bit later to help you get started.

Here is already the official tutorial (using HA base image) and my tutorial (modifying an existing image)

My tutorial is quite specific for lsio images, so I'll have to adapt it for the 2 main cases : images based on s6 supervisor, or images without.

@mihaiaka
Copy link

+1
I would also love to see/get Navidrome via HA add-ons

@bilogic
Copy link
Contributor

bilogic commented Oct 17, 2023

let me run thru the tutorials thanks

@bilogic
Copy link
Contributor

bilogic commented Oct 21, 2023

I'm basing this off the gitea add-on as my base, but I keep getting this error when trying to install my new add-on

image

@alexbelgium
Copy link
Owner

alexbelgium commented Oct 21, 2023

Hi, that's due to ADD --chmod 777 in the dockerfile. You need to separate the commands to local build in HA : have only a ADD command to download the file, then a RUN command to perform the chmod

@bilogic
Copy link
Contributor

bilogic commented Oct 22, 2023

Yes, I'm aware it was due to the ADD --chmod, but why does it work for gitea and not mine?

What I can't understand is:

  1. I'm replicating the Dockerfile from gitea and hosting it on my own repo at https://github.com/bilogic/ha-addons
  2. I'm loading it the same way in HA as I would with your repo
  3. So, which step of mine is causing this to be a local build?

Thank you

@bilogic
Copy link
Contributor

bilogic commented Oct 22, 2023

I found out was it was due to "image": "ghcr.io/alexbelgium/gitea-{arch}", in config.json

@bilogic
Copy link
Contributor

bilogic commented Oct 22, 2023

https://github.com/bilogic/ha-addons/tree/470a1edfea1b1fc5d813560357e9f95173276a71/navidrome

It appears that a Docker file is not absolutely required, but I do need some way to change the ENV values.

@alexbelgium
Copy link
Owner

The best way to set ENV values can be with the "environment" tag in config.yaml if they are fixed, and if they are dynamic (like set from add-on options) you need to set them using a script at boot. This is for example the purpose of my global_var script here : https://github.com/alexbelgium/hassio-addons/blob/master/.templates/01-config_yaml.sh

@bilogic
Copy link
Contributor

bilogic commented Oct 23, 2023

  1. There is quite a fair bit of things for me to learn as I'm not familiar with Dockerfile or HA addons.
  2. I'm looking through all the examples to find one that is suitable for navidrome
  3. It seems that VaultWarden (Bitwarden) might be one of them

ARG BUILD_FROM=ghcr.io/hassio-addons/debian-base/amd64:7.1.0
ARG BUILD_VERSION
ARG BUILD_UPSTREAM="1.29.2"
FROM "vaultwarden/server:${BUILD_UPSTREAM}" as vaultwarden
FROM ${BUILD_FROM}
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

  1. What does the 2 FROM means? From reading the reference, https://docs.docker.com/engine/reference/builder/#from, it seems to be building 2 images, which seems to be more straighforward than other examples
  2. If it is 2 images, how are they interacting with one another, and why is the HA image required?
  3. I also have trouble figuring out how the ha_* scripts know what to do about making the add-on available (in this case, VW). There doesn't seem to be any variables going into them. Or are they supposed to be the same for all add-ons?

@bilogic
Copy link
Contributor

bilogic commented Oct 25, 2023

@alexbelgium

I managed to get Navidrome going, would you be so kind as to:

  1. Review my repo at https://github.com/bilogic/ha-addons/tree/master/navidrome, in particular

    • Is there anything I'm missing or ought to include?
    • Are there any files that I can get rid of? Do we need icon.png and logo.png?
  2. Perhaps point me in the right direction on how to implement HTTPS and ingress minimally?

Side note: I have not created an image in config.json as it is still work in progress, I plan to comment my repo heavily so that others will find it easier to create their own add-ons.

Thanks!

@alexbelgium
Copy link
Owner

Hi, thanks! I'm on holidays i'll check when I'm back. Best regards

@bilogic
Copy link
Contributor

bilogic commented Oct 26, 2023

Thanks! I managed to achieve HTTPS using Caddy 2 https://github.com/einschmidt/hassio-addons

On hindsight, Caddy 2 might be acceptable since it simplifies addon creation. But I wouldn't use it for things like Bitwarden which requires end to end encryption, i.e. no traffic should be sent at all via http://

So, still looking forward to implementing HTTPS

@celynw
Copy link

celynw commented Jan 1, 2024

Thanks @bilogic! I tried to do this myself following the guide but I was a bit overwhelmed.
Yours is working well and I'll use your repo as a base if I want to make any adjustments/enhancements!
All I did was change the default SavePath ND_MUSICFOLDER (which I then had to create manually). I don't need HTTPS built-in since I do it with an external process.

@bilogic
Copy link
Contributor

bilogic commented Jan 1, 2024

Happy to hear that. By the way, I moved away from Caddy due to their wonky HTTP3 support, using Nginx Proxy Manager instead.

What SavePath do you mean? If you want me to make changes, better to discuss on my repo instead.

@celynw
Copy link

celynw commented Jan 1, 2024

Ah, sorry about the confusion. I meant ND_MUSICFOLDER (updated my comment). I was looking at the field name from a different addon, which I was using as a reference to keep my files in the same place.

Yep, I'm also using Nginx Proxy Manager too.

Anyway I just wanted to comment here in case anybody finds this issue first, since I had a good look for Navidrome (or even subsonic) Home Assistant addons with no luck until I looked here

@bilogic
Copy link
Contributor

bilogic commented Jan 1, 2024

Yea, the documentation is lacking on my end. But I really have no bandwidth for now.

@baldarn
Copy link
Contributor

baldarn commented Jun 13, 2024

I'm trying to add Navidrome here

any help appreciated!

#1409

@celynw celynw mentioned this issue Jun 14, 2024
2 tasks
@baldarn
Copy link
Contributor

baldarn commented Jun 14, 2024

everyone can use @celynw working addon here

https://github.com/celynw/ha-addons

@dwebb8272
Copy link

dwebb8272 commented Jun 21, 2024

I'm having issues getting @celynw asknavidrome to even work. It's like the api isn't working correctly. I'm running my music server, navidrome, on a pi5 that's exposed to the web with it's own address. I can access navidrome just fine from my browser on my computer, tablet and phone. I can also access navidrome with the app substreamer. It is probably something simple, but I've already lost a total of three days trying to make this work. Any help would be greatly appreciated.
davedebug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request prevent stale Prevents stale being applied
Projects
None yet
Development

No branches or pull requests

7 participants