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

baseURL

Base URL – primarily for reverse proxy

YAML
1
2
server:
  baseURL: "/filebrowser"

database

Database file path

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

cacheDir

Temporary cache directory for file operations

The cacheDir is a critical configuration that defines where FileBrowser stores temporary files during various operations. This directory is used for:

  • 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: "data/temp"

Important Considerations

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

With Non-Root User (Recommended):

YAML
1
2
3
4
5
6
7
8
9
# docker-compose.yaml
services:
  filebrowser:
    image: gtstef/filebrowser:beta
    user: filebrowser  # Run as non-root user
    volumes:
      - '/path/to/your/data:/srv'
      - './cache:/home/filebrowser/cache'  # Mount cache directory
      - './data:/home/filebrowser/data'     # Mount data directory

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