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 link
1
2
3
4
5
6
7
| filebrowser-quantum/
├── .env
├── compose.yaml
└── files/
└── data/
├── config.yaml
└── tmp/
|
Initial Setup link
- Run the commands below commands in the terminal to initialize the folder structure, or manually via the desktop.
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,
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| services:
filebrowser:
image: gtstef/filebrowser:stable
container_name: quantum-prod
ports:
- 8900:80
restart: unless-stopped
# user: filebrowser
networks:
- proxy
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,
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.
|
Non Root user link
By default, FileBrowser uses root. You can use filebrowser, a built-in user (with UID=1000 and GID=1000), but specifying in the compose file’s user in the respective service. If you need a different ID, then create a .env file and fill the contents with,
1
2
| UID=1001
GID=1001 # or your required values
|
This way compose file will take the variables’ value when docker compose starts FileBrowser.
Update the compose file with user: "$UID:$GID" instead. Lastly, update the data folder owner with the same ID as well with
1
| chown -R 1001:1001 data
|
For most cases, user: filebrowser will suffice.
Using FileBrowser link
Starting the service link
Change to the directory where the compose file is in your terminal and run,
This will pull the image and start the container. You can now access it via http://<YOUR_IP>:8900.
Updating the service link
Change to the directory where the compose file is in your terminal and run,
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 link