Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Filebrowser #119

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions docs/services/filebrowser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Filebrowser

[Filebrowser](https://filebrowser.org) is a self-hosted file managing interface.

## Dependencies

This service requires the following other services:

- a [Traefik](traefik.md) reverse-proxy server

## Configuration

To enable this service, add the following configuration to your `vars.yml` file and re-run the [installation](../installing.md) process:

```yaml
########################################################################
# #
# filebrowser #
# #
########################################################################

filebrowser_enabled: true

filebrowser_hostname: filebrowser.example.com

########################################################################
# #
# /filebrowser #
# #
########################################################################
```


## Usage

Head over the host and authenticate using `admin` as the user and password. Once authenticated you can modify the user and password.

Configuration can be tricky but most of the configuration can be set using the UI. Read further if you want further customization.

## Configuration

The configuration is managed in the database file, and although the official documentation allows to mount a JSON file, the persistance is kept in the database. See issue [filebrowser/filebrowser#2745](https://github.com/filebrowser/filebrowser/issues/2745).

This means that in order to make further configuration changes in Filebrowser you can use the CLI commands. But given some limitations of the Filebrowser database engine, this cannot be done while the server is running, see issue [filebrowser/filebrowser#2440](https://github.com/filebrowser/filebrowser/issues/2440).

This means that any configuration modification that you may need, needs to be done offline by using the binary, which can be downloaded from the [releases page](https://github.com/filebrowser/filebrowser/releases).

SSH into your server, download the binary and once extracted, stop the Filebrowser service.

```
sudo systemctl stop mash-filebrowser
```

Modify the configuration using a similar command to the following. For more configuration flags go to the [filebrowser config set](https://filebrowser.org/cli/filebrowser-config-set) page.

```
./filebrowser -d /mash/filebrowser/database.db config set --branding.name "M.A.S.H."
```

Finally, start the Filebrowser service again.

```
sudo systemctl start mash-filebrowser
```
38 changes: 38 additions & 0 deletions templates/group_vars_mash_servers
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ mash_playbook_devture_systemd_service_manager_services_list_auto_itemized:
{{ ({'name': (firezone_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'firezone']} if firezone_enabled else omit) }}
# /role-specific:firezone

# role-specific:filebrowser
- |-
{{ ({'name': (filebrowser_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'filebrowser']} if filebrowser_enabled else omit) }}
# /role-specific:filebrowser

# role-specific:focalboard
- |-
{{ ({'name': (focalboard_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'focalboard']} if focalboard_enabled else omit) }}
Expand Down Expand Up @@ -1685,6 +1690,39 @@ funkwhale_frontend_container_labels_traefik_tls_certResolver: "{{ devture_traefi
# /role-specific:funkwhale


# role-specific:filebrowser
########################################################################
# #
# filebrowser #
# #
########################################################################

filebrowser_enabled: false

filebrowser_identifier: "{{ mash_playbook_service_identifier_prefix }}filebrowser"

filebrowser_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_base_directory_name_prefix }}filebrowser"

filebrowser_uid: "{{ mash_playbook_uid }}"
filebrowser_gid: "{{ mash_playbook_gid }}"

filebrowser_container_additional_networks: |
{{
([mash_playbook_reverse_proxyable_services_additional_network] if mash_playbook_reverse_proxyable_services_additional_network else [])
}}

filebrowser_container_labels_traefik_enabled: "{{ mash_playbook_traefik_labels_enabled }}"
filebrowser_container_labels_traefik_docker_network: "{{ mash_playbook_reverse_proxyable_services_additional_network }}"
filebrowser_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
filebrowser_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"

########################################################################
# #
# /filebrowser #
# #
########################################################################
# /role-specific:filebrowser

# role-specific:gitea
########################################################################
# #
Expand Down
4 changes: 4 additions & 0 deletions templates/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@
version: v1.3.1-0
name: funkwhale
activation_prefix: funkwhale_
- src: git+https://github.com/kinduff/ansible-docker-filebrowser.git
version: v1.1.1
name: filebrowser
activation_prefix: filebrowser_
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-gitea.git
version: v1.21.0-0
name: gitea
Expand Down
4 changes: 4 additions & 0 deletions templates/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@
- role: galaxy/firezone
# /role-specific:firezone

# role-specific:filebrowser
- role: galaxy/filebrowser
# /role-specific:filebrowser

# role-specific:focalboard
- role: galaxy/focalboard
# /role-specific:focalboard
Expand Down