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
| 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,
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 link
info
On v1.2.x and earlier, the default user is root.
On v1.3.x and later, the default user is filebrowser (1000:1000).
The easist way to update the user is through docker compose. For example to create a new user 1001:1001 “${UID}:${GID}”:
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:
1
| chown -R 1001:1001 data
|
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