Skip to content

bingud/filemat

Repository files navigation

Contents

What is Filemat?
Features
Requirements
Installation
Configuration
Usage recommendations
Technical details

What is Filemat?

Filemat is a web-based file manager.
It's self-hosted and allows you to manage your local files from anywhere using a web UI.

Similar to other alternatives you might know: Nextcloud Files, FileBrowser.org.

Features

  • User management, roles
  • Granular permissions for users and roles
    • File permissions
    • Application administrative permissions
  • File sharing with public link (optional password)
  • Text file editing, video streaming

Requirements

  • Linux
  • Java 17
  • (Or just Docker)

Installation

You can run the JAR file directly, or use the Docker image (https://hub.docker.com/r/bingud/filemat).
Filemat is currently not available on apt.

- Running the Docker image

See how to deploy with Docker

- Running normally

Make sure your machine has Linux and Java 17 installed.
Download the JAR file from the releases section.

Use this command to run the file with Java (change the filename according to the JAR file you downloaded):
java -jar filemat.jar

Configuration

- Environment variables

Input multiple values by putting a colon in between (/one:/two)

Name Description Default value Example value
FM_HIDDEN_FOLDER_PATHS List of folder paths to fully exclude and block. /root:/home/folder
FM_HIDE_SENSITIVE_FOLDERS Whether to hide sensitive Linux folders (like /root, .ssh) true false
FM_NON_SENSITIVE_FOLDERS List of folders to exclude from sensitive folder list /root:/etc/ssh
FM_FOLLOW_SYMBOLIC_LINKS Whether to follow symbolic links, or show them as normal files false true
FM_FORCE_DELETABLE_FOLDERS List of protected system folders to be made deletable /root:/etc
FM_ALLOW_READ_DATA_FOLDER Allow the application data folder to be accessed false true
FM_ALLOW_WRITE_DATA_FOLDER Allow the application data folder to be modified false true
FM_PRINT_LOGS Whether to print logs to console true false
FM_DEV_MODE Whether Filemat is in dev mode false true

Usage recommendations

  • Run Filemat as non-root
    Create a dedicated linux user for Filemat. Create a group and add the Filemat user. Also add your other users that should keep access to the file.
    Set this group (and group permissions) for all files that Filemat should manage.
    It's possible to run Filemat as root — the most sensitive files are fully blocked by default — but it's discouraged for security reasons.

  • Limit file access
    If running Filemat with Docker, choose specific folders that Filemat should be able to access,
    instead of exposing your entire filesystem through a Docker volume.
    It's easy to configure volumes later with Docker compose.

Technical details

  • Backend: Spring Boot MVC (Kotlin)
  • Frontend: SvelteKit (Svelte 5), statically built and served as static files by the backend
  • Database: SQLite (More details here)

How files are exposed / secured

Files must be explicitly configured to be exposed, so that Filemat can allow users to interact with them.
The application data folder is fully blocked by default, and can only be made accessible using an environment variable.
Symbolic links can be toggled.

In order to make any of these changes through the web UI, a user must have CLI access to the Filemat deployment to authenticate.
Environment variables override these settings.

Contributing

Bug reports and feature requests are welcome in the GitHub Issues.
For larger changes, please open an issue first to discuss what you want to add or change.