Skip to content

Full Config Example

Graham Steffaniak edited this page May 1, 2025 · 43 revisions

Starting with v0.6.8, a config needs to be validated using a few simple rules:

  1. Invalid fields are no longer supported; this helps spot typos. For example, if you type userdefaults instead of userDefaults, it will let you know rather than ignoring all of your userDefault settings you intended to set.
  2. required fields, such as server.sources and different keys based on the settings that you add.
  3. some additional light validation, such as min values for things like minLength for password config if provided.

I understand this can be annoying, because it means a config that worked before may not run anymore. However, once you get your config.yaml validated and working, any future changes should have a much better experience because of this.

Since most configs will probably not work as-is anymore, I decided to take this opportunity to also move some keys into more appropriate locations.

To help with this, I wanted to provide a full config example:

server:
  numImageProcessors: 0               # comments:"number of concurrent image processing jobs"
  socket: ""                          # comments:"socket to listen on"
  tlsKey: ""                          # comments:"path to TLS key"
  tlsCert: ""                         # comments:"path to TLS cert"
  disablePreviews: false              # comments:"disable all previews thumbnails, simple icons will be used"
  disablePreviewResize: false         # comments:"disable resizing of previews for faster loading over slow connections"
  disableTypeDetectionByHeader: false # comments:"disable type detection by header, useful if filesystem is slow."
  port: 0                             # comments:"port to listen on"
  baseURL: ""                         # comments:"base URL for the server, the subpath that the server is running on."
  logging:
    - levels: ""                      # comments:"separated list of log levels to enable. (eg. "info|warning|error|debug")"
      apiLevels: ""                   # comments:"separated list of log levels to enable for the API. (eg. "info|warning|error")"
      output: ""                      # comments:"output location. (eg. "stdout" or "path/to/file.log")"
      noColors: false                 # comments:"disable colors in the output"
      json: false                     # comments:"output in json format, currently not supported"
  database: ""                       # comments:"path to the database file"
  sources:                           # validate:required,dive
    - path: ""                       # validate:required comments:"file system path. (Can be relative)"
      name: ""                       # comments:"display name"
      config:
        indexingInterval: 0          # comments:"optional manual overide interval in seconds to re-index the source"
        disabled: false              # comments:"disable the indexing of this source"
        maxWatchers: 0               # comments:"number of concurrent watchers to use for this source, currently not supported"
        neverWatchPaths: []
        ignoreHidden: false          # comments:"ignore hidden files and folders."
        ignoreZeroSizeFolders: false # comments:"ignore folders with 0 size"
        exclude:                     # comments:"exclude files and folders from indexing, if include is not set"
          files: []
          folders: []
          fileEndsWith: []
        include: # comments:"include files and folders from indexing, if exclude is not set"
          files: []
          folders: []
          fileEndsWith: []
        defaultUserScope: ""  # comments:"default "/" should match folders under path"
        defaultEnabled: false # comments:"should be added as a default source for new users?"
        createUserDir: false  # comments:"create a user directory for each user"
  externalUrl: ""   # comments:"used by share links if set"
  internalUrl: ""   # comments:"used by integrations if set, this is the url that an integration service will use to communicate with filebrowser"
  cacheDir: ""      # comments:"path to the cache directory, used for thumbnails and other cached files"
  maxArchiveSize: 0 # comments:"max pre-archive combined size of files/folder that are allowed to be archived (in GB)"
auth:
  tokenExpirationHours: 0 # comments:"the number of hours until the token expires. Default is 2 hours."
  methods:
    proxy:                # validate:omitempty
      enabled: false
      createUser: false   # comments:"create user if not exists"
      header: ""          # comments:"required header to use for authentication. Security Warning: FileBrowser blindly accepts the header value as username."
    noauth: false   # comments:"if set to true, overrides all other auth methods and disables authentication"
    password:       # validate:omitempty
      enabled: false
      minLength: 0  # validate:omitempty,min=5
      signup: false # validate:omitempty comments:"currently not used by filebrowser"
      recaptcha:    # validate:omitempty comments:"recaptcha config, only used if signup is enabled"
        host: ""    # validate:required
        key: ""     # validate:required
        secret: ""  # validate:required
    oidc:                  # validate:omitempty
      enabled: false       # comments:"whether to enable OIDC authentication"
      clientId: ""         # validate:required comments:"client id of the OIDC application"
      clientSecret: ""     # validate:required comments:"client secret of the OIDC application"
      authorizationUrl: "" # validate:required comments:"authorization URL of the OIDC provider"
      tokenUrl: ""         # validate:required comments:"token URL of the OIDC provider"
      userInfoUrl: ""      # validate:required comments:"user info URL of the OIDC provider"
      scopes: ""           # validate:required comments:"space separated list of scopes to request from the OIDC provider"
      userIdentifier: ""   # comments:"optional: which attribute should be used as the username? options: email, username, name, phone_number, sub"
      jwksUrl: ""          # comments:"currently not used by filebrowser"
  key: ""           # comments:"the key used to sign the JWT tokens. If not set, a random key will be generated."
  adminUsername: "" # comments:"the username of the admin user. If not set, the default is "admin"."
  adminPassword: "" # comments:"the password of the admin user. If not set, the default is "admin"."
frontend:
  name: ""                     # comments:"display name"
  disableDefaultLinks: false   # comments:"disable default links in the sidebar"
  disableUsedPercentage: false # comments:"disable used percentage for the sources in the sidebar"
  externalLinks:
    - text: ""                 # validate:required comments:"the text to display on the link"
      title: ""                # comments:"the title to display on hover"
      url: ""                  # validate:required comments:"the url to link to"
userDefaults:
  preview:
    highQuality: false
    image: false
    video: false
    office: false
    popup: false
  stickySidebar: false
  darkMode: false
  lockPassword: false
  disableSettings: false
  locale: ""
  viewMode: ""
  gallerySize: 0
  singleClick: false
  permissions:
    api: false
    admin: false
    modify: false
    share: false
    realtime: false
  showHidden: false
  dateFormat: false
  themeColor: ""
  quickDownload: false
  disableOnlyOfficeExt: ""
integrations:
  office:      # validate:omitempty
    url: ""    # validate:required comments:"URL to the OnlyOffice Document Server"
    secret: "" # validate:required
  media:           # validate:omitempty
    ffmpegPath: "" # comments:"path to ffmpeg binary, including the binary name (eg. /usr/bin/ffmpeg)"

Clone this wiki locally