Publish: 2020-02-27 | Modify: 2020-02-27
File Browser is a file manager developed using Golang. It is cross-platform, free, and open-source with powerful features. In this article, we will share the manual installation method of File Browser on CentOS 7 to familiarize ourselves with its workflow and avoid future problems.
The download link provides pre-compiled binary files for various platforms. Simply download and extract the file according to your platform. Here, we will use 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 appropriate location
mv filebrowser /usr/sbin
File Browser supports configuration files in json, toml, yaml, or yml formats. Let's use the json
format as an example. Run the following command:
# 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 parameters above have the following meanings. Modify them according to your own situation:
The -c
parameter specifies the File Browser configuration file path. Modify the command according to your own situation:
# Run normally
filebrowser -c /etc/filebrowser/config.json
# If you want to run in the background, execute
nohup filebrowser -c /etc/filebrowser/config.json &
In the configuration file, we set the listening port to 8080
. Don't forget to allow this port in the firewall or security group.
# Allow port in iptables
iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
service iptables save
# Allow port in firewalld
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload
If everything goes smoothly without any errors, you can access File Browser at http://IP:8080
. The default username is admin
and the password is admin
. Note: Remember to change the password after logging in.
After logging in, the default language is English. To change it to Chinese, click on "Settings - Profile Settings - Language" and select "中文". Then click "UPDATE".
In addition to basic file management, File Browser also supports online playback of some video formats and file sharing. It can be used as a simple cloud storage service.
Most settings can be done through the File Browser admin panel, and the settings will be saved in the database. File Browser has many parameters, but based on practical testing by Xiaoz and feedback from the author's GitHub, some parameters do not take effect in the configuration file and are directly read from the database configuration.
admin
and the password is admin
. After installation, be sure to change the default password through the admin panel.
- File Browser official website: https://filebrowser.xyz/
- Project repository: https://github.com/filebrowser/filebrowser
I come from China and I am a freelancer. I specialize in Linux operations, PHP, Golang, and front-end development. I have developed open-source projects such as Zdir, ImgURL, CCAA, and OneNav.