filebrowser/README.md

253 lines
12 KiB
Markdown
Raw Normal View History

<p align="center">
<a href="https://opensource.org/license/apache-2-0/"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" alt="License: Apache-2.0"></a>
2023-09-06 21:07:35 +00:00
</p>
<p align="center">
2024-08-03 15:34:12 +00:00
<img src="frontend/public/img/icons/favicon-256x256.png" width="100" title="Login With Custom URL">
2023-09-06 21:07:35 +00:00
</p>
2024-09-16 21:01:16 +00:00
<h3 align="center">FileBrowser Quantum - A modern web-based file manager</h3>
2023-09-06 21:07:35 +00:00
<p align="center">
2024-10-07 22:50:21 +00:00
<img width="800" src="https://github.com/user-attachments/assets/e4a47229-66f8-4838-9575-dd2413596688" title="Main Screenshot">
2023-09-06 21:07:35 +00:00
</p>
2024-12-02 17:14:50 +00:00
> [!Note]
2024-12-26 17:31:04 +00:00
> Starting with v0.3.3, configuration file mapping is different to support non-root user. Now, the default config file name is `config.yaml` and in docker the path is `/home/filebrowser/config.yaml` and `/home/filebrowser/<database_file>`. Please read the usage below to properly update your config to point the new config location. (open an issue for any help needed)
2024-11-26 17:21:41 +00:00
> [!WARNING]
2024-12-02 17:14:50 +00:00
> - There is no stable version yet. Always check release notes for bug fixes on functionality that may have been changed. If you notice any unexpected behavior -- please open an issue to have it fixed soon.
2024-11-26 17:21:41 +00:00
2024-11-21 00:15:30 +00:00
FileBrowser Quantum is a fork of the file browser opensource project with the following changes:
2023-06-13 13:22:24 +00:00
2024-12-26 17:31:04 +00:00
1. [x] Indexes files efficiently. (See [indexing readme](./docs/indexing.md) for more info.)
- Real-time search results as you type!
2024-11-26 17:21:41 +00:00
- Search supports file/folder sizes and many file type filters.
2024-12-02 17:14:50 +00:00
- Enhanced interactive results that show file/folder sizes.
2024-12-17 00:01:55 +00:00
2. [x] Revamped and simplified GUI navbar and sidebar menu.
2024-08-03 15:34:12 +00:00
- Additional compact view mode as well as refreshed view mode
styles.
2024-11-26 17:21:41 +00:00
- Many graphical and user experience improvements.
- right-click context menu
2024-12-26 17:31:04 +00:00
3. [x] Revamped and simplified configuration via `config.yaml` config file.
2024-12-17 00:01:55 +00:00
4. [x] Better listing browsing
2024-08-24 22:02:33 +00:00
- Switching view modes is instant
2024-11-21 00:15:30 +00:00
- Folder sizes are shown as well
2024-08-24 22:02:33 +00:00
- Changing Sort order is instant
- The entire directory is loaded in 1/3 the time
2024-12-17 00:01:55 +00:00
5. [x] Developer API support
2024-12-26 17:31:04 +00:00
- Ability to create long-live API Tokens.
2024-11-21 00:15:30 +00:00
- Helpful Swagger page available at `/swagger` endpoint.
2024-02-10 00:13:02 +00:00
2024-11-26 17:21:41 +00:00
Notable features that this fork *does not* have (removed):
- jobs/runners are not supported yet (planned).
2024-12-02 17:14:50 +00:00
- shell commands are completely removed and will not be returned.
2024-12-26 17:31:04 +00:00
- Themes and branding are not fully supported yet (planned).
2024-11-26 17:21:41 +00:00
- see feature matrix below for more.
2024-12-02 17:14:50 +00:00
- pagination for directory items, so large directories with more than 100,000 items may be slow to load or not load at all.
2024-11-26 17:21:41 +00:00
## About
2024-11-21 00:15:30 +00:00
FileBrowser Quantum provides a file-managing interface within a specified directory
2024-08-04 14:56:18 +00:00
and can be used to upload, delete, preview, rename, and edit your files.
It allows the creation of multiple users and each user can have its
2024-07-30 17:45:27 +00:00
directory.
2024-08-24 22:02:33 +00:00
This repository is a fork of the original [filebrowser](https://github.com/filebrowser/filebrowser)
with a collection of changes that make this program work better in terms of
2024-11-21 00:15:30 +00:00
aesthetics and performance. Improved search, simplified UI
2024-08-24 22:02:33 +00:00
(without removing features) and more secure and up-to-date
2024-07-30 17:45:27 +00:00
build are just a few examples.
2024-11-21 00:15:30 +00:00
FileBrowser Quantum differs significantly from the original.
2024-08-04 14:56:18 +00:00
There are hundreds of thousands of lines changed and they are generally
no longer compatible with each other. This has been intentional -- the
2024-07-30 17:45:27 +00:00
focus of this fork is on a few key principles:
- Simplicity and improved user experience
2024-08-24 22:02:33 +00:00
- Improving performance and faster feedback when making changes.
2024-08-04 14:56:18 +00:00
- Minimize external dependencies and standard library usage.
- Of course -- adding much-needed features.
2023-08-02 13:49:50 +00:00
2024-12-26 17:31:04 +00:00
For more questions, see the [Q&A Readme](./docs/questions.md)
2023-08-02 13:31:04 +00:00
## Look
2024-07-30 17:45:27 +00:00
2024-12-26 17:31:04 +00:00
The UI has a simple three-component navigation system :
2024-07-30 17:45:27 +00:00
1. (Left) The slide-out action panel button
2. (Middle) The powerful search bar.
3. (Right) The view change toggle.
2024-08-03 15:34:12 +00:00
All other functions are moved either into the action menu or popup menus.
2024-08-04 14:56:18 +00:00
If the action does not depend on context, it will exist in the slide-out
action panel. If the action is available based on context, it will show up as
2024-08-03 15:34:12 +00:00
a popup menu.
2024-07-30 17:45:27 +00:00
2023-09-06 21:07:35 +00:00
<p align="center">
2024-11-21 00:15:30 +00:00
<img width="800" src="https://github.com/user-attachments/assets/2be7a6c5-0f95-4d9f-bc05-484ee71246d8" title="Search GIF">
<img width="800" src="https://github.com/user-attachments/assets/f55a6f1f-b930-4399-98b5-94da6e90527a" title="Navigation GIF">
<img width="800" src="https://github.com/user-attachments/assets/75226dc4-9802-46f0-9e3c-e4403d3275da" title="Main Screenshot">
2023-09-06 21:07:35 +00:00
</p>
2023-08-02 13:31:04 +00:00
## Install
Using docker:
2023-09-09 21:59:43 +00:00
1. docker run (no persistent db):
```
2024-12-17 00:01:55 +00:00
docker run -it -v /path/to/folder:/srv -v $(pwd)/config.yaml:/home/filebrowser/config.yaml -p 80:80 gtstef/filebrowser
```
or optionally, as non-root filebrowser user:
```
docker run -u filebrowser -it -v $(pwd)/config.yaml:/home/filebrowser/config.yaml -v /path/to/folder:/srv -p 80:80 gtstef/filebrowser
```
2024-08-24 22:02:33 +00:00
1. docker compose:
- with local storage
```
services:
filebrowser:
volumes:
2023-09-09 21:59:43 +00:00
- '/path/to/folder:/srv' # required (for now not configurable)
2024-12-17 00:01:55 +00:00
# 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'
ports:
2024-02-10 00:13:02 +00:00
- '80:80'
2023-08-02 13:49:50 +00:00
image: gtstef/filebrowser
2024-12-17 00:01:55 +00:00
# optionally run as non-root filebrowser user
#user: filebrowser
2023-09-09 21:59:43 +00:00
restart: always
```
- with network share
```
services:
filebrowser:
volumes:
2023-09-09 21:59:43 +00:00
- 'storage:/srv' # required (for now not configurable)
2024-12-17 00:01:55 +00:00
# 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'
ports:
2024-02-10 00:13:02 +00:00
- '80:80'
2023-08-02 13:49:50 +00:00
image: gtstef/filebrowser
2023-09-09 21:59:43 +00:00
restart: always
volumes:
2023-09-09 21:59:43 +00:00
storage:
driver_opts:
type: cifs
2023-09-09 21:59:43 +00:00
o: "username=admin,password=password,rw" # enter valid info here
2024-11-21 00:15:30 +00:00
device: "//192.168.1.100/share/" # enter valid info here
2023-09-09 21:59:43 +00:00
```
2024-08-04 17:50:35 +00:00
Not using docker (not recommended), download your binary from releases and run with your custom config file:
2024-02-10 00:13:02 +00:00
```
2024-12-17 00:01:55 +00:00
./filebrowser -c <config.yaml or other /path/to/config.yaml>
2024-02-10 00:13:02 +00:00
```
2024-10-07 22:44:53 +00:00
## Command Line Usage
2024-11-28 00:19:43 +00:00
There are very few commands available. There are 3 actions done via the command line:
2024-10-07 22:44:53 +00:00
2024-12-17 00:01:55 +00:00
1. Running the program, as shown in the install step. The only argument used is the config file if you choose to override the default "config.yaml"
2024-10-07 22:44:53 +00:00
2. Checking the version info via `./filebrowser version`
3. Updating the DB, which currently only supports adding users via `./filebrowser set -u username,password [-a] [-s "example/scope"]`
2024-11-21 00:15:30 +00:00
## API Usage
2024-12-26 17:31:04 +00:00
API tokens can be created to perform actions, access file information, and update user settings just like what can be done from the UI. You can create API tokens from the settings page via "API Management" section. This section will only show up if the user has "API" permissions, which can be granted by editing the user in user management.
2024-11-21 00:15:30 +00:00
2024-12-02 17:14:50 +00:00
Regardless of whether a user has API permissions, anyone can visit the swagger page which is found at `/swagger`. This swagger page uses a short-live token (2-hour exp) that the UI uses, but allows for quick access to all the API's and their described usage and requirements:
2024-11-21 00:15:30 +00:00
2024-12-02 17:14:50 +00:00
![image](https://github.com/user-attachments/assets/12abd1f6-21d3-4437-98ed-9b0da6cf2c73)
2024-11-21 00:15:30 +00:00
2024-12-02 17:14:50 +00:00
When using the API outside of swagger, you will need to set the API token as a bearer token authentication type. This means the authorization header will look like `Authorization: Bearer <token>`. For example in Postman:
2024-11-21 00:34:18 +00:00
2024-11-21 00:15:30 +00:00
Successful Request:
2024-11-21 00:34:18 +00:00
<p align="center"><img width="500" alt="image" src="https://github.com/user-attachments/assets/4f18fa8a-8d87-4f40-9dc7-3d4407769b59"></p>
2024-11-21 00:15:30 +00:00
Failed Request
2024-11-21 00:34:18 +00:00
<p align="center"><img width="500" alt="image" src="https://github.com/user-attachments/assets/4da0deae-f93d-4d94-83b1-68806afb343a"></p>
2024-11-21 00:15:30 +00:00
## Configuration
2024-08-03 15:34:12 +00:00
All configuration is now done via a single configuration file:
2024-12-17 00:01:55 +00:00
`config.yaml`, here is an example of minimal [configuration
file](./backend/config.yaml).
2023-09-09 21:59:43 +00:00
2024-10-07 22:44:53 +00:00
View the [Configuration Help Page](./docs/configuration.md) for available
2024-08-03 15:34:12 +00:00
configuration options and other help.
2023-09-09 21:59:43 +00:00
2024-02-10 00:13:02 +00:00
2024-11-21 00:15:30 +00:00
## Migration from the original filebrowser
2024-02-10 00:13:02 +00:00
2024-11-21 00:15:30 +00:00
I would recommend that you start fresh without reusing the database. However,
If you want to migrate your existing database to FileBrowser Quantum,
visit the [migration
2024-10-07 22:44:53 +00:00
readme](./docs/migration.md)
2024-08-24 22:02:33 +00:00
## Comparison Chart
Application Name | <img width="48" src="frontend/public/img/icons/favicon-256x256.png" > Quantum | <img width="48" src="https://github.com/filebrowser/filebrowser/blob/master/frontend/public/img/logo.svg" > Filebrowser | <img width="48" src="https://github.com/mickael-kerjean/filestash/blob/master/public/assets/logo/app_icon.png?raw=true" > Filestash | <img width="48" src="https://avatars.githubusercontent.com/u/19211038?s=200&v=4" > Nextcloud | <img width="48" src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/da/Google_Drive_logo.png/480px-Google_Drive_logo.png" > Google_Drive | <img width="48" src="https://avatars.githubusercontent.com/u/6422152?v=4" > FileRun
--- | --- | --- | --- | --- | --- | --- |
Filesystem support | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
Linux | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
Windows | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
Mac | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
Self hostable | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
Has Stable Release? | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ |
S3 support | ❌ | ❌ | ✅ | ✅ | ❌ | ✅ |
webdav support | ❌ | ❌ | ✅ | ✅ | ❌ | ✅ |
ftp support | ❌ | ❌ | ✅ | ✅ | ❌ | ✅ |
Dedicated docs site? | ❌ | ✅ | ✅ | ✅ | ❌ | ✅ |
Multiple sources at once | ❌ | ❌ | ✅ | ✅ | ❌ | ✅ |
2024-11-28 00:19:43 +00:00
Docker image size | 31 MB | 31 MB | 240 MB (main image) | 250 MB | ❌ | > 2 GB |
2024-08-24 22:02:33 +00:00
Min. Memory Requirements | 128 MB | 128 MB | 128 MB (main image) | 128 MB | ❌ | 4 GB |
has standalone binary | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
price | free | free | free | free tier | free tier | $99+ |
rich media preview | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
2024-11-28 00:19:43 +00:00
upload files from the web? | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
2024-08-24 22:02:33 +00:00
Advanced Search? | ✅ | ❌ | ❌ | configurable | ✅ | ✅ |
Indexed Search? | ✅ | ❌ | ❌ | configurable | ✅ | ✅ |
Content-aware search? | ❌ | ❌ | ❌ | configurable | ✅ | ✅ |
Custom job support | ❌ | ✅ | ❌ | ✅ | ❌ | ✅ |
Multiple users | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Single sign-on support | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
LDAP sign-on support | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
2FA sign-on support | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
2024-11-21 00:15:30 +00:00
Long-live API key support | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ |
API documentation page | ✅ | ❌ | ✅ | ✅ | ❌ | ✅ |
2024-08-24 22:02:33 +00:00
Mobile App | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ |
open source? | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
tags support | ❌ | ❌ | ❌ | ✅ | ❌ | ✅ |
sharable web links? | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Event-based notifications | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
Metrics | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
file space quotas | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ |
text-based files editor | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
office file support | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ |
Themes | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ |
Branding support | ❌ | ✅ | ❌ | ❌ | ❌ | ✅ |
activity log | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
Comments support | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
collaboration on same file | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
trash support | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
Starred/pinned files | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ |
Content preview icons | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ |
Plugins support | ❌ | ❌ | ✅ | ✅ | ❌ | ✅ |
Chromecast support | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
2023-09-10 14:08:21 +00:00
## Roadmap
2024-10-07 22:44:53 +00:00
see [Roadmap Page](./docs/roadmap.md)