ingest: Initial implementation

Bot that monitors a Matrix room for PDF and JPEG files and uploads
them to Paperless-ngx. Supports E2E encrypted attachments via inline
AES keys, historical catchup on startup, exponential backoff retries
with a permanent give-up after max attempts, file format validation
via magic bytes, Uptime Kuma heartbeat monitoring, and email alerts
on errors via SMTP SSL.
This commit is contained in:
Jeena 2026-03-11 13:43:48 +00:00
commit d5a3528cde
7 changed files with 1844 additions and 0 deletions

18
paperless-ingest.service Normal file
View file

@ -0,0 +1,18 @@
[Unit]
Description=Matrix to Paperless-ngx ingest bot
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=matrix-paperless-ingest
WorkingDirectory=/opt/matrix-paperless-ingest
EnvironmentFile=/opt/matrix-paperless-ingest/.env
ExecStart=uv run --no-sync python ingest.py
Restart=on-failure
RestartSec=10
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target