User Tools

This is an old revision of the document!


FileBrowser

File Browser is a nice web-based file manager for your server.

I do not like the default installation method because it will install system-wide. I will show you how to install in a more cusotmized way.

first you need to create a new user:

 > useradd -d /data/daemons/filebrowser -m filebrowser

Then, as filebrowser user, get the software package and deocompress it. 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:

 > su - filebrowser
 > tar xvf linux-amd64-filebrowser.tar.gz
 > ./filebrowser config set --auth.method noauth

since it will be hidden behind the reverse proxy, you can disable FileBrowser internal authentication.

Now, a startup script:

filebrowser.sh
#!/bin/bash
cd /data/daemons/filebrowser &&
./filebrowser -r /data/my_files -p 3002 -b /filebrowser/ 2>&1 > filebrowser.log

And the usual autostart stuff:

40-filebrowser.start
#!/bin/bash
start-stop-daemon -b -m -p /var/run/filebrowser.pid -n filebrowser -u filebrowser /data/daemons/filebrowser/filebrowser.sh

Make both files executable.

Now, reverse proxy is simple, but this into /etc/nginx/folders/filebrowser.conf:

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;
    }

and put this file include inside the usual /etc/nginx*/folders/main.conf, and restart nginx.

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