mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-23 15:56:05 +02:00
filebrowser_quantum: add default_user_scope option (1.3.3-8)
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
## 1.3.3-8 (2026-06-03)
|
||||
- Add `default_user_scope` option: sets the FileBrowser source path and default user scope (must be an existing absolute directory path, defaults to `/`)
|
||||
|
||||
- Allow config persistence
|
||||
|
||||
## 1.3.3 (2026-05-19)
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
# Home assistant add-on: FileBrowser Quantum
|
||||
|
||||
|
||||
I maintain this and other Home Assistant add-ons in my free time: keeping up with upstream changes, HA changes, and testing on real hardware takes a lot of time (and some money). I use around 5-10 of my >110 addons so regularly I install test machines (and purchase some test services such as vpn) that I don't use myself to troubleshoot and improve the addons
|
||||
|
||||
If this add-on saves you time or makes your setup easier, I would be very grateful for your support!
|
||||
I maintain this and other Home Assistant add-ons in my free time: keeping up with upstream changes, HA changes, and testing on real hardware takes a lot of time (and some money). I use around 5-10 hours a week for this. If this add-on saves you time or makes your setup easier, I would be very grateful for your support!
|
||||
|
||||
[![Buy me a coffee][donation-badge]](https://www.buymeacoffee.com/alexbelgium)
|
||||
[![Donate via PayPal][paypal-badge]](https://www.paypal.com/donate/?hosted_button_id=DZFULJZTP3UQA)
|
||||
@@ -29,7 +27,7 @@ _Thanks to everyone having starred my repo! To star it click on the image below,
|
||||
|
||||
## About
|
||||
|
||||
FileBrowser Quantum is a modern, responsive, multi-source file manager with realtime indexing, advanced sharing, and expanded authentication options (password, proxy, OIDC, or no-auth). It is a major fork of the original Filebrowser project, designed for faster browsing and richer previews.
|
||||
FileBrowser Quantum is a modern, responsive, multi-source file manager with realtime indexing, advanced sharing, and expanded authentication options (password, proxy, OIDC, or no-auth). It is a maintained fork of the original FileBrowser project.
|
||||
|
||||
This addon is based on the [docker image](https://hub.docker.com/r/gtstef/filebrowser) from the FileBrowser Quantum project.
|
||||
|
||||
@@ -61,6 +59,7 @@ The web UI can be found at `<your-ip>:8071` or through the Home Assistant sideba
|
||||
| Option | Type | Default | Description |
|
||||
|--------|------|---------|-------------|
|
||||
| `auth_method` | list | `password` | Authentication method (`password`, `noauth`, `proxy`, `oidc`) |
|
||||
| `default_user_scope` | str | `/` | The root filesystem path used as the FileBrowser source and as the default scope for all users. Must be an existing absolute directory path (e.g. `/share`, `/media`). |
|
||||
| `localdisks` | str | _(optional)_ | Local drives to mount (e.g., `sda1,sdb1,MYNAS`) |
|
||||
| `networkdisks` | str | _(optional)_ | SMB shares to mount (e.g., `//SERVER/SHARE`) |
|
||||
| `cifsusername` | str | _(optional)_ | SMB username for network shares |
|
||||
@@ -89,7 +88,7 @@ This addon supports mounting both local drives and remote SMB shares:
|
||||
This addon supports custom scripts and environment variables through the `addon_config` mapping:
|
||||
|
||||
- **Custom scripts**: See [Running Custom Scripts in Addons](https://github.com/alexbelgium/hassio-addons/wiki/Running-custom-scripts-in-Addons)
|
||||
- **env_vars option**: Use the add-on `env_vars` option to pass extra environment variables (uppercase or lowercase names). See https://github.com/alexbelgium/hassio-addons/wiki/Add-Environment-variables-to-your-Addon-2 for details.
|
||||
- **env_vars option**: Use the add-on `env_vars` option to pass extra environment variables (uppercase or lowercase names). See https://github.com/alexbelgium/hassio-addons/wiki/Add-Environment-variables-to-add-ons
|
||||
|
||||
## Support
|
||||
|
||||
@@ -99,4 +98,3 @@ Create an issue on GitHub, or ask on the [Home Assistant Community thread](https
|
||||
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
|
||||
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
|
||||
[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg
|
||||
|
||||
|
||||
@@ -94,6 +94,7 @@ name: FileBrowser Quantum
|
||||
options:
|
||||
env_vars: []
|
||||
auth_method: noauth
|
||||
default_user_scope: "/"
|
||||
panel_admin: false
|
||||
panel_icon: mdi:file-search
|
||||
privileged:
|
||||
@@ -104,6 +105,7 @@ schema:
|
||||
- name: match(^[A-Za-z0-9_]+$)
|
||||
value: str?
|
||||
auth_method: list(password|noauth|proxy|oidc)
|
||||
default_user_scope: str
|
||||
cifsdomain: str?
|
||||
cifspassword: str?
|
||||
cifsusername: str?
|
||||
@@ -112,4 +114,4 @@ schema:
|
||||
slug: filebrowser_quantum
|
||||
udev: true
|
||||
url: https://github.com/alexbelgium/hassio-addons
|
||||
version: "1.3.3-7"
|
||||
version: "1.3.3-8"
|
||||
|
||||
22
filebrowser_quantum/rootfs/etc/cont-init.d/99-run.sh
Executable file → Normal file
22
filebrowser_quantum/rootfs/etc/cont-init.d/99-run.sh
Executable file → Normal file
@@ -80,7 +80,27 @@ yq e -i ".server.port = 8080" "$FILEBROWSER_CONFIG"
|
||||
yq e -i ".server.listen = \"0.0.0.0\"" "$FILEBROWSER_CONFIG"
|
||||
yq e -i ".server.database = \"/config/database.db\"" "$FILEBROWSER_CONFIG"
|
||||
yq e -i ".server.cacheDir = \"/cache\"" "$FILEBROWSER_CONFIG"
|
||||
yq e -i ".server.sources[0].path = \"/\"" "$FILEBROWSER_CONFIG"
|
||||
|
||||
# --- Default user scope / source path ---
|
||||
bashio::log.info "... set default user scope"
|
||||
DEFAULT_USER_SCOPE=$(bashio::config 'default_user_scope' '/')
|
||||
|
||||
# Validate: must start with /
|
||||
if [[ "$DEFAULT_USER_SCOPE" != /* ]]; then
|
||||
bashio::log.fatal "default_user_scope '${DEFAULT_USER_SCOPE}' is not a valid absolute path (must start with /). Stopping."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Validate: path must exist
|
||||
if [ ! -d "$DEFAULT_USER_SCOPE" ]; then
|
||||
bashio::log.fatal "default_user_scope '${DEFAULT_USER_SCOPE}' does not exist or is not a directory. Stopping."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
bashio::log.info "... set source path and defaultUserScope to ${DEFAULT_USER_SCOPE}"
|
||||
yq e -i ".server.sources[0].path = \"${DEFAULT_USER_SCOPE}\"" "$FILEBROWSER_CONFIG"
|
||||
yq e -i ".server.sources[0].name = \"Default\"" "$FILEBROWSER_CONFIG"
|
||||
yq e -i ".server.sources[0].config.defaultUserScope = \"${DEFAULT_USER_SCOPE}\"" "$FILEBROWSER_CONFIG"
|
||||
|
||||
# --- Base URL (from env or config) ---
|
||||
bashio::log.info "... set base URL to allow ingress"
|
||||
|
||||
Reference in New Issue
Block a user