How to install filebrowser on linux

FileBrowser is a single binary and can be used as a standalone executable,use it to easily manage files on the server.

First,install using convenience script 

curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
filebrowser -r /path/to/your/file

The executable is stored in /usr/local/bin/ directory

Secend,creating a configuration file and a db file

vim /etc/filebrowser.db
vim /etc/filebrowser.json
{
"port": 1000,
"baseURL": "/file",
"address": "127.0.0.1",
"log": "stdout",
"database": "/etc/filebrowser.db",
"root": "/"
}

Creating a systemctl file for filebrowser

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

Then you can use the following commands to manage it

systemctl status filebrowser.service
systemctl start filebrowser.service
systemctl restart filebrowser.service
systemctl enable filebrowser.service

Enjoy it.

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注