mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-06-17 14:53:00 +00:00
docs: move most docs to main repository (#5141)
This commit is contained in:
parent
c34c0afecf
commit
0cca7d8dc0
1
.github/PULL_REQUEST_TEMPLATE.md
vendored
1
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -11,5 +11,6 @@
|
||||
Before submitting your PR, please indicate which issues are either fixed or closed by this PR. See [GitHub Help: Closing issues using keywords](https://help.github.com/articles/closing-issues-via-commit-messages/).
|
||||
|
||||
- [ ] I am aware the project is currently in maintenance-only mode. See [README](https://github.com/filebrowser/community/blob/master/README.md)
|
||||
- [ ] I am aware that translations MUST be made through [Transifex](https://app.transifex.com/file-browser/file-browser/) and that this PR is NOT a translation update
|
||||
- [ ] I am making a PR against the `master` branch.
|
||||
- [ ] I am sure File Browser can be successfully built. See [builds](https://github.com/filebrowser/community/blob/master/builds.md) and [development](https://github.com/filebrowser/community/blob/master/development.md).
|
||||
|
28
README.md
28
README.md
@ -25,28 +25,28 @@ filebrowser provides a file managing interface within a specified directory and
|
||||
[issues]: https://github.com/filebrowser/filebrowser/issues
|
||||
[discussions]: https://github.com/filebrowser/filebrowser/discussions
|
||||
|
||||
## Demo
|
||||
|
||||
URL: https://demo.filebrowser.org/
|
||||
|
||||
Credentials: `demo`/`demo`
|
||||
|
||||
## Features
|
||||
|
||||
Please refer to our docs at [https://filebrowser.org/features](https://filebrowser.org/features)
|
||||
File Browser is a **create-your-own-cloud-kind** of software where you can install it on a server, direct it to a path and then access your files through a nice web interface. You have many available features!
|
||||
|
||||
| Easy Login System | Sleek Interface | User Management |
|
||||
| :----------------------: | :----------------------: | :----------------------: |
|
||||
|  |  |  |
|
||||
|
||||
|
||||
| File Editing | Custom Commands | Customization |
|
||||
| :----------------------: | :----------------------: | :----------------------: |
|
||||
|  |  |  |
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
For installation instructions please refer to our docs at [https://filebrowser.org/installation](https://filebrowser.org/installation).
|
||||
For information on how to install File Browser, please check [docs/installation.md](./docs/installation.md).
|
||||
|
||||
## Configuration
|
||||
|
||||
[Authentication Method](https://filebrowser.org/configuration/authentication-method) - You can change the way the user authenticates with the filebrowser server
|
||||
|
||||
[Command Runner](https://filebrowser.org/configuration/command-runner) - The command runner is a feature that enables you to execute any shell command you want before or after a certain event.
|
||||
|
||||
[Custom Branding](https://filebrowser.org/configuration/custom-branding) - You can customize your File Browser installation by change its name to any other you want, by adding a global custom style sheet and by using your own logotype if you want.
|
||||
For information on how to configure File Browser, please check [docs/configuration.md](./docs/configuration.md).
|
||||
|
||||
## Contributing
|
||||
|
||||
If you're interested in contributing to this project, our docs are best places to start [https://filebrowser.org/contributing](https://filebrowser.org/contributing).
|
||||
For information on how to contribute to the project, including how translations are managed, please check [docs/contributing.md](./docs/contributing.md).
|
||||
|
BIN
docs/assets/1.jpg
Normal file
BIN
docs/assets/1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 65 KiB |
BIN
docs/assets/2.jpg
Normal file
BIN
docs/assets/2.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 116 KiB |
BIN
docs/assets/3.jpg
Normal file
BIN
docs/assets/3.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 151 KiB |
BIN
docs/assets/4.jpg
Normal file
BIN
docs/assets/4.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 212 KiB |
BIN
docs/assets/5.jpg
Normal file
BIN
docs/assets/5.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 130 KiB |
BIN
docs/assets/6.jpg
Normal file
BIN
docs/assets/6.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
46
docs/code-of-conduct.md
Normal file
46
docs/code-of-conduct.md
Normal file
@ -0,0 +1,46 @@
|
||||
# Code of Conduct
|
||||
|
||||
## Contributor Covenant Code of Conduct
|
||||
|
||||
### Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
### Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
### Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
### Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
### Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hacdias@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
### Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.4, available at [https://contributor-covenant.org/version/1/4](https://contributor-covenant.org/version/1/4).
|
||||
|
148
docs/configuration.md
Normal file
148
docs/configuration.md
Normal file
@ -0,0 +1,148 @@
|
||||
# Configuration
|
||||
|
||||
Most of the configuration can be understood through our Command Line Interface documentation. Although there are some specific topics that we want to cover on this section.
|
||||
|
||||
## Custom Branding
|
||||
|
||||
You are able to customize your File Browser installation by changing its name to any other you want, by adding a global custom style sheet and by using your own logotype if you want. To address this, there are three configuration options that can be changed:
|
||||
|
||||
* **Name:** which is the instance name that will show up on login and signup pages. This won't replace the version message in the sidebar.
|
||||
* **Disable external links:** this will disable any external links (except the ones to this documentation).
|
||||
* **Folder:** is the path to a directory that can contain two items:
|
||||
* **custom.css**, containing the styles you want to apply to your installation.
|
||||
* **img** a directory whose files can replace the [default logotypes](../frontend/public/img) in the application.
|
||||
|
||||
These options can be either set via the CLI interface using the following command:
|
||||
|
||||
```sh
|
||||
filebrowser config set --branding.name "My Name" \
|
||||
--branding.files "/abs/path/to/my/dir" \
|
||||
--branding.disableExternal
|
||||
```
|
||||
Or can be set under 'Branding directory path' in **Settings → Global Settings**.
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> If using Docker then remember to bind this directory, for example as `/home/username/containers/filebrowser/branding:/branding`
|
||||
|
||||
For custom icons to be recognized you need to create `img` and `img/icons` directories and place the svg in the `branding/img` directory:
|
||||
|
||||
```
|
||||
- filebrowser
|
||||
- branding
|
||||
- img
|
||||
- icons
|
||||
- logo.svg
|
||||
- filebrowser.db
|
||||
```
|
||||
|
||||
To replace the favicon you need to place this in the `img/icons` directory but also note that some of the other PNG icon types will be required too (see the default logotypes link above) as the browser will normally use the highest resolution option available (at a minimum the 16x16 and 32x32 options). You can use the [Real Favicon Generator](https://realfavicongenerator.net/) to generate these for you from your base image.
|
||||
|
||||
The icons are cached, to make the new ones appear more quickly open developer tools in your browser, then click on the Application tab, then Storage and then 'Clear Site Data'.
|
||||
|
||||
## 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.
|
||||
|
||||
|
||||
> [!CAUTION]
|
||||
>
|
||||
> Note that you **always** need to set the `--auth.method` flag when changing authentication configurations and that it will completely overwrite your current settings. [This is a known issue.](https://github.com/filebrowser/filebrowser/issues/715)
|
||||
|
||||
### 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
|
||||
|
||||
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**.
|
||||
|
||||
|
||||
## Shell commands
|
||||
|
||||
Within Filebrowser you can toggle the shell (`< >` icon at the top right) and this will open a shell command window at the bottom of the screen.
|
||||
|
||||
**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 Filebrowser 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
|
||||
> ```
|
91
docs/contributing.md
Normal file
91
docs/contributing.md
Normal file
@ -0,0 +1,91 @@
|
||||
# Contributing
|
||||
|
||||
If you're interested in contributing to this project, this is the best place to start. Before contributing to this project, please take a bit of time to read our [Code of Conduct](./code-of-conduct.md). Also, note that this project is open-source and licensed under [Apache License 2.0](../LICENSE).
|
||||
|
||||
## Project Structure
|
||||
|
||||
The backend side of the application is written in [Go](https://golang.org/), while the frontend (located on a subdirectory of the same name) is written in [Vue.js](https://vuejs.org/). Due to the tight coupling required by some features, basic knowledge of both Go and Vue.js is recommended.
|
||||
|
||||
* Learn Go: [https://github.com/golang/go/wiki/Learn](https://github.com/golang/go/wiki/Learn)
|
||||
* Learn Vue.js: [https://vuejs.org/guide/introduction.html](https://vuejs.org/guide/introduction.html)
|
||||
|
||||
We encourage you to use git to manage your fork. To clone the main repository, just run:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/filebrowser/filebrowser
|
||||
```
|
||||
|
||||
## Build
|
||||
|
||||
### Frontend
|
||||
|
||||
We are using [Node.js](https://nodejs.org/en/) on the frontend to manage the build process. The steps to build it are:
|
||||
|
||||
```bash
|
||||
# From the root of the repo, go to frontend/
|
||||
cd frontend
|
||||
|
||||
# Install the dependencies
|
||||
pnpm install
|
||||
|
||||
# Build the frontend
|
||||
pnpm run build
|
||||
```
|
||||
|
||||
This will install the dependencies and build the frontend so you can then embed it into the Go app. Although, if you want to play with it, you'll get bored of building it after every change you do. So, you can run the command below to watch for changes:
|
||||
|
||||
```bash
|
||||
pnpm run dev
|
||||
```
|
||||
|
||||
### Backend
|
||||
|
||||
First of all, you need to download the required dependencies. We are using the built-in `go mod` tool for dependency management. To get the modules, run:
|
||||
|
||||
```bash
|
||||
go mod download
|
||||
```
|
||||
|
||||
The magic of File Browser is that the static assets are bundled into the final binary. For that, we use [Go embed.FS](https://golang.org/pkg/embed/). The files from `frontend/dist` will be embedded during the build process.
|
||||
|
||||
To build File Browser is just like any other Go program:
|
||||
|
||||
```bash
|
||||
go build
|
||||
```
|
||||
|
||||
To create a development build use the "dev" tag, this way the content inside the frontend folder will not be embedded in the binary but will be reloaded at every change:
|
||||
|
||||
```bash
|
||||
go build -tags dev
|
||||
```
|
||||
|
||||
## Translations
|
||||
|
||||
Translations are managed on Transifex, which is an online website where everyone can contribute and translate strings for our project. It automatically syncs with the main language file \(in English\) and,, for you to contribute, you just need to:
|
||||
|
||||
1. Go to our Transifex web page: [app.transifex.com/file-browser/file-browser](https://app.transifex.com/file-browser/file-browser/)
|
||||
2. Click on **Join the project** and pick your language. We'll accept you as soon as possible. If you're language is not on the list, please request it via the interface.
|
||||
|
||||
Translations are automatically pushed to GitHub via an integration.
|
||||
|
||||
## Authentication Provider
|
||||
|
||||
To build a new authentication provider, you need to implement the [Auther interface](https://github.com/filebrowser/filebrowser/blob/master/auth/auth.go), whose method will be called on the login page after the user has submitted their login data.
|
||||
|
||||
```go
|
||||
// Auther is the authentication interface.
|
||||
type Auther interface {
|
||||
// Auth is called to authenticate a request.
|
||||
Auth(r *http.Request, s *users.Storage, root string) (*users.User, error)
|
||||
}
|
||||
```
|
||||
|
||||
After implementing the interface you should:
|
||||
|
||||
1. Add it to [`auth` directory](https://github.com/filebrowser/filebrowser/blob/master/auth).
|
||||
2. Add it to the [configuration parser](https://github.com/filebrowser/filebrowser/blob/master/cmd/config.go) for the CLI.
|
||||
3. Add it to the [`authBackend.Get`](https://github.com/filebrowser/filebrowser/blob/master/storage/bolt/auth.go).
|
||||
|
||||
If you need to add more flags, please update the function `addConfigFlags`.
|
||||
|
85
docs/installation.md
Normal file
85
docs/installation.md
Normal file
@ -0,0 +1,85 @@
|
||||
# Installation
|
||||
|
||||
File Browser is a single binary and can be used as a standalone executable. Although, some might prefer to use it with [Docker](https://www.docker.com) or [Caddy](https://caddyserver.com), which is a fantastic web server that enables HTTPS by default. Its installation is quite straightforward independently on which system you want to use.
|
||||
|
||||
## Quick Setup
|
||||
|
||||
The quickest way for beginners to start using File Browser is by opening your terminal and executing the following commands:
|
||||
|
||||
### 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
|
||||
```
|
||||
|
||||
### Configuring
|
||||
|
||||
Done! It will bootstrap a database in which all the configurations and users are stored. Now, you can see on your command line the address in which your instance is running. You just need to go to that URL and use the following credentials:
|
||||
|
||||
* Username: `admin`
|
||||
* Password: (printed in your console)
|
||||
|
||||
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.
|
||||
|
||||
## Docker
|
||||
|
||||
File Browser is available as two different Docker images, which can be found on [Docker Hub](https://hub.docker.com/r/filebrowser/filebrowser).
|
||||
|
||||
### Alpine
|
||||
|
||||
```sh
|
||||
docker run \
|
||||
-v /path/to/srv:/srv \
|
||||
-v /path/to/filebrowser.db:/database.db \
|
||||
-v /path/to/.filebrowser.json:/.filebrowser.json \
|
||||
-u $(id -u):$(id -g) \
|
||||
-p 8080:80 \
|
||||
filebrowser/filebrowser
|
||||
```
|
||||
|
||||
Where:
|
||||
|
||||
- `/path/to/srv` contains the files root directory for File Browser
|
||||
- `/path/to/filebrowser.db` is the `database.db`
|
||||
- `/path/to/database` is the `.filebrowser.json`
|
||||
|
||||
> [!Warning]
|
||||
>
|
||||
> To use this image correctly, you need to first initialize a File Browser database outside of the Docker image and then start the Docker image with the database mounted. Otherwise, Docker will create an empty directory at the mounting point and fail to start.
|
||||
|
||||
### s6 overlay
|
||||
|
||||
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
|
@ -53,7 +53,7 @@
|
||||
<a
|
||||
class="link"
|
||||
target="_blank"
|
||||
href="https://filebrowser.org/configuration/custom-branding"
|
||||
href="https://github.com/filebrowser/filebrowser/blob/master/docs/configuration.md#custom-branding"
|
||||
>{{ t("settings.documentation") }}</a
|
||||
>
|
||||
</i18n-t>
|
||||
@ -192,7 +192,7 @@
|
||||
<a
|
||||
class="link"
|
||||
target="_blank"
|
||||
href="https://filebrowser.org/configuration/command-runner"
|
||||
href="https://github.com/filebrowser/filebrowser/blob/master/docs/configuration.md#command-runner"
|
||||
>{{ t("settings.documentation") }}</a
|
||||
>
|
||||
</i18n-t>
|
||||
|
@ -6,7 +6,7 @@ filters:
|
||||
translation_files_expression: 'frontend/src/i18n/<lang>.json'
|
||||
|
||||
settings:
|
||||
language_mapping:
|
||||
language_mapping:
|
||||
sv_SE: sv-se
|
||||
cz-CS: cz_cs
|
||||
pt_BR: pt-br
|
||||
|
Loading…
x
Reference in New Issue
Block a user