filebrowser / docs Goto Github PK
View Code? Open in Web Editor NEWπ Who doesn't like documentation?
π Who doesn't like documentation?
Dear all,
for some reason, it seems that the config file settings (address, port) are ignored.
config file:
Sign up: false
Create User Dir: false
Auth method: json
Shell:
Branding:
Name:
Files override:
Disable external links: false
Server:
Log: stdout
Port: 8081
Base URL:
Root: .
Socket:
Address: 192.168.0.22
TLS Cert:
TLS Key:
Defaults:
Scope: .
Locale: en
View mode: mosaic
Commands:
Sorting:
By:
Asc: false
Permissions:
Admin: false
Execute: true
Create: true
Rename: true
Modify: true
Delete: true
Share: true
Download: true
sudo service [email protected] status
β [email protected] - File browser: default.yaml
Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-10-25 05:25:51 CEST; 3h 9min ago
Main PID: 16676 (filebrowser)
Tasks: 7 (limit: 4496)
CGroup: /system.slice/system-filebrowser.slice/[email protected]
ββ16676 /usr/local/sbin/filebrowser -c /etc/filebrowser/default.yaml
Oct 25 05:25:51 myserver systemd[1]: Started File browser: default.yaml.
Oct 25 05:25:51 myserver filebrowser[16676]: 2019/10/25 05:25:51 Using config file: /etc/filebrowser/default.yaml
Oct 25 05:25:51 myserver filebrowser[16676]: 2019/10/25 05:25:51 Listening on 127.0.0.1:8080
My config file
`Sign up: false
Create User Dir: false
Auth method: json
Shell:
Branding:
Name:
Files override:
Disable external links: false
Server:
Log: stdout
Port: 9876
Base URL:
Root: .
Socket:
Address: 192.168.1.2
TLS Cert:
TLS Key:
Exec Enabled: false
Defaults:
Scope: .
Locale: en
View mode: mosaic
Commands:
Sorting:
By:
Asc: false
Permissions:
Admin: false
Execute: true
Create: true
Rename: true
Modify: true
Delete: true
Share: true
Download: true
Auther configuration (raw):
{
"recaptcha": null
}
`
and the results of "systemctl status filebrowser"
`β filebrowser.service - Filebrowser
Loaded: loaded (/etc/systemd/system/filebrowser.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-11-11 12:44:52 AWST; 6min ago
Process: 5953 ExecStart=/usr/local/bin/filebrowser -c /etc/filebrowser/ -d /etc/filebrowser/.db (code=exited, status=1/FAILURE)
Main PID: 5953 (code=exited, status=1/FAILURE)
Nov 11 12:44:52 Emby-Pi systemd[1]: Started Filebrowser.
Nov 11 12:44:52 Emby-Pi filebrowser[5953]: 2020/11/11 12:44:52 No config file used
Nov 11 12:44:52 Emby-Pi filebrowser[5953]: 2020/11/11 12:44:52 listen tcp 127.0.0.1:8080: bind: address already in use
Nov 11 12:44:52 Emby-Pi systemd[1]: filebrowser.service: Main process exited, code=exited, status=1/FAILURE
Nov 11 12:44:52 Emby-Pi systemd[1]: filebrowser.service: Failed with result 'exit-code'.
`
when manually run from the command line it works fine.
Any ideas?
Just an example of how filebrowser can be extended with other tools. Here, filebrowser is added to a image based on debian:buster-slim
, which already includes some CLI tools and other GTK3 compatible GUI apps.
FROM ghdl/ext:broadway
COPY filebrowser.config.yml /etc/filebrowser/.filebrowser.yml
RUN URL="$(curl -s https://api.github.com/repos/filebrowser/filebrowser/releases/latest | grep "browser_download_url.*linux-amd64.*tar.gz" | sed 's/.* "\(.*\)"/\1/g')" \
&& [ "$(echo "$URL" | cut -c1-5)" != "https" ] && URL="https://github.com/filebrowser/filebrowser/releases/download/v2.0.2/linux-amd64-filebrowser.tar.gz"; echo "URL: $URL" \
&& curl -fsSL "$URL" | tar -xvz -C /usr/local/bin filebrowser \
&& mkdir -p /var/lib/filebrowser/ \
&& filebrowser config init \
&& filebrowser users add hwd admin --commands '.*' --perm.admin
VOLUME /srv
EXPOSE 8080/tcp
CMD ["filebrowser"]
The config file is:
database: /var/lib/filebrowser/filebrowser.db
noauth: false
username: hwd
address: ""
log: stdout
port: 8080
root: /srv
Just build the container:
docker build -t ghdl/ext:gtk-ide .
And execute it:
$(commang -v winpty) docker run --rm -it -p 8080:8080 -e BROADWAY=5 -p 8085:8085 ghdl/ext:gtk-ide
Browse localhost:8080
and login with hwd
(pass admin
).
NOTE: Due to filebrowser/filebrowser#655, go to Settings > Global Settings and click UPDATE.
Click the Toggle shell
button on the top-right corner, and execute bash -ic "gtkwave"
. Browse localhost:8085
to use the GUI app.
Screencast on a Win10 host:
Hi, is there a way to configure filerun such that when you first go to the page it auto-login's as a guest user with read-only access, but then has an option to login as a different user?
I'm looking to replace an existing basic http file listing where anyone can go straight there and download listed files.
The doc of command-runner seems incompatible with version v2.10.0.
-e
-c
and -i
parameters are obsolete in the newer version of filebrowser
.$FILE
part in the commands should be escaped.Some machines don't have /etc/mime.types
installed by default, making mime.TypeByExtension
likely to fallback to blob
on most files and therefore will be shown as insert_drive_file
in the frontend.
See mime.TypeByExtension.
Related: #376
Is it possible to serve filebrowser using https? Where we should place the SSL certificates?
when shared folder is renamed the share path is not updated. and there is no option to edit from share management
ATM we have multiple sources of documentation/information:
Help
modal box in the frontend, which contains frontend keyboard shortcuts. See https://github.com/filebrowser/frontend/blob/master/src/components/prompts/Help.vue.Home
at https://filebrowser.xyz/. See https://github.com/filebrowser/filebrowser.github.io.Docs
at https://docs.filebrowser.xyz/. See this repo.godoc
at https://godoc.org/github.com/filebrowser/filebrowser. See golang sources at https://github.com/filebrowser/filebrowser. Also, see #golang/go#2381.CLI
markdown/man documentation generated with spf13/cobra. See https://github.com/filebrowser/filebrowser/blob/master/cmd/docs.go.HTTP API
, still to be written. See #1.Since all of them can be rendered online, I think it'd be interesting to integrate all of them in a single static site and embed it in filebrowser. This would allow users to use and read the documentation of filebrowser even when offline or in isolated local networks.
The Web API is nice. It would help if this was documented so that it can be integrated into other systems. I have a distributed FS and use filemanager
has the front-end for all of this.
When a user is created in our system we create one in filemanager user with a scope. So that it acts like a multi-tenant system. It's beautiful. We had to read through the web app to + code find endpoints.
Should have been documented.
I followed the installation guide and tried to run
filebrowser -s /path/to/my/files
and it says that the flag doesnt exist. Also, the flag is not in the doc for the CLI
Hi,
First of all congratulate them for the work.
I store the files on s3 (with s3fs) but I would know if is there any way to download via s3 instead my server.
thank you,
Chrome auto-redirect the ip address to https, Can filebrower fix it back to http?
In Command runner, I need to do some actions on file after their upload, as explained in documentation, I use environment variables FILE, but I have the following error in log file
$FILE: No such file or directory
Followed by exit status 1
The docker version of the application is used
I have enabled recaptcha using file browser config
however, there seems to be a racing condition when loading
the captcha, as the plugin may not have been loaded form google yet. Here it is using version 2.9.0
:
vue.esm.js:1897 TypeError: window.grecaptcha.render is not a function
at o.mounted (Login.vue:44)
at at (vue.esm.js:1863)
at In (vue.esm.js:4222)
at Object.insert (vue.esm.js:3148)
at H (vue.esm.js:6351)
at kr.__patch__ (vue.esm.js:6570)
at kr.Pn.e._update (vue.esm.js:3948)
at kr.r (vue.esm.js:4069)
at ar.get (vue.esm.js:4482)
at new ar (vue.esm.js:4471)
from code:
mounted () {
if (!recaptcha) return
window.grecaptcha.render('recaptcha', {. // <-- the issue
sitekey: recaptchaKey
})
},
Following the instructions at https://filebrowser.org/installation#docker , the container image seems to ignore/skip the /config/settings.json file.
mkdir -p $HOME/.filebrowser
touch $HOME/filebrowser.db
cat >$HOME/filebrowser/settings.json <<_EOT
{"address":"","baseURL":"","database":"/database/filebrowser.db","log":"stdout","port":80,"root":"/srv"}
_EOT
docker run -v $HOME/public:/srv \
-v $HOME/.filebrowser/filebrowser.db:/database/filebrowser.db \
-v $HOME/.filebrowser/settings.json:/config/settings.json \
-e PUID=$(id -u) -e PGID=$(id -g) -p 8080:80 \
filebrowser/filebrowser:s6
container starts, listens on port 80 internally but Docker exposes that as port 8080 on the host
The empty filebrowser.db was initialized, changing into a 64kB file so I know the container can access $HOME/.filebrowser, but:
[custom-init] No custom files found, skipping...
[ls.io-init] done.
2023/08/12 21:18:47 No config file used
2023/08/12 21:18:47 Listening on 127.0.0.1:8080
Since the console output says it's listening on port 8080 instead of 80, I tried restarting the container with -p 8080:8080
but then I get "connection reset by peer"
First of all: File Browser is great! The UI feels real good and the feature set is consistent and matches my needs. π
I've tried to control which files and directories could be accessed by a user but with the current semantics of the regular and regex matching the feature is really hard to use for advanced control.
First I had to find out that the first match starting at the end is used. So if I want to include a "everything is forbidden" this rule must come first followed by the allow rules. If I include an everything is forbidden rule, regular features not related to files stop working (for example I can't change the view/listing format).
Second it's really hard to get the rules right because only the name with a prepended slash and not the full path is matched.
It would be great if
Thank's a lot for the great work! I'll have to find a different way of controlling access to files but I'm still a happy user. π
Hello,
First, thank you so much for providing a simple and extremely useful utility. I've configured the filebrowser as a simple solution with some additional nginx/bash ways to provide access to user Home directory, so far all good. From what I see, when users create/upload file, I was able to change the ownership and permissions via the command runner
cmds add "after_upload" 'chown -R $USERNAME:$USERNAME $FILE'
cmds add "after_upload" 'chmod 600 $FILE' # The file has execute bit by default , forcing the permission change.
cmds add "after_copy" 'chown -R $USERNAME:$USERNAME $FILE'
cmds add "after_copy" 'chmod 600 $FILE'
However when we create a directory from the UI, these options do not work, is create directory a different event ? any help is much appreciated.
I'll try few other ways to see if I can change the ownership, but if there is anything the code provides like above would be great.
compare https://github.com/filebrowser/docs/blob/master/installation.md?plain=1#L65
with a few lines above.
wrong (alpine):
-v /path/filebrowser.db:/database.db \
correct (linuxserver):
-v /path/to/filebrowser.db:/database/filebrowser.db \
it's wrong, because it maps the db file to a file in the root, and when FileBrowser runs it makes a new file at /database/filebrowser.db
everything seems fine until you tear down the container and restart a new one, and all the configs are erased :-(
When I try to read a PDF on my android phone.
I see a flash icon and it says 'this plugin is not supported'
Are you using some flash solutions to show PDF files?
Hi, i'm implementing a custom autenticator that call an external service, let's say an oath2 provider.
Following de docs... https://docs.filebrowser.xyz/contributing/authentication-provider i think it missed 2 extra stepts.
3ΒΊ And this provider in the switch file.Settings.AuthMethod of cmd/config_import.go
4ΒΊ And (maybe) to in switch inside func (s authBackend) Get(t settings.AuthMethod) (auth.Auther, error) of storage/bolt/auth.go
If consider it's correct, i may PR this change.
Later, maybe generalize my provider :)
Great work with this project.
i m ready to work in docs but foudn so many issues not according to docs.. also many Pull reue3st pending to merge already aproved!
who is in charge to do this? any hint @ramiresviana ? i found you are the only active ( it seems)
pending issues now:
rest is more complex/unrelated and some must be closed before close this one so i will maintain #40 open until resolved!
Hi Guys. I have filebrowser accessible via nginx reverse proxy as a location.
The download speeds are ridiculously slow when doing this. 4 hours to download a 2GB file. I tried a direct port forwarding to filebrowser, and it took 15 mins to download the very same file.
The problem does not seem to be the encryption layer, since i tried http over the nginx and it was also super slow.
This is my nginx location:
location /files/ {
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass http://10.10.10.2:8086/;
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
}
Am i doing anything wrong, or is filebrowser misbehaving?
Close filebrowser/filebrowser#411, filebrowser/filebrowser#418 and filebrowser/filebrowser#453.
In the issues referred above, and in the references in them, multiple alternatives are given:
--restart always
: filebrowser/filebrowser#453 (comment)It'd be interesting to have a short section in the web page (or maybe some hints spread in existing ones) to summarize the suggested alternatives. I think that the most relevant for this use case are systemd, screen/tmux and docker.
@yurividal, @xcvista would you like to contribute?
Hello,
I think maybe a warning about how caddy is not supported anymore, at the beginning of the section, would be helpful for users: https://filebrowser.xyz/installation/caddy. I believe there is no more support for caddy since May 2019?
Let me know! Thanks for your awesome work!
Would be great to have a more detailed log-level to track user-logins and actions he performed (for security reasons).
Usage:
filebrowser serve [flags]
filebrowser serve [command]
Aliases:
serve, server
Available Commands:
version Print the version number of File Browser
Flags:
-a, --address string Address to listen to (default is all of them)
--auth.header string The header name used for proxy authentication (default "X-Forwarded-User")
--auth.method string Switch between 'none', 'default' and 'proxy' authentication (default "default")
-b, --baseurl string Base URL
-d, --database string Database file (default "./filebrowser.db")
--defaults.allowCommands Default allow commands option for new users (default true)
--defaults.allowEdit Default allow edit option for new users (default true)
--defaults.allowNew Default allow new option for new users (default true)
--defaults.allowPublish Default allow publish option for new users (default true)
--defaults.commands string Default commands option for new users (default "git svn hg")
--defaults.locale string Default locale for new users, set it empty to enable auto detect from browser
-s, --defaults.scope string Default scope option for new users (default ".")
--defaults.viewMode string Default view mode for new users (default "mosaic")
-h, --help help for serve
-l, --log string Errors logger; can use 'stdout', 'stderr' or file (default "stdout")
-p, --port int HTTP Port (default is random)
--prefixurl string Prefix URL
--recaptcha.host string Use another host for ReCAPTCHA. recaptcha.net might be useful in China (default "https://www.google.com")
--recaptcha.key string ReCaptcha site key
--recaptcha.secret string ReCaptcha secret
--staticgen string Static Generator you want to enable
--version version for serve
Global Flags:
-c, --config string config file (defaults are './.filebrowser[ext]', '$HOME/.filebrowser[ext]' or '/etc/filebrowser/.filebrowser[ext]')
Use "filebrowser serve [command] --help" for more information about a command.
panic: unknown command "rm" for "filebrowser serve"
goroutine 1 [running]:
github.com/filebrowser/filebrowser/cli/cmd.Execute()
/src/cli/cmd/root.go:37 +0x66
main.main()
/src/cli/main.go:6 +0x27
C:\Program Files\filebrowser>./.filebrowser
'.' is not recognized as an internal or external command,
operable program or batch file.
I want to use a link to access filebrowser from my nextcloud dashboard but filebrowser does not allow embedded view, is there any hidding setting?
I am running this on a local network only and want to disable login/auth, there is some info in the docs but I can't figure out how to implement it on my docker-compose.
I added the env FB_NOAUTH=true in the docker compose file but it doesn't work.
Description
I'm using filebrowser behind an Apache2 reverse proxy. Before I used filebrowser --port 8675 --scope files/ --prefixurl=/files
to run filebrowser and it worked perfectly, but after updating to the latest version, and trying to run filebrowser -p 8675 -r files/ -b /files/
it stopped working.
Expected behaviour
Filebrowser serving my files behind the Apache2 reverse proxy.
What is happening instead?
I get a 503 error "Service Unavailable. The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later." for the Apache2 server.
Line 50 in 142eec3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.