complete-computing-environment/paperless.org

4.4 KiB

Paperless-ngx is an open source document management system

This makes it easy to scan, manage, index, and search physical documents. It's available on NixOS, we'll install it here. Paperless was forked in to paperless-ng which was forked in to paperless-ngx.

It does a lot of heavy-lifting to automatically extract dates and tags from scanned documents, and hopefully gets better to use over time as it learns more and more categorization.

https://files.fontkeming.fail/s/A5WzEdb8PocLQoQ/download/Screenshot%202023-11-03%20at%2011-45-47%20Documents%20-%20Paperless-ngx.png https://files.fontkeming.fail/s/YmZE3JLoeDzSrLW/download/Screenshot%202023-11-03%20at%2011-46-02%20Documents%20-%20Paperless-ngx.png

Paperless-ngx on The Wobserver

I wanted to run this on PostgreSQL but the SystemD hardening in the nixpkgs NixOS module locks it down so much that I couldn't get a [::1]:5432 connection from the task queues since it thinks they should operate offline. We could eventually munge that but SQLite is not a toy database and this is a borderline toy app, as long as I'm the only one using it.

{ pkgs, lib, config, ... }:

{
  services.nginx.virtualHosts."scanner.fontkeming.fail" = {
    locations."/" = {
      proxyPass = "http://127.0.0.1:${toString config.services.paperless.port}";
    };
  };

  services.paperless = {
    enable = true;

    dataDir = "/srv/paperless";
    consumptionDir = "/srv/paperless/consume";
    mediaDir = "/srv/paperless/media";

    passwordFile = "/srv/paperless/superuser";

    extraConfig = {
      PAPERLESS_URL = "https://scanner.fontkeming.fail";

      PAPERLESS_USE_X_FORWARD_HOST = true;

      PAPERLESS_TIME_ZONE="America/Los_Angeles";

      PAPERLESS_OCR_LANGUAGE = "eng";
      PAPERLESS_OCR_IMAGE_DPI= 600;
    };
  };

  users.users.brother = {
    extraGroups = [ "paperless" ];
    group = "paperless";
    isNormalUser = true;
  };

  services.vsftpd = {
    enable = true;
    writeEnable = true;

    localUsers = true;
    userlistEnable = true;
    userlist = ["rrix" "brother"];
    extraConfig = ''
      local_umask=007
    '';
  };
  networking.firewall.allowedTCPPorts = [ 21 ];
}

After deploying this, SSH in and run passwd brother to set the FTP account's password; I could stick an initial hashed password in here or use a local DB file instead of UNIX users but didn't bother, maybe when i have to rebuild The Wobserver I will improve this a bit.

Enabling Scan to FTP on My Brother DCP-L2550DW

lol lmao: https://old.reddit.com/r/printers/comments/r1isf8/dcpl2550dw_unable_to_configure_scan_to_ftp/k4vc54p/

I know this was posted a while ago but I found a solution for my L2550DW. I noticed that Scan to FTP and other features were enabled for this model in other regions but not for the US model. I found that if I changed the region I was able to scan to FTP.

The first step is to enable maintenance mode, which for this model is done by pressing Menu -> Start -> Up arrow 4 times. It should display "MAINTENANCE MODE" on the screen now. Press up or down to get to code 74 and press OK.

For me I changed my region code to 0440 (Asia) and it worked fine. There are sites that list all of the available region codes online as well.

After setting the region, navigate to code 99 to exit maintenance mode. The printer will reboot and apply the new settings. Everything will be reset so you'll need to reconfigure your network settings again, but you should have the option to scan to FTP now.

I had to manually reconnect it to my WiFi afterwards, too…

Also when you go in to setup the Scan to FTP feature, make sure you disable Passive Mode, vsftpd in my configuration doesn't like that.