Skip to main content

Filebrowser Configuration Guide - Complete Reference

filebrowser has many configurable options that you can use via command-line flags, environment variables, or a config file. Below is a comprehensive list of commonly used CLI flags and configuration options.


✅ Basic filebrowser Configuration Flags
#

These are the most important flags when running the filebrowser binary:

FlagDescription
-a, --addressThe IP address to bind to (default: 0.0.0.0)
-p, --portThe port to run the web server on (default: 8080)
-d, --databasePath to the .db file
--rootRoot directory for files (default: current directory)
--configPath to a JSON config file
--logEnable logging to file or stdout
--certPath to TLS certificate file (for HTTPS)
--keyPath to TLS key file (for HTTPS)
--localeLanguage/locale (e.g., en, fr)

✅ User Management Commands
#

You can manage users from CLI:

filebrowser users add <username> <password> [flags]
filebrowser users update <username> [flags]
filebrowser users rm <username>
filebrowser users list

User-related flags:

FlagDescription
--scopeUser’s file access scope
--localeDefault language
--perm.adminGive admin privileges
--perm.createAllow file creation
--perm.renameAllow renaming
--perm.deleteAllow deletion
--perm.downloadAllow downloads
--perm.shareAllow sharing
--perm.executeAllow command execution
--perm.modifyAllow modifying files
--perm.viewAllow viewing files
--perm.previewAllow file preview

✅ Available Permissions (for --perm.*)
#

PermissionDescription
adminFull access to settings and users
createCreate new files/folders
renameRename files/folders
deleteDelete files/folders
downloadDownload files
shareShare files with a link
executeRun shell commands
modifyModify files
viewView files in UI
previewPreview files in browser

✅ TLS (HTTPS) Support
#

To run with HTTPS:

filebrowser --cert /path/to/cert.pem --key /path/to/key.pem

You can generate a self-signed cert with:

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes

✅ Config File (Alternative to CLI)
#

You can create a JSON config file and load it with --config.

Example: config.json

{
  "address": "192.168.1.3",
  "port": 8080,
  "log": "stdout",
  "database": "/srv/filebrowser/filebrowser.db",
  "root": "/srv/data"
}

Run it like this:

filebrowser --config /srv/filebrowser/config.json

✅ Environment Variables
#

You can also set settings via environment variables:

Environment VariableEquivalent CLI Flag
FB_ADDRESS--address
FB_PORT--port
FB_DATABASE--database
FB_ROOT--root
FB_CERT--cert
FB_KEY--key

✅ Help Command
#

To get a full up-to-date list of flags and commands:

filebrowser --help

Or for subcommands:

filebrowser users --help

Would you like me to generate a default config file for you or help turn this into a systemd service?

Ah 👍 you already have the default FileBrowser settings.json (auto-generated). That’s why you see only:

{
  "port": 80,
  "baseURL": "",
  "address": "",
  "log": "stdout",
  "database": "/database/filebrowser.db",
  "root": "/srv"
}

This is the basic config (port, db path, root folder). If you want user registration (signup), you need to expand this file to include extra keys (like I showed before).


Here’s a merged example (keeping your current values + adding signup support):

{
  "port": 80,
  "baseURL": "",
  "address": "",
  "log": "stdout",
  "database": "/database/filebrowser.db",
  "root": "/srv",
  "signup": true,
  "createUserDir": true,
  "branding": {
    "name": "My FileBrowser",
    "disableExternal": false
  },
  "defaults": {
    "scope": "/srv",
    "locale": "en",
    "viewMode": "list",
    "singleClick": false,
    "sorting": {
      "by": "name",
      "asc": true
    },
    "perm": {
      "admin": false,
      "execute": true,
      "create": true,
      "rename": true,
      "modify": true,
      "delete": true,
      "share": true,
      "download": true
    }
  }
}

🔹 Steps
#

  1. Edit your config/settings.json and replace contents with the above.

  2. Ensure permissions are correct:

    sudo chown 1000:1000 /home/youcef/docker_app/filebrowser/config/settings.json
  3. Restart container:

    docker-compose down
    docker-compose up -d

Now when you go to http://192.168.1.6:8080, you should see a Sign Up button.


Security note: this makes registration open for anyone on your LAN.

Youcef
Author
Youcef
My name is youcef and i’m linux user who fool in love with linux , like free and open software .