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 that works in v0.6.8:

server:
  numImageProcessors: 0
  socket: ""
  tlsKey: ""
  tlsCert: ""
  disablePreviews: false
  resizePreviews: false
  disableTypeDetectionByHeader: false
  port: 0
  baseURL: ""
  logging:
    - levels: ""
      apiLevels: ""
      output: ""
      noColors: false
      json: false
  database: ""
  sources: # validate:required,dive
    - path: "" # validate:required comments:"file system path. (Can be relative)"
      name: "" # comments:"display name"
      config:
        indexingInterval: 0
        disabled: false
        maxWatchers: 0
        neverWatchPaths: []
        ignoreHidden: false
        ignoreZeroSizeFolders: false
        exclude:
          files: []
          folders: []
          fileEndsWith: []
        include:
          files: []
          folders: []
          fileEndsWith: []
        defaultUserScope: "" # comments:"default "" should match folders under path"
        defaultEnabled: false
        createUserDir: false
  externalUrl: ""
  internalUrl: "" # comments:"used by integrations"
  cacheDir: ""
  maxArchiveSize: 0
auth:
  tokenExpirationHours: 0
  methods:
    proxy: # validate:omitempty
      enabled: false
      createUser: false
      header: ""
    noauth: false
    password: # validate:omitempty
      enabled: false
      minLength: 0 # validate:omitempty,min=5
      signup: false # validate:omitempty
      recaptcha: # validate:omitempty
        host: "" # validate:required
        key: "" # validate:required
        secret: "" # validate:required
    oidc: # validate:omitempty
      enabled: false # comments:"whether to enable OIDC authentication"
      clientId: "" # validate:required
      clientSecret: "" # validate:required
      authorizationUrl: "" # validate:required
      tokenUrl: "" # validate:required
      userInfoUrl: "" # validate:required
      scopes: "" # validate:required comments:"space separated list of scopes"
      userIdentifier: "" # comments:"which attribute should be used as the username? options: email, username, name, phone_number, sub"
      jwksUrl: "" # comments:"currently not used by filebrowser"
  key: ""
  adminUsername: ""
  adminPassword: ""
frontend:
  name: ""
  disableDefaultLinks: false
  disableUsedPercentage: false
  externalLinks:
    - text: "" # validate:required
      title: ""
      url: "" # validate:required
users:
  - 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: ""
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
    secret: "" # validate:required
  media: # validate:omitempty
    ffmpegPath: ""

About each configuration

Server configuration

  • numImageProcessors: This is the number of image processors available. Default: 4
  • socket: This is the socket configuration.
  • tlsKey: This is the TLS key configuration.
  • tlsCert: This is the TLS certificate configuration.
  • enableThumbnails: This boolean value determines whether thumbnails are enabled on ui. Default: true
  • resizePreview: This boolean value determines whether preview resizing is enabled. Default: false
  • port: This is the port number on which the server is running. Default: 80
  • baseURL: This is the base URL for the server. Default: ""
  • database: This is the database file path + filename that will be created if it does not already exist. If it exists, it will use the existing file. Default database.db
  • externalUrl: String to define a domain and baseURL for shared links to use. Example https://mydomain.com/. If you have a baseUrl set as "/filebrowser", you'll want to include that on the external URL https://mydomain.com/filebrowser. Default: ""
  • internalUrl: String to define a domain and potentially additional baseURL for internal integrations to use instead for faster communication. Example "https://192.168.1.100/". Default: ""
  • cacheDir: If path is defined here, that directory will be used to store file cache.
  • sources: list of sources to use, if nothing is provided it defaults to the current running directory. See example configuration above.
  • maxArchiveSize: the max combined total size of all files before compressing in GB. This prevents users from crashing the server by creating enormous archives that could exceed the available storage space. Default: 50

Auth configuration settings

  • adminUsername: This is the username of the admin user. Default: admin
  • adminPassword: This is the password of the admin user. Default: admin
  • tokenExpirationHours: this is the time in hours that the web token expires and needs renewing. Does not apply to API tokens. Default: 2
  • methods: see Example auth config for method configuration help.
    • methods.password.recaptcha:
      • host: This is the host for reCAPTCHA.
      • key: This is the reCAPTCHA key.
      • secret: This is the reCAPTCHA secret.
    • methods.password.signup: This boolean value indicates whether user signup is enabled on the login page. NOTE: Be mindful of userDefaults settings if enabled. Default: false

Frontend configuration settings

  • name: This is the name of the frontend.
  • disableExternal: This boolean value determines whether external access is disabled.
  • disableUsedPercentage: This boolean value determines whether the used percentage is disabled or not.
  • theme: This is the theme configuration.
  • color: This is the color configuration.

UserDefaults configuration settings

  • darkMode: Determines whether dark mode is enabled for the user (true or false)
  • settingsAllowed: Determines whether settings page is enabled for the user (true or false)
  • locale: String locale configuration. Default: en
  • viewMode: This is the view mode configuration. Possible values: normal, compact, list, and gallery. default: normal
  • singleClick: This boolean value determines whether single-click is enabled. (true or false)
  • permissions:
    • admin: This boolean value determines whether admin permissions are granted.
    • modify: This boolean value determines whether modify permissions are granted.
    • share: This boolean value determines whether share permissions are granted.
    • api: Ability to create and manage API keys.
  • showHidden: true/false value. Defaults to false and can be updated in the user settings. Windows hidden file properties are only supported when running the windows executable, because it relies on windows system calls.
  • dateFormat: This boolean value determines whether date formatting is enabled. (true or false)
  • gallerySize: integer from 0-9 indicating smaller to larger gallery size. Defaults to 3.
  • ThemeColor: user specified theme color, defaults to blue, can also be red,green,violet,yellow or orange
  • quickDownload: Always show the download button on files/folders in the listing view. Default: false
  • disableOnlyOfficeExt: A string of extensions to default disable onlyoffice editor for (using regular editor instead). Default: ".txt .csv .html"

Clone this wiki locally