Home Explore Blog Models CI



nixpkgs

nixos/modules/services/web-apps/filesender.md
f9be1afa84eb431ead43eda847a13ac2618d857cf9fe08cf000000030000068f
# FileSender {#module-services-filesender}

[FileSender](https://filesender.org/software/) is a software that makes it easy to send and receive big files.

## Quickstart {#module-services-filesender-quickstart}

FileSender uses [SimpleSAMLphp](https://simplesamlphp.org/) for authentication, which needs to be configured separately.

Minimal working instance of FileSender that uses password-authentication would look like this:

```nix
let
  format = pkgs.formats.php { };
in
{
  networking.firewall.allowedTCPPorts = [
    80
    443
  ];
  services.filesender = {
    enable = true;
    localDomain = "filesender.example.com";
    configureNginx = true;
    database.createLocally = true;

    settings = {
      auth_sp_saml_authentication_source = "default";
      auth_sp_saml_uid_attribute = "uid";
      storage_filesystem_path = "<STORAGE PATH FOR UPLOADED FILES>";
      admin = "admin";
      admin_email = "admin@example.com";
      email_reply_to = "noreply@example.com";
    };
  };
  services.simplesamlphp.filesender = {
    settings = {
      "module.enable".exampleauth = true;
    };
    authSources = {
      admin = [ "core:AdminPassword" ];
      default = format.lib.mkMixedArray [ "exampleauth:UserPass" ] {
        "admin:admin123" = {
          uid = [ "admin" ];
          cn = [ "admin" ];
          mail = [ "admin@example.com" ];
        };
      };
    };
  };
}
```

::: {.warning}
Example above uses hardcoded clear-text password, in production you should use other authentication method like LDAP. You can check supported authentication methods [in SimpleSAMLphp documentation](https://simplesamlphp.org/docs/stable/simplesamlphp-idp.html).
:::

Chunks
2b36b7e1 (1st chunk of `nixos/modules/services/web-apps/filesender.md`)
Title: FileSender Service Configuration and Quickstart
Summary
This document introduces FileSender, a software designed for easily sending and receiving large files, and details its integration with SimpleSAMLphp for authentication. A minimal Nix configuration example is provided for a working FileSender instance that uses password authentication. The configuration includes network settings, local database creation, and various FileSender settings, alongside SimpleSAMLphp configuration with an `exampleauth:UserPass` source for an admin user. A critical warning is issued against using hardcoded clear-text passwords in production, recommending more secure authentication methods like LDAP.