'ss'
152
www/docs/configuration.md
Normal file
@@ -0,0 +1,152 @@
|
||||
# Configuration
|
||||
|
||||
Most of the configuration can be understood through the command line interface documentation. To access it, you need to install File Browser and run `filebrowser --help`. In this page, we cover some specific, more complex, topics.
|
||||
|
||||
## Custom Branding
|
||||
|
||||
You can customize File Browser to use your own branding. This includes the following:
|
||||
|
||||
- **Name**: the name of the instance that shows up on the tab title, login pages, and some other places.
|
||||
- **Disable External Links**: disables all external links, except to the documentation.
|
||||
- **Disable Used Percentage**: disables the disk usage information on the sidebar.
|
||||
- **Branding Folder**: directory which can contain two items:
|
||||
- `custom.css`, containing a global stylesheet to apply to all users.
|
||||
- `img`, a directory which can replace all the [default logotypes](https://github.com/filebrowser/filebrowser/tree/master/frontend/public/img) from the application.
|
||||
|
||||
This can be configured by the administrator user, under **Settings → Global Settings**. You can also update the configuration directly using the CLI:
|
||||
|
||||
```sh
|
||||
filebrowser config set --branding.name "My Name" \
|
||||
--branding.files "/abs/path/to/my/dir" \
|
||||
--branding.disableExternal
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> If you are using Docker, you need to mount a volume with the `branding` directory in order for it to be accessible from within the container.
|
||||
|
||||
### Custom Icons
|
||||
|
||||
To replace the default logotype and favicons, you need to create an `img` directory under the branding directory. The structure of this directory must mimic the one from the [default logotypes](https://github.com/filebrowser/filebrowser/tree/master/frontend/public/img):
|
||||
|
||||
```
|
||||
img/
|
||||
logo.svg
|
||||
icons/
|
||||
favicon.ico
|
||||
favicon.svg
|
||||
(...)
|
||||
```
|
||||
|
||||
Note that there are different versions of the same favicon in multiple sizes. To replace all of them, you need to add versions for all of them. You can use the [Real Favicon Generator](https://realfavicongenerator.net/) to generate these for you from your base image.
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> The icons are cached by the browser, so you may not see your changes immediately. You can address this by clearing your browser's cache.
|
||||
|
||||
## Authentication Method
|
||||
|
||||
Right now, there are three possible authentication methods. Each one of them has its own capabilities and specification. If you are interested in contributing with one more authentication method, please [check the guidelines](contributing.md).
|
||||
|
||||
### JSON Auth (default)
|
||||
|
||||
We call it JSON Authentication but it is just the default authentication method and the one that is provided by default if you don't make any changes. It is set by default, but if you've made changes before you can revert to using JSON auth:
|
||||
|
||||
```sh
|
||||
filebrowser config set --auth.method=json
|
||||
```
|
||||
|
||||
This method can also be extended with **reCAPTCHA** verification during login:
|
||||
|
||||
```sh
|
||||
filebrowser config set --auth.method=json \
|
||||
--recaptcha.key site-key \
|
||||
--recaptcha.secret private-key
|
||||
```
|
||||
|
||||
By default, we use [Google's reCAPTCHA](https://developers.google.com/recaptcha/docs/display) service. If you live in China, or want to use other provider, you can change the host with the following command:
|
||||
|
||||
```sh
|
||||
filebrowser config set --recaptcha.host https://recaptcha.net
|
||||
```
|
||||
|
||||
Where `https://recaptcha.net` is any provider you want.
|
||||
|
||||
### Proxy Header
|
||||
|
||||
If you have a reverse proxy you want to use to login your users, you do it via our `proxy` authentication method. To configure this method, your proxy must send an HTTP header containing the username of the logged in user:
|
||||
|
||||
```sh
|
||||
filebrowser config set --auth.method=proxy --auth.header=X-My-Header
|
||||
```
|
||||
|
||||
Where `X-My-Header` is the HTTP header provided by your proxy with the username.
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> File Browser will blindly trust the provided header. If the proxy can be bypassed, an attacker could simply attach the header and get admin access.
|
||||
|
||||
### No Authentication
|
||||
|
||||
We also provide a no authentication mechanism for users that want to use File Browser privately such in a home network. By setting this authentication method, the user with **id 1** will be used as the default users. Creating more users won't have any effect.
|
||||
|
||||
```sh
|
||||
filebrowser config set --auth.method=noauth
|
||||
```
|
||||
|
||||
## Command Runner
|
||||
|
||||
> [!CAUTION]
|
||||
>
|
||||
> The **command execution** functionality has been disabled for all existent and new installations by default from version v2.33.8 and onwards, due to continuous and known security vulnerabilities. You should only use this feature if you are aware of all of the security risks involved. For more up to date information, consult issue [#5199](https://github.com/filebrowser/filebrowser/issues/5199).
|
||||
|
||||
The command runner is a feature that enables you to execute any shell command you want before or after a certain event. Right now, these are the events:
|
||||
|
||||
* Copy
|
||||
* Rename
|
||||
* Upload
|
||||
* Delete
|
||||
* Save
|
||||
|
||||
Also, during the execution of the commands set for those hooks, there will be some environment variables available to help you perform your commands:
|
||||
|
||||
* `FILE` with the full absolute path to the changed file.
|
||||
* `SCOPE` with the path to user's scope.
|
||||
* `TRIGGER` with the name of the event.
|
||||
* `USERNAME` with the user's username.
|
||||
* `DESTINATION` with the absolute path to the destination. Only used for **copy** and **rename.**
|
||||
|
||||
At this moment, you can edit the commands via the command line interface, using the following commands \(please check the flag `--help` to know more about them\):
|
||||
|
||||
```bash
|
||||
filebrowser cmds add before_copy "echo $FILE"
|
||||
filebrowser cmds rm before_copy 0
|
||||
filebrowser cmds ls
|
||||
```
|
||||
|
||||
Or you can use the web interface to manage them via **Settings** → **Global Settings**.
|
||||
|
||||
## Command Execution
|
||||
|
||||
> [!CAUTION]
|
||||
>
|
||||
> The **command execution** functionality has been disabled for all existent and new installations by default from version v2.33.8 and onwards, due to continuous and known security vulnerabilities. You should only use this feature if you are aware of all of the security risks involved. For more up to date information, consult issue [#5199](https://github.com/filebrowser/filebrowser/issues/5199).
|
||||
|
||||
Within File Browser you can toggle the shell (`< >` icon at the top right) and this will open a shell command window at the bottom of the screen. This functionality can be turned on using the environment variable `FB_DISABLE_EXEC=false` or the flag `--disable-exec=false`.
|
||||
|
||||
By default no commands are available as the command list is empty. To enable commands these need to either be done on a per-user basis (including for the Admin user).
|
||||
|
||||
You can do this by adding them in Settings > User Management > (edit user) > Commands or to *apply to all new users created from that point forward* they can be set in Settings > Global Settings
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> If using a proxy manager then remember to enable websockets support for the File Browser proxy
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> If using Docker and you want to add a new command that is not in the base image then you will need to build a custom Docker image using `filebrowser/filebrowser` as a base image. For example to add 7z:
|
||||
>
|
||||
> ```docker
|
||||
> FROM filebrowser/filebrowser
|
||||
> RUN sudo apt install p7zip-full
|
||||
> ```
|
||||
34
www/docs/deployment.md
Normal file
@@ -0,0 +1,34 @@
|
||||
## Fail2ban
|
||||
|
||||
File Browser does not natively support protection against brute force attacks. Therefore, we suggest using something like [fail2ban](https://github.com/fail2ban/fail2ban), which takes care of that by tracking the logs of your File Browser instance. For more information on how fail2ban works, please refer to their [wiki](https://github.com/fail2ban/fail2ban/wiki).
|
||||
|
||||
### Filter Configuration
|
||||
|
||||
An example filter configuration targeted at matching File Browser's logs.
|
||||
|
||||
```ini
|
||||
[INCLUDES]
|
||||
before = common.conf
|
||||
|
||||
[Definition]
|
||||
datepattern = `^%%Y\/%%m\/%%d %%H:%%M:%%S`
|
||||
failregex = `\/api\/login: 403 <HOST> *`
|
||||
```
|
||||
|
||||
### Jail Configuration
|
||||
|
||||
An example jail configuration. You should fill it with the path of the logs of File Browser, as well as the port where it is running at.
|
||||
|
||||
```ini
|
||||
[filebrowser]
|
||||
|
||||
enabled = true
|
||||
port = [your_port]
|
||||
filter = filebrowser
|
||||
logpath = [your_log_path]
|
||||
maxretry = 10
|
||||
bantime = 10m
|
||||
findtime = 10m
|
||||
banaction = iptables-allports
|
||||
banaction_allports = iptables-allports
|
||||
```
|
||||
59
www/docs/index.md
Normal file
@@ -0,0 +1,59 @@
|
||||
<style>
|
||||
.md-content .md-typeset h1 {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://raw.githubusercontent.com/filebrowser/logo/master/banner.png" width="550"/>
|
||||
</p>
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> This project is currently on **maintenance-only** mode. For more information, read the information on [GitHub](https://github.com/filebrowser/filebrowser#project-status).
|
||||
|
||||

|
||||
|
||||
File Browser provides a file managing interface within a specified directory and it can be used to upload, delete, preview and edit your files. It is a **create-your-own-cloud**-kind of software where you can just install it on your server, direct it to a path and access your files through a nice web interface.
|
||||
|
||||
## Features
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
|
||||
- **Easy Login System**
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
- **Sleek Interface**
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
- **User Management**
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
- **File Editing**
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
- **Custom Commands**
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
- **Customization**
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
</div>
|
||||
93
www/docs/installation.md
Normal file
@@ -0,0 +1,93 @@
|
||||
# Installation
|
||||
|
||||
File Browser is a single binary and can be used as standalone executable. However, it is also available as a [Docker](https://www.docker.com) image. The installation and first time setup is quite straightforward independently of which system you use.
|
||||
|
||||
## Binary
|
||||
|
||||
The quickest and easiest way to install File Browser is to use a package manager, or our download script, which automatically fetches the latest version of File Browser for your platform.
|
||||
|
||||
=== "Brew"
|
||||
|
||||
```sh
|
||||
brew tap filebrowser/tap
|
||||
brew install filebrowser
|
||||
filebrowser -r /path/to/your/files
|
||||
```
|
||||
|
||||
=== "Unix"
|
||||
|
||||
```sh
|
||||
curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
|
||||
filebrowser -r /path/to/your/files
|
||||
```
|
||||
|
||||
=== "Windows"
|
||||
|
||||
```sh
|
||||
iwr -useb https://raw.githubusercontent.com/filebrowser/get/master/get.ps1 | iex
|
||||
filebrowser -r /path/to/your/files
|
||||
```
|
||||
|
||||
File Browser is now up and running. Read some [first boot](#first-boot) for more information.
|
||||
|
||||
## Docker
|
||||
|
||||
File Browser is available as two different Docker images, which can be found on [Docker Hub](https://hub.docker.com/r/filebrowser/filebrowser): a [bare Alpine image](#bare-alpine-image) and an [S6 Overlay image](#s6-overlay-image).
|
||||
|
||||
### Bare Alpine Image
|
||||
|
||||
```sh
|
||||
docker run \
|
||||
-v filebrowser_data:/srv \
|
||||
-v filebrowser_database:/database \
|
||||
-v filebrowser_config:/config \
|
||||
-p 8080:80 \
|
||||
filebrowser/filebrowser
|
||||
```
|
||||
|
||||
Where `filebrowser_data`, `filebrowser_database` and `filebrowser_config` are Docker [volumes](https://docs.docker.com/engine/storage/volumes/), where the data, database and configuration will be stored, respectively. The default configuration and database will be automatically initialized.
|
||||
|
||||
The default user that runs File Browser inside the container has PID 1000 and GID 1000. If, for one reason or another, you want to run the Docker container with a different user, please consult Docker's [user documentation](https://docs.docker.com/engine/containers/run/#user).
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> When using [bind mounts](https://docs.docker.com/engine/storage/bind-mounts/), that is, when you mount a path on the host in the container, you must manually ensure that they have the correct **permissions**. Docker does not do this automatically for you. The host directories must be readable and writable by the user running inside the container. You can use the [`chown`](https://linux.die.net/man/1/chown) command to change the owner of those paths.
|
||||
|
||||
File Browser is now up and running. Read the ["First Boot"](#first-boot) section for more information.
|
||||
|
||||
### S6 Overlay Image
|
||||
|
||||
The `s6` image is based on LinuxServer and leverages the [s6-overlay](https://github.com/just-containers/s6-overlay) system for a standard, highly customizable image. It should be used as follows:
|
||||
|
||||
```shell
|
||||
docker run \
|
||||
-v /path/to/srv:/srv \
|
||||
-v /path/to/database:/database \
|
||||
-v /path/to/config:/config \
|
||||
-e PUID=$(id -u) \
|
||||
-e PGID=$(id -g) \
|
||||
-p 8080:80 \
|
||||
filebrowser/filebrowser:s6
|
||||
```
|
||||
|
||||
Where:
|
||||
|
||||
- `/path/to/srv` contains the files root directory for File Browser
|
||||
- `/path/to/config` contains a `settings.json` file
|
||||
- `/path/to/database` contains a `filebrowser.db` file
|
||||
|
||||
Both `settings.json` and `filebrowser.db` will automatically be initialized if they don't exist.
|
||||
|
||||
File Browser is now up and running. Read the ["First Boot"](#first-boot) section for more information.
|
||||
|
||||
## First Boot
|
||||
|
||||
Your instance is now up and running. File Browser will automatically bootstrap a database, in which the configuration and the users are stored. You can find the address in which your instance is running, as well as the randomly generated password for the user `admin`, in the console logs.
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> The automatically generated password for the user `admin` is only displayed once. If you fail to remember it, you will need to manually delete the database and start File Browser again.
|
||||
|
||||
Although this is the fastest way to bootstrap an instance, we recommend you to take a look at other possible options, by checking `config init --help` and `config set --help`, to make the installation as safe and customized as it can be.
|
||||
|
||||
If your goal is to have a public-facing deployment, we recommend taking a look at the [deployment](deployment.md) page for more information on how you can secure your installation.
|
||||
BIN
www/docs/static/1.jpg
vendored
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
www/docs/static/2.jpg
vendored
Normal file
|
After Width: | Height: | Size: 116 KiB |
BIN
www/docs/static/3.jpg
vendored
Normal file
|
After Width: | Height: | Size: 151 KiB |
BIN
www/docs/static/4.jpg
vendored
Normal file
|
After Width: | Height: | Size: 212 KiB |
BIN
www/docs/static/5.jpg
vendored
Normal file
|
After Width: | Height: | Size: 130 KiB |
BIN
www/docs/static/6.jpg
vendored
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
www/docs/static/example.gif
vendored
Normal file
|
After Width: | Height: | Size: 477 KiB |
BIN
www/docs/static/favicon.png
vendored
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
www/docs/static/logo.png
vendored
Normal file
|
After Width: | Height: | Size: 27 KiB |