User Tools

This is an old revision of the document!


FileBrowser

There are a few software out there, but i like File Browser a lot because it's lightweight, don't get in the way, is flexible and simple to use, but i do not like the default installation method of FileBrowser because it will install system-wide. I will show you how to install in a more customized way.

Installation

Create a standard user to host the FileBrowser installation. You will most probably /never run it as this user, but always as different users, to allow it manage files owned by those users. <code bash> useradd -d /data/daemons/filebrowser -m filebrowser </code> The default install approach is based on a auto executable web link (here) which i do not recommend to use directly. Instead go to here and download the proper package for your architecture. Then: <code bash> su - filebrowser mkdir bin cd bin tar xvf ../linux-amd64-filebrowser.tar.gz </code> That's it! ==== Reverse Proxy ==== Running FileBrowser behind NGINX is easy, this is an example: <file - filebrowser.conf> location /filebrowser/ { client_max_body_size 512M; proxy_pass http://127.0.0.1:3002; proxy_http_version 1.1; proxy_set_header Connection $http_connection; proxy_set_header Connection 'upgrade'; proxy_cache_bypass $http_upgrade; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; #proxy_set_header Authorization $remote_user; } </file> Remember to set the correct port as each instance of FileBrowser will have to run with it's own port, and set a reasonable location URL. This setup will also make use of FileBrowser user intergation with Proxy Authentication, if used. ==== Running ==== I assume you want to run it as user myuser. As a general startup rule, the first time you need to run it once to create the needed configuration files and database, then you want to start it with a script and have it start automatically at boot. For initial configuration: <code bash> su - myuser /data/daemons/filebrowser/bin/filebrowser -r “/data/MyFiles” -p 3005 -d “/home/myuser/filebrowser.db” </code> The start script should be something like: <file - filebrowser.sh> #!/bin/bash FILEBROWSER=“/data/daemons/filebrowser/bin/filebrowser” APP_PATH=“/home/myuser” DATA_PATH=“/data/MyFiles” BASE_URL=“/files/myuser” PORT=3005 “${FILEBROWSER}” config set –auth.method=noauth -d “${APP_PATH}/filebrowser.db” 2>&1 » “${APP_PATH}/filebrowser.log” “${FILEBROWSER}” -r “${DATA_PATH}” -p ${PORT} -b “${BASE_URL}” -d “${APP_PATH}/filebrowser.db” -l “${APP_PATH}/filebrowser.log” 2>&1 » “${APP_PATH}/filebrowser.log” </file> And the startup script should be /etc/local.d/40-filebrowser.start: <file - 40-filebrowser.start> </file> make both executable of course.

Last modified:

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information