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

🐛 [Filebrowser] Only listening on IPv6 by default? #965

Closed
reedy opened this issue Aug 27, 2023 · 10 comments
Closed

🐛 [Filebrowser] Only listening on IPv6 by default? #965

reedy opened this issue Aug 27, 2023 · 10 comments
Labels
stale Element will be closed automatically

Comments

@reedy
Copy link
Contributor

reedy commented Aug 27, 2023

Description

Just installed Filebrowser, and it seems to be listening/bound only on IPv6 (to 8080?), by default

Reproduction steps

1. Install add on
2. Try and access via http://ipv4address:8080 or http://ipv4address:8384
3. Browser can't connect

Addon Logs

Starting...
/etc/cont-init.d/00-banner.sh: executing
-----------------------------------------------------------
 Add-on: Filebrowser
 filebrowser provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit your files
-----------------------------------------------------------
 Add-on version: 2.23.0-5
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.5  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2023.8.4
 Home Assistant Supervisor: 2023.08.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
 https://github.com/alexbelgium/hassio-addons
-----------------------------------------------------------
/etc/cont-init.d/01-custom_script.sh: executing
[10:51:52] INFO: Execute /config/addons_autoscripts/filebrowser.sh if existing
[10:51:52] INFO: ... no script found
/etc/cont-init.d/20-folders.sh: executing
Creating /config/addons_config/filebrowser
/etc/cont-init.d/92-local_mounts.sh: executing
/etc/cont-init.d/92-smb_mounts.sh: executing
/etc/cont-init.d/99-run.sh: executing
[10:51:54] WARNING: Auth method change, database reset
[10:51:54] INFO: NoAuth option selected
[10:51:54] INFO: Starting...
2023/08/27 10:51:55 No config file used
2023/08/27 10:51:55 Listening on [::]:8080
[10:51:55] INFO: Started !

Architecture

aarch64

OS

HAos

@reedy reedy added the bug Something isn't working label Aug 27, 2023
@reedy
Copy link
Contributor Author

reedy commented Aug 27, 2023

Seems the embedded http://ip4address:8123/db21ed7f_filebrowser/ingress works fine...

@reedy
Copy link
Contributor Author

reedy commented Aug 27, 2023

2023/08/27 10:51:55 Listening on [::]:8080

This seems a bit misleading...

If I override https://github.com/alexbelgium/hassio-addons/blob/9035c33/filebrowser/config.json#L82 by mapping 8080 to 8080...

The log still shows the same

2023/08/27 12:38:46 Listening on [::]:8080

@alexbelgium
Copy link
Owner

alexbelgium commented Aug 27, 2023

Hi, by default the port mapping is disabled to increase security in apps using ingress. You can however map the port that you want in the add-on options and this will allow accessing it though ip:port

The internal port will always be 8080, and you can configure the external exposed port through the add-on options

@alexbelgium alexbelgium removed the bug Something isn't working label Aug 27, 2023
@reedy
Copy link
Contributor Author

reedy commented Aug 27, 2023

Thanks, yeah, I'd worked that out as per my comment above.

But why does it only show that it's (apparently) listening on IPv6 (at least as the [::] suggests), on 8080 even if you override that?

@reedy
Copy link
Contributor Author

reedy commented Aug 27, 2023

Oh, and also noting that https://github.com/alexbelgium/hassio-addons/blob/8ba4afb/filebrowser/README.md#configuration is incorrect as per the above...

Webui can be found at http://your-ip:8080/.

Is not true by default for the HA addon

@alexbelgium
Copy link
Owner

Thanks for the PR

Actually Listening on [::]:8080 occurs between INFO: Starting... and INFO: Started ! which indicates from the script that it is actually coming from the filebrowser app itself and not my addon :

bashio::log.info "Starting..."
# shellcheck disable=SC2086
/./filebrowser --disable-preview-resize --disable-type-detection-by-header --cache-dir=".\cache" $CERTFILE $KEYFILE --root="$BASE_FOLDER" --address=0.0.0.0 --database=/config/addons_config/filebrowser/filebrowser.dB "$NOAUTH" &
bashio::net.wait_for 8080 localhost 900 || true
bashio::log.info "Started !"

It has to run also on ipv4 however as the internal docker network managed by HA is in ipv4. So not sure why it has this behavior...

@alexbelgium
Copy link
Owner

BTW I took the opportunity of you looking closer on this add-on to switch the upstream repo to the official container and updating to the latest version ; it doesn't seem to change anything to your observation of listening on :: though

@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Element will be closed automatically label Sep 2, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 4, 2023
@reedy
Copy link
Contributor Author

reedy commented Sep 4, 2023

Not stale...

@alexbelgium
Copy link
Owner

alexbelgium commented Sep 4, 2023

Hi, actually it is linked to the app not the addon so I am not sure I can help. According to the upstream repo, it is linked to the go library. The workaround is to set an ip address explicitly (according to the second link) but given that the addon works as expected I am not sure what would be the benefit vs complexification

filebrowser/filebrowser#1914
filebrowser/filebrowser#1901

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Element will be closed automatically
Projects
None yet
Development

No branches or pull requests

2 participants