skip to content
shipanjodder.com

How to Install filebrowser on ubutnu system

Updated:
Screenshot

The only prerequisite is that you have SSH access to a Unix web server. Here are instructions for Mac and Windows.

Update system & install curl

Terminal window
sudo apt update && apt upgrade -y; apt install curl -y

Execute command

Terminal window
curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash

and then,

Terminal window
filebrowser -p 8080 -a 127.0.0.1 -r /var/www

Replace the item:

  • 8080 : -p is the port to listen on
  • 127.0.0.1 : -a is the IP address to listen on
  • /var/www : -r is the root directory

Find list of configuration options here

Configuration:

Create filebrowser.json file on /etc/ directory_

Terminal window
cd /etc/;
sudo nano filebrowser.json

and add this content on there,

{
"port": 8080,
"baseURL": "",
"address": "127.0.0.1",
"log": "stdout",
"database": "/etc/filebrowser.db",
"root": "/var/www/"
}

Bring up filebrowser:

Terminal window
ls ~;
rm ~/filebrowser.db;
filebrowser -c /etc/filebrowser.json

Change permission for config file:

Terminal window
chown www-data:www-data /etc/filebrowser.*;
ls -la /etc/filebrowser.*

Add system service:

Terminal window
sudo nano /etc/systemd/system/filebrowser.service

Add this content:

[Unit]
Description=File Browser
After=network.target
[Service]
ExecStart=/usr/local/bin/filebrowser -c /etc/filebrowser.json
[Install]
WantedBy=multi-user.target

Function enable & start

Terminal window
systemctl enable filebrowser.service
systemctl start filebrowser.service