-
Notifications
You must be signed in to change notification settings - Fork 94
Getting Started
How to try out filebrowser -- no persistent database
To try out using docker run, (changes will not be saved on exit):
- This will run with default config and no persistent db -- just to try it out. You can log in with
admin/admin
:
docker run -it -v /path/to/your/folder/to/use:/srv -p 80:80 gtstef/filebrowser
Go to releases and download the executable that matches your platform.
Note
You may need to enable executable permissions first. And platforms like macos will block and require allowing in security & privacy settings
By default, without a config file, you can execute the program (via running .\filebrowser.exe -c config.yaml
on windows or ./filebrowser -c config.yaml
on other platforms).
By default, starting v0.7.5 will run without a config file with a default source being the current directory.
However, a config file is generally necessary, you can download this example config and modify as needed with your sources path (absolute or relative paths are allowed).
Note
docker images are found at gtstef/filebrowser
and ghcr.io/gtsteffaniak/filebrowser
-- use beta
, stable
tags. Avoid all dev
tags, which have changes that could alter your database.
non-root filebrowser user in docker is possible. When running as non-root
or filebrowser
make sure you either specify a server.cacheDir
that points to a directory the user has permission to (creating one beforehand if necessary). By default the filebrowser attempts to create tmp
directory in current directory.
docker run -u filebrowser -it -v $(pwd)/config.yaml:/home/filebrowser/config.yaml -v /path/to/folder:/srv -p 80:80 gtstef/filebrowser
- I recommend using docker-compose if you want to run with a persistent database:
example docker-compose.yaml
:
services:
filebrowser:
volumes:
- '/path/to/folder:/folder'
# optional if you want db to persist - configure a path under "database" dir in config file.
- 'database:/home/filebrowser/database'
- '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:
- '80:80'
image: gtstef/filebrowser
# Optionally run as non-root filebrowser user
#user: filebrowser
restart: always
Then, make sure to mount a modified config file that points to the database file you want to use:
server:
port: 80
database: "database/database.db" # placing in the database directory so it shows up on the host with that volume mounted in `docker-compose.yaml`.
sources:
- path: /folder # corresponds to the folder mounted above in docker-compose
Ready to configure Filebrowser more? See configuration wiki.