Installation

Filebrowser is a single binary that can be used as a standalone executable. Alternatively, you can use it with Docker or Caddy, a fantastic web server that enables HTTPS by default. Its installation is straightforward regardless of the system you use.

Using Brew

Note: Brew is available for both Linux and macOS.

[[How to install Brew]]

bash
1
2
3
brew tap filebrowser/tap
brew install filebrowser
filebrowser -r /path/to/your/files

Tip: Configure Filebrowser before running it for the first time.

Once configured, your Filebrowser instance should be running successfully!

Configuration

Filebrowser offers flexible configuration options, including an official CLI.

  1. Set the address:
    bash
    1
    filebrowser config set address 0.0.0.0
  2. Set the port:
    bash
    1
    filebrowser config set port 8090
  3. Set the root directory:
    bash
    1
    filebrowser config set root [your directory path]

Export the configuration for future use:

bash
1
filebrowser config export [output path]

Next time, you can load this configuration file to restore your settings.

Starting Filebrowser

Direct Execution

Run Filebrowser directly with the following command:

bash
1
filebrowser -c [your config file path] -d [database path]

Note: Specify the database path during the first run. You can reuse the same .db file later to recover your site.

Running in the Background

How to run in the background

Example for macOS

xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>wayne.filebrowser.service</string>
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/bin/filebrowser</string>
<string>-c</string>
<string>/Users/wayne/.filebrowser.yaml</string>
<string>-d</string>
<string>/Users/wayne/filebrowser.db</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/log/filebrowser.log</string>
<key>StandardErrorPath</key>
<string>/tmp/log/filebrowser.err</string>
</dict>
</plist>

Example for Ubuntu

plaintext
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[Unit]
Description=Filebrowser Service
After=network.target

[Service]
ExecStart=/opt/homebrew/bin/filebrowser -c /home/wayne/.filebrowser.yaml -d /home/wayne/filebrowser.db
Restart=always
User=wayne
WorkingDirectory=/home/wayne
StandardOutput=append:/tmp/log/filebrowser.log
StandardError=append:/tmp/log/filebrowser.err

[Install]
WantedBy=multi-user.target