Home Assistant addon : FileBrowser

Supports aarch64 Architecture Supports amd64 Architecture Supports armhf Architecture Supports armv7 Architecture

Hi, I’ve create an addon for my use and wanted to share it if it can be useful to other people :wink:

About


Filebrowser is a web-based file browser developed by the filebrowser team. It provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit your files. It allows the creation of multiple users and each user can have its own directory. It can be used as a standalone app or as a middleware.

This addon is based on the docker image from hurlenko.

This addons has several configurable options :

  • allowing to smb shares from the addon (including smb v1)
  • optional usage of ssl
  • optional password protection

Installation


The installation of this add-on is pretty straightforward and not different in comparison to installing any other add-on.

  1. Add my Hass.io add-ons repository to your home assistant instance.
  2. Install this add-on.
  3. Click the Save button to store your configuration.
  4. Set the add-on options to your preferences
  5. Start the add-on.
  6. Check the logs of the add-on to see if everything went well.
  7. Open the webUI and adapt the software options

Configuration


Webui can be found at http://your-ip:8080.
The default username/password : “admin” and password: “admin” (described in the startup log).
Configurations can be done through the app webUI, except for the following options

Network disk is mounted to /share/$ShareName

ssl: true/false
certfile: fullchain.pem #ssl certificate
keyfile: privkey.pem #sslkeyfile
NoAuth: true/false #Remove password. Resets database when changed. 
networkdisks: "//SERVER/SHARE" # optional, list of smbv2/3 servers to mount, separated by commas
cifsusername: "username" # optional, smb username, same for all smb shares
cifspassword: "password" # optional, smb password, same for all smb shares)

Illustration


9 Likes

Nice work!
I installed your file browser to be able to access my NAS files from HA. But my NAS uses SMB1 (I know it’s really insecure) and it seems like your addon doesn’t support that. Then I saw your other addons and I guess you have a bit of experience. Would it be possible to write an integration to add a NAS directory to the HA media browser? I think a whole addon with a web interface and so is too much for my use case.

Thanks

1 Like

@Syntox Thanks! It should support SMB1, do you have an error message?

Mounting SMB to the HA Media Browser is complicated through an external extension as mounts can’t be propagated from one container to the other (as far as I know). What you can do however is execute a script at boot that mounts the smb share.

For that, you need to create a custom shell command in the configuration.yaml, and a script to call it. The script will call it in the homeassistant container, so files will be available in the HA media browser but not in other extensions (reason why I put a smb mount on each of my addons!). Please find all information here in this thread : Mount remote smb share on hassio

An alternative is to use this addon (that I haven’t used yet) that executes the same command automatically in the homeassistant container : Run On Startup.d - Home Assistant OS - Home Assistant Community (home-assistant.io)

Hi, I’ve added a switch to allow smbv1. Uninstall the addon, refresh the repositories (button at the same menu where to add custom menus), reinstall it, and you’ll find a checkbox to allow smbv1!

1 Like

I’ve wanted to make HA into an NVR for a while.
One that would just store clips based on events.
This might help with being able to review them.

Thanks for the work.

1 Like

Wow that was fast, instantly worked and it looks awesome! Thanks.

I’ve looked at this:

a few moths ago with the end result of having the NAS mounted but not showing up in the Media Browser. I’ll give your second link a try.

1 Like

I was just trying to play around to see what it did for myself. I started it without error, but the Ingress gave me a server error. I didn’t read and I didn’t configure, and it didn’t work… What do I expect? Dunno. I uninstalled because I don’t need it. Just a random more-stuff fueled install and remove. Just thought I’d share a perspective. Nice collection of Add-ons!

1 Like

Ahah, Thanks for the feedback! I recognize myself in this behavior also :wink:
Normally it should start even without any configuration, but if ssl is enabled there is a 1min delay between start and, webui availability (not sure why). Do you remember the error you got on the WEBUI? BTW, thanks for your own addons, very interesting to configure hassio without need for root console!

1 Like

I don’t remember the error. I didn’t even give it a minute. But you might try something like this to improve user experience during that first minute, by letting the user know things are happening but the web ui is not yet available.

nc -lk -p 8099 -e  echo -e 'HTTP/1.1 200 OK\r\nServer: FileBrowser\r\nDate:$(date)\r\nContent-Type: text/html; charset=UTF8\r\nCache-Control: no-store, no cache, must-revalidate\r\n\r\n<!DOCTYPE html><html><body><p>Please wait while XXX. It can take 1 minute.</body></html>\r\n\n\n' 3>/dev/null &
serverPID=$!;
#do stuff here.
#bring up server
kill ${serverPID};
1 Like

hi,

nice work but can you please help me get it up and running? i dont know what im doing wrong but the addon wont start

[11:03:52] INFO: PUID GUID set to root
[11:03:52] INFO: Mounting smb share(s)...
rm: can't remove '/mnt/share': No such file or directory
[11:03:53] INFO: ... //192.168.2.16/public/share successfully mounted to /mnt/share
[11:03:53] INFO: Default username/password : admin/admin
[11:03:53] INFO: Please wait 1 or 2 minutes to allow the server to load
/run: line 64: NOAUTH: unbound variable

Sorry I was doing a test with noauth on the addon and you downloaded it while i was testing :wink: if you uninstall the addon, go to the place where you added the custom repository, click on Reload, then reinstall once the screen comes back on it will work! I’ve removed the code linked to noauth so I’m sure it’s this cause :slight_smile:

I’ll find a way in the future to test without breaking things for people who download :slight_smile:

1 Like

thanks for your fast reply. i did uninstall the addon but sill i having the same problem.

forgot to reload trying agian.

your the BEST :star_struck: thanks a lot

1 Like

In case other people had the issue I made a.new version 2.11.0-rev2 so it will be more apparent of reload was successful or not

1 Like

Any chance to allow users to specify the mint location? I would like this to mount into the media directory of HA so my music is available through HA media browser. Thoughts?

Hi, it won’t work because the HA media browser is linked to HA container and mounts are not propagated from one container to the other… Please read this post someone had exactly the same question and I added two possible solutions : Home Assistant addon : FileBrowser

Have a nice day

New features :

  • NoAuth: true/false #Remove password. Resets database when changed.
  • Optimize smb mount code. New mount point is in /mnt

Hi,

I got the following error surfing startup:

nginx: [emerg] invalid port in “172.30.33.7:” of the “listen” directive in /etc/nginx/servers/ingress.conf:2

Could you please help?

Plugin version: 2.15.0-dev2
HASS version: core-2021.6.6

Thanks in advance!

1 Like

Thanks for reporting! I started implementing ingress then stopped and that’s a residue.
I’ve pushed a new version (v3) it should work better!