Configure server settings including port, address, database, and caching.

Basic Server Configuration

YAML
1
2
3
4
server:
  port: 80
  database: "database.db"
  cacheDir: "tmp"

Configuration Options

port

Server port (default: 8080)

YAML
1
2
server:
  port: 80

listen

Server listen address (default: 0.0.0.0)

YAML
1
2
server:
  listen: "localhost" # override the default 0.0.0.0

baseURL

Base URL – primarily for reverse proxy

YAML
1
2
server:
  baseURL: "/filebrowser"

socket

Unix socket to listen on (alternative to TCP port). When set, overrides port configuration.

YAML
1
2
server:
  socket: "/var/run/filebrowser.sock"

minSearchLength

Minimum length of search query to begin searching (default: 3)

YAML
1
2
server:
  minSearchLength: 3

disableUpdateCheck

Disable backend update check service

YAML
1
2
server:
  disableUpdateCheck: false

numImageProcessors

Number of concurrent image processing jobs used to create previews. Default is number of CPU cores available.

YAML
1
2
server:
  numImageProcessors: 4

disablePreviews

Disable all previews and thumbnails. Simple icons will be used instead.

YAML
1
2
server:
  disablePreviews: false

disablePreviewResize

Disable resizing of previews for faster loading over slow connections.

YAML
1
2
server:
  disablePreviewResize: false

disableTypeDetectionByHeader

Disable type detection by header. Useful if filesystem is slow.

YAML
1
2
server:
  disableTypeDetectionByHeader: false

externalUrl

Used by share links if set. This is the base domain that share links will use.

YAML
1
2
server:
  externalUrl: "https://mydomain.com"

cacheDirCleanup

Whether to automatically cleanup the cache directory. Note: Docker must also mount a persistent volume to persist the cache (default: false).

YAML
1
2
server:
  cacheDirCleanup: false

filesystem

Filesystem settings for file and directory creation permissions.

YAML
1
2
3
4
server:
  filesystem:
    createFilePermission: "644"      # Unix permissions like 644, 755, 2755 (default: 644)
    createDirectoryPermission: "755" # Unix permissions like 755, 2755, 1777 (default: 755)

indexSqlConfig

Index database SQL configuration for performance tuning.

YAML
1
2
3
4
5
6
server:
  indexSqlConfig:
    batchSize: 1000    # Number of items to batch in a single transaction, typically 500-5000. Higher = faster but could use more memory.
    cacheSizeMB: 32    # Size of the SQLite cache in MB
    walMode: false     # Enable the more complex WAL journaling mode. Slower, more memory usage, but better for deployments with constant user activity.
    disableReuse: false # Enable to always create a new indexing database on startup.

sources

Configure file system sources. See Sources configuration for detailed information.

logging

Configure logging output and levels. See Logging configuration for detailed information.

database

Database file path. See configuration file priority for default locations.

YAML
1
2
server:
  database: "data/database.db"

Default locations:

  • Current directory: ./database.db
  • Docker: first checks /home/filebrowser/data/database.db, then current directory ./database.db

maxArchiveSize

FileBrowser limits the maxiumum size of archive – this affects folder downloads. This is limited to 50GB by default, which means the pre-archive combined size of a directory to be downloaded must be 50GB or less. This is necessary because archiving will store temporary files and that could exhaust the server if left unlimited.

Ensure you have enough free space available in your cacheDir if you choose to increase this further.

YAML
1
2
server:
  maxArchiveSize: 50 # max pre-archive combined size of files/folder that are allowed to be archived (in GB)

cacheDir

The cacheDir is a critical configuration that defines where FileBrowser stores temporary files during various operations. By default, a tmp folder is created in the same directory as the program is run, but this may not be ideal. For example unRAID uses a different user by default and that causes permission issues with the default cache directory creation process.

Important Considerations

The cacheDir is used by:

  • Chunked file uploads: Each upload chunk is temporarily stored here before being assembled
  • Image preview generation: Thumbnails and processed images are cached
  • Archive operations: ZIP extraction and compression temporary files
  • Document processing: Temporary files during PDF/image conversion
  • Video processing: Some media files during video operations
YAML
1
2
server:
  cacheDir: "tmp" # this is default when not configured.

Docker Examples

Basic Docker Setup:

YAML
1
2
3
4
5
6
7
8
9
# docker-compose.yaml
services:
  filebrowser:
    image: gtstef/filebrowser:beta
    volumes:
      - '/path/to/your/data:/srv'
      - '/var/cache/filebrowser:/tmp/filebrowser'  # Mount cache directory
    environment:
      FILEBROWSER_CONFIG: "/config/config.yaml"

Corresponding config.yaml:

YAML
1
2
server:
  cacheDir: /tmp/filebrowser # corrosponds to above

Corresponding config.yaml:

YAML
1
2
server:
  cacheDir: "/home/filebrowser/cache" # corrosponds to above

Troubleshooting

Permission Issues:

By default, filebrowser uses uid 1000 for the user (you can change that):

BASH
1
2
# Fix permissions for cache directory
sudo chown -R 1000:1000 /var/cache/filebrowser

internalUrl

Internal URL for integrations to access filebrowser (Currently just OnlyOffice)

this could be a docker network dns name or a local IP address on the network. This address should allow the integration to communicate directly with the service.

YAML
1
2
server:
  internalUrl: "http://filebrowser:80"

TLS Configuration

YAML
1
2
3
server:
  tlsCert: "/path/to/cert.pem"
  tlsKey: "/path/to/key.pem"

Next Steps