FileBrowser Quantum is a free and open source web-based file manager that lets you browse, upload, edit, and share files from any device with a browser. You can manage multiple storage sources, control access down to the user level, and preview or edit files right in the browser, and Docker makes deployment simple.
The Docker Compose File
---
services:
filebrowser:
image: ghcr.io/gtsteffaniak/filebrowser:latest
container_name: filebrowser
restart: unless-stopped
security_opt:
- no-new-privileges:true
environment:
- TZ=Europe/Stockholm
volumes:
- /path/to/your/files:/folder
- ./data:/home/filebrowser/data
ports:
- "8080:80"
user: ${UID:-1000}:${GID:-1000}
This Docker Compose file defines a single service named "filebrowser." The service is built from the "ghcr.io/gtsteffaniak/filebrowser" image, tagged "latest," which is the recommended tag for regular use and includes FFmpeg support for media previews alongside document preview capability.
The "restart" section ensures that the container will always be restarted if it exits (unless manually stopped). This is useful for ensuring that the service is always available, especially if it crashes or is shut down unexpectedly.
The "security_opt" section prevents your container processes from gaining additional privileges. This is an important security consideration, particularly for a service that has direct read and write access to your files.
The "ports" section maps port 8080 on the host machine to port 80 in the container. This allows us to access the FileBrowser web interface from our local machine. You can change the host-side port (the left number) freely without touching any internal configuration.
Under "environment," the TZ variable sets the container's timezone, which keeps timestamps on files and activity logs consistent with your local time. Adjust this to match your own timezone.
The "volumes" section maps two directories. The "/folder" mount inside the container points to whatever directory on your host you want FileBrowser to manage, so replace "/path/to/your/files" with the actual path to the files you want to browse. The second mount, "./data:/home/filebrowser/data," persists FileBrowser's own configuration file, its SQLite database, and its cache directory. Keeping this directory intact across restarts means your users, settings, and file index don't get wiped out every time the container restarts.
Additional Configuration
Before starting the container for the first time, create the data directory that FileBrowser will use for its config, database, and cache:
bash
mkdir -p filebrowser/data && cd filebrowserFileBrowser will generate a default configuration on first run if none exists, but you can also drop a "config.yaml" file into the "data" directory ahead of time if you want to define your sources and settings up front. At minimum, a source configuration looks like this:
config.yaml
server:
cacheDir: /home/filebrowser/data/tmp
sources:
- path: /folderAvoid pointing a source at the root "/" directory or including the "/var" folder, since FileBrowser will try to index everything underneath it.
Security note: the default login is "admin" / "admin." Log in and change this password immediately after your first startup, especially if the container is reachable from outside your local network.
Running FileBrowser Quantum with Docker Compose
To run FileBrowser Quantum with Docker Compose, first, make sure you have Docker and Docker Compose installed on your machine. Then, create a new directory for your project and save the above Docker Compose file as "docker-compose.yml" in that directory.
Next, run the following command from the same directory:
bash
docker compose up -dThis command will start the FileBrowser Quantum container in the background and detach from it. You can then access the FileBrowser web interface by going to http://localhost:8080 in your web browser.
Log in with the default "admin" / "admin" credentials, and head straight to the user settings to set a stronger password before you do anything else.
Conclusion
In this article, we explored how to set up and run FileBrowser Quantum using Docker Compose. We looked at the different sections of the Docker Compose file and explained how they work together to create a functional FileBrowser service. By running FileBrowser Quantum with Docker Compose, you can easily manage and access your files from any browser on your network without having to worry about dependencies or configuration.