This guide will help you set up your FileBrowser instance alone. This will be helpful for users who just want to access their files over LAN for storage.

Folder Structure

TEXT
1
2
3
4
5
6
7
filebrowser-quantum/
├── .env
├── compose.yaml
└── files/
└── data/
    ├── config.yaml
    └── tmp/

Initial Setup

  • Run the commands below commands in the terminal to initialize the folder structure, or manually via the desktop.
BASH
1
2
mkdir -p data/tmp
touch .env compose.yaml data/config.yaml

Volume bindings needed:

  • ./data:/home/filebrowser/data is required to set the config file, database and tmp folder.
  • Any folder you want to have access to. In this example, we use ./files which will be created in the same directory
  • Other volume bindings that need to have access via the web.

Update the compose.yml,

YAML
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
services:
  filebrowser:
    image: gtstef/filebrowser:stable
    container_name: quantum-prod
    ports:
      - 8900:80
    restart: unless-stopped
    # user: filebrowser
    volumes:
      - ./data:/home/filebrowser/data
      - ./files:/files
      # - /other/dir:/dir # Add other sources
    environment:
      - "FILEBROWSER_CONFIG=data/config.yaml" # using our config file at ./data/config.yaml

Update the config.yaml,

YAML
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
server:
  database: "data/database.db"
  cacheDir: "data/tmp"
  sources:
    - path: "/files"
      name: Home
      config:
        defaultUserScope: "/users/" # new users will get created in /users/<username>
        defaultEnabled: true # new users automatically get access to the source
        createUserDir: true # a user "bill" will see files from /files/users/bill
    - path: "/home/filebrowser" # mount the docker home folder for convenience
      name: Backend
    # Add your sources here.
  #externalUrl: 'https://<YOUR_IP>:8900' # if you plan to share externally, share links will be generated with this url
  maxArchiveSize: 50 # maxiumum pre-archive size users are allowed to download at once.
auth:
  tokenExpirationHours: 2
  methods:
    password:
      enabled: true
      minLength: 5
      signup: true
  adminUsername: admin
  adminPassword: admin # remove this after first startup if you want to change this password manually.

Running container with a different user

The easist way to update the user is through docker compose. For example to create a new user 1001:1001 “${UID}:${GID}”:

YAML
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
services:
  filebrowser:
    image: gtstef/filebrowser:stable
    container_name: quantum-prod
    user: "1001:1001"
    ports:
      - 8900:80
    restart: unless-stopped
    networks:
      - proxy
    volumes:
      - ./data:/home/filebrowser/data
      - ./files:/files

You will also want to ensure the data folder has the correct permissions with chown command:

BASH
1
chown -R 1001:1001 data

Using FileBrowser

Starting the service

Change to the directory where the compose file is in your terminal and run,

BASH
1
docker compose up -d

This will pull the image and start the container. You can now access it via http://<YOUR_IP>:8900.

Updating the service

Change to the directory where the compose file is in your terminal and run,

BASH
1
2
3
docker compose pull   # Get the new image
docker compose down   # Shutdown container
docker compose up -d  # Load new image

With the database and cache set up, your data will persist even with restarts.

Next Steps