bilogic / ha-addons

MIT License
1 stars 0 forks source link

Error 404 #1

Open deese opened 7 months ago

deese commented 7 months ago

Hi! Im trying to deploy your add-on and I'm getting a 404 when I try to connect. did you experienced this issue? Thanks! :D

bilogic commented 7 months ago

Yes, it won't be able to load in HA, perhaps I should remove the side bar for now. It is due to this issue https://github.com/navidrome/navidrome/issues/248

What I do is to use Caddy to expose Navidrome as HTTPS.

http://your-navidrome.com {
    redir https://{host}{uri}
}

http://your-navidrome.com {
    # Custom SSL Conf
    tls /ssl/your-navidrome.com.fullchain.crt /ssl/your-navidrome.com.key

    reverse_proxy * 127.0.0.1:4533 {
        header_up Host {http.reverse_proxy.upstream.hostport}
        header_up X-Forwarded-For {http.request.remote}
        header_up X-Real-IP {http.reverse_proxy.upstream.port}
    }
}
bilogic commented 7 months ago

@deese

I think ND_BASEURL https://github.com/navidrome/navidrome/issues/103 might solve the issue, but I don't have time to look into it yet.

deese commented 7 months ago

Thanks for the quick reply. I was playing a bit with the ND_BASEURL and it didn't work. I will try again to see if I'm able to do it. Thanks!

bilogic commented 7 months ago

I don't think ND_BASEURL was exposed in my repo and Navidrome's redirect is kind of broken

Jellyfin

image

Navidrome, needs to be (./app)

image

bilogic commented 7 months ago

See https://github.com/navidrome/navidrome/issues/2605

deese commented 7 months ago

Don't know if it's the best way to do that but I added this to "rootfs/etc/cont-init.d/90-data_location.sh" to export the ND_BASEURL and the ND_LOGLEVEL

bashio::config.has_value 'ND_BASEURL' && export ND_BASEURL=$(bashio::config 'ND_BASEURL') && bashio::log.info "ND_BASEURL set to $ND_BASEURL" bashio::config.has_value 'ND_LOGLEVEL' && export ND_LOGLEVEL=$(bashio::config 'ND_LOGLEVEL') && bashio::log.info "ND_LOGLEVEL set to $ND_LOGLEVEL"

bilogic commented 7 months ago

yes, that seems about right

bilogic commented 7 months ago

oh, you will have to update config.json too

deese commented 7 months ago

Yep, sorry. I also did that haha.

bilogic commented 2 months ago

@deese did you manage to navidrome to run in HA? If yes, can PR back to me? Thanks!

bilogic commented 1 month ago

@deese the value of ND_BASEURL might have to be ., is this something you have some time to try? I also don't think we should be exposing ND_BASEURL since setting it to any other value will make it incompatible with HA.