docker config
services: filebrowser: volumes: - '/mnt/external-hdd:/srv' # optional if you want db to persist - configure a path under "database" dir in config file. - './database:/home/filebrowser/database' - './config/config.yaml:/home/filebrowser/config.yaml' # optional mount a temp directory to use. Generally, there is no need for this unless your user is not root or filebrowser. # - './tmp/:/home/filebrowser/tmp/' ports: - '2020:80' image: gtstef/filebrowser # optionally run as non-root filebrowser user #user: filebrowser restart: always
cant makeit work any help?
Hmm I think I missed pointing that out in the config wiki, I'll update it.
You need to set the debates location in your config:
server:
database: "database/database.db"
By default it looks for database.db
But in docker you mount database as a folder and then need to specify that in the custom config.
This is actually a problem I had too.
You seem to put some http files under /home/filebrowser, so I have to do this:
-v /docker/filebrowser/config.yaml:/home/filebrowser/config.yaml \
-v /docker/filebrowser/filebrowser.db:/home/filebrowser/filebrowser.db \
-v /docker/filebrowser/filebrowser.db.bak:/home/filebrowser/filebrowser.db.bak \
-v /docker/filebrowser/filebrowser.log:/home/filebrowser/filebrowser.log \
-v /docker/filebrowser/tmp:/home/filebrowser/tmp \
which is very cumbersome, instead of this:
-v /docker/filebrowser:/home/filebrowser
which is preferred.
Granted I manually set
database: "/home/filebrowser/filebrowser.db"
logging:
- output: "/home/filebrowser/filebrowser.log"
but the default tmp, bak, and config.yaml are by default put in /home/filebrowser
I think I am going to update the behavior for filebrowser to default to /database/database.db if no config option is provided to make this process smoother for docker users.
And filebrowser would automatically create the database folder if it doesn't exist.
The challenge with @christaikobo solution is that you have to know to create a database.db file to mount first, which is a step I would like to eliminate for those getting started.
Ultimately I think mounting only 1 directory which contains database, tmp, back config and anything else that needs to be mounted for persistence is a better idea, doesn't matter which directory it is.
On Sun, May 18, 2025, 12:20 Graham Steffaniak @.***> wrote:
gtsteffaniak left a comment (gtsteffaniak/filebrowser#645) https://github.com/gtsteffaniak/filebrowser/issues/645#issuecomment-2889162907
I think I am going to update the behavior for filebrowser to default to /database/database.db if no config option is provided to make this process smoother for docker users.
And filebrowser would automatically create the database folder if it doesn't exist.
The challenge with @christaikobo https://github.com/christaikobo solution is that you have to know to create a database.db file to mount first, which is a step I would like to eliminate for those getting started.
β Reply to this email directly, view it on GitHub https://github.com/gtsteffaniak/filebrowser/issues/645#issuecomment-2889162907, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFY26LE54KZTNXARC7ZF72L27DMRJAVCNFSM6AAAAAB5JJSSW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQOBZGE3DEOJQG4 . You are receiving this because you were mentioned.Message ID: @.***>
Or maybe 2 directories. The current situation isn't very ideal IMO.
On Sun, May 18, 2025, 13:07 Wu Tang @.***> wrote:
Ultimately I think mounting only 1 directory which contains database, tmp, back config and anything else that needs to be mounted for persistence is a better idea, doesn't matter which directory it is.
On Sun, May 18, 2025, 12:20 Graham Steffaniak @.***> wrote:
gtsteffaniak left a comment (gtsteffaniak/filebrowser#645) https://github.com/gtsteffaniak/filebrowser/issues/645#issuecomment-2889162907
I think I am going to update the behavior for filebrowser to default to /database/database.db if no config option is provided to make this process smoother for docker users.
And filebrowser would automatically create the database folder if it doesn't exist.
The challenge with @christaikobo https://github.com/christaikobo solution is that you have to know to create a database.db file to mount first, which is a step I would like to eliminate for those getting started.
β Reply to this email directly, view it on GitHub https://github.com/gtsteffaniak/filebrowser/issues/645#issuecomment-2889162907, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFY26LE54KZTNXARC7ZF72L27DMRJAVCNFSM6AAAAAB5JJSSW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQOBZGE3DEOJQG4 . You are receiving this because you were mentioned.Message ID: @.***>
Good all info u post, please simplify and add More Easy config.yaml is hard understand for new user like me thanx for u Time and the fork is very good sorry for my lenguage hablo espaΓ±ol
This is the config I am currently using.
- Create
compose.yml
services:
quantum:
image: gtstef/filebrowser
container_name: quantum
ports:
- 8900:80
restart: unless-stopped
user: filebrowser # remove this for root
volumes:
- ./data:/home/filebrowser/data
- ./tmp:/home/filebrowser/tmp # For non root users, remove this for root
- ... # Add custom volume bindings
environment:
- "FILEBROWSER_CONFIG=data/config.yaml" # NOTE: config.yaml MUST EXIST or filebrowser will not start
- "FILEBROWSER_ONLYOFFICE_SECRET=some-big-generated-secret" # Generate jwt_secret from below command
onlyoffice:
container_name: onlyoffice
image: onlyoffice/documentserver
restart: unless-stopped
environment:
JWT_SECRET: some-big-generated-secret # Generate jwt_secret from below command
ports:
- '8901:80' # note this is HTTP, insecure, do not expose to internet
Use full path for FILEBROWSER_CONFIG if it does not work /home/filebrowser/data/config.yaml
- Make data (and tmp if you want non-root) directory for filebrowser and create
./data/config.yaml
server:
database: "data/database.db" # NOTE: NO NEED TO CREATE DATABASE FILE
. . . # Rest of config
Use full path for database if it does not work /home/filebrowser/data/database.db. And the rest of config check docs which is pretty easy to follow.
- Commands I ran to start (for the first time)
# Generate JWT_SECRET with below command
$ openssl rand -hex 16
# Copy the secret and edit compose.yml - FILEBROWSER_ONLYOFFICE_SECRET and JWT_SECRET
$ docker compose up -d
After that its the docker compose down/up -d
- Folder structure
filebrowser/
βββ data/
β βββ config.yaml # should exist
β βββ database.db # should autogenerate
βββ tmp/ # no need for root users
Hopefully helps whoever drops by my comment.
[!IMPORTANT]
If you use reverse proxy, make sure filebrowser and OnlyOffice are externally accessible via the proxy. If you forget for OnlyOffice, then the integration will not work. Pretty much why I have8900and8901open (and prolly will soon traefik labels for both service instead of ports as well).
@gtsteffaniak Apparently JWT_SECRET can be any string according to OnlyOffice Docs (For docker related section you need to scroll to bottom or search For Docker)
To change the secret key, specify your own value in -e JWT_SECRET=my_jwt_secret.
Below command from your docs is unnecessary. And is needed only if OnlyOffice is running bare metal where JWT is generated automatically.
$ docker exec onlyoffice /var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/local.json 'services.CoAuthoring.secret.session.string'
So openssl rand -hex 16 will work fine (and tested myself and is working)
I wouild like to say, I concur with the previous comment, of need to simplify the docker volume to a single directory, and everything else defaults cleanly underneatch. Other projects that used an approach of pointing direct to the config.yaml file eg (dashy), ultimately bit the bullet and simplified after they had a substantial user base.... not fun.
Agreed! Will happen in 0.8.0
Well since I made an announcement yesterday I have an idea how to make this backwards compatible, I'll make the change for the next 0.7.x release in the next couple days.
Probably does need some simplification or some assistance with the Docker Compose example docs.
I follow the Linuxserver doctrine where my config files live in /home/user/.config/service_name, on the host, which tends to map cleanly into the container.