How to Manually Install File Browser on CentOS 7

file browsercentos 7 installationfile manager setuplinux file browser guidefile browser configuration
Published·Modified·

File Browser is a powerful, cross-platform, free, and open-source file manager developed in Golang. This article shares the method for manually installing File Browser on CentOS 7 to help you understand its workflow and avoid issues later.

Download File Browser

The author provides pre-compiled binary files for various platforms. You can download and extract them according to your platform without needing to compile them yourself. Taking CentOS 7 as an example:

# Download File Browser
wget https://github.com/filebrowser/filebrowser/releases/download/v2.1.0/linux-amd64-filebrowser.tar.gz
# Extract
 tar -zxvf linux-amd64-filebrowser.tar.gz
# Move to location
mv filebrowser /usr/sbin

Create Configuration File

File Browser supports configuration files in json, toml, yaml, and yml formats. We will use the json format as an example:

# Create a directory to store the database and configuration file
mkdir /etc/filebrowser/
# Create a new configuration file
vi /etc/filebrowser/config.json

Copy the following content and save it to /etc/filebrowser/config.json:

{
    "address":"0.0.0.0",
    "database":"/etc/filebrowser/filebrowser.db",
    "log":"/var/log/filebrowser.log",
    "port":8080,
    "root":"/home",
    "username":"admin"
}

The meanings of the parameters above are as follows; please modify them according to your situation:

  • address: Listening address
  • database: Database address
  • log: Log file path
  • port: Port to listen on
  • root: Directory from which to read files
  • username: Username

Run File Browser

The parameter -c specifies the path to the File Browser configuration file. Please fill in the path according to your situation:

# Run normally
filebrowser -c /etc/filebrowser/config.json
# If you need to run it in the background, execute
nohup filebrowser -c /etc/filebrowser/config.json &

The listening port set in the configuration file is 8080. Do not forget to allow this port in the firewall or security group.

# Allow port via iptables
iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
service iptables save
# Allow port via firewalld
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload

Access File Browser

If everything goes smoothly without errors, visiting http://IP:8080 will display the File Browser login interface. The default username is admin and the password is admin. Note: Please change the password after logging in.

The default interface is in English. Click "Settings - Profile Settings - Language" to select Chinese, then click "UPDATE" to set it.

Using File Browser

In addition to basic file management, File Browser can also play some video formats online and offers file sharing features, making it usable as a simple private cloud storage.

Settings Explanation

Most settings can be completed through the File Browser management backend, and settings are saved in the database. File Browser has many parameters; based on xiaoz's actual testing and feedback from the author on GitHub, some parameters in the configuration file may not take effect and are read directly from the database configuration.

Summary

  • The author has provided pre-compiled File Browser binary files, making installation and setup relatively simple.
  • The default username is admin and the password is admin. You must change the default password via the backend after installation.
  • File Browser is a great project, but unfortunately, the author has stopped updating it, which is a bit of a pity.