Warning
There is now a port of Paperless-ngx for FreeBSD: https://www.freshports.org/deskutils/py-paperless-ngx/
It supercedes this port, both in quality and functionality.
Although it is only available for FreeBSD 14 and 15, it is possible to get it installed and running on FreeBSD 13: https://tinsuke.wordpress.com/2024/04/20/how-to-install-py-paperless-ngx-on-freebsd-13/
Work on this port will stop.
The port will install paperless-ngx on FreeBSD.
- Download a pre-packaged .pkg file from https://github.com/tinsukE/paperless-ngx-freebsd-port/releases.
- Install it with
pkg install file
Install directly from this repo's code:
git clone https://github.com/tinsukE/paperless-ngx-freebsd-port
cd paperless-ngx-freebsd-port
make install
- Configure the service to start automatically:
sysrc paperless_enable=YES
- Create a user:
/usr/local/bin/paperless_manage createsuperuser
- Optional: configure Paperless-ngx by editing
/opt/paperless/paperless.conf
- Start it:
service paperless start
These are instructions for myself, but feel free to create a PR if I have been slacking in updating the port.
- Run
make clean
to start off with a clean state - Update the value of
DISTVERSION
in Makefile - Run
make makesum
to update distinfo - Run
make extract
to have the new release extracted toWRKDIR
(defaults to work) Update the versions of the(currentlynumpy
,scikit-learn
andscipy
ports in Makefile according to the new values in requirements.txtpaperless-ngx
uses versions higher than the ones available as FreeBSD ports, so skip this)- Update all files/patch-* files. As per the Porter's Handbook instructions:
- For each file file to patch:
- Copy the file to be patched:
cp file file.orig
- Edit file replaying the updated changes on the existing files/patch-file
- Copy the file to be patched:
- Run
make makepatch
to generate updated patch files in the files directory
- For each file file to patch:
- Run
make stage
- Update pkg-plist:
- Run
make makeplist > newplist
- In newplist:
- Replace all occurrences of
%%USER%%
withpaperless
- Delete the first line (
/you/have/to/check/what/makeplist/gives/you
) - Delete the lines for sample files (
*.sample
) - Delete the lines for rc scripts (
etc/rc.d/*
) - Copy the block of lines that start with a
@
at the begginning of pkg-plist to the beginning of newplist
- Replace all occurrences of
- Replace pkg-plist with newplist
- Run
- Install files to
/opt/paperless
- Use gunicorn instead of the development HTTP server
- Update to v2
- Make web host and port configurable
- Make consumption, data and media paths configurable
- Make NLTK optional?
- Install jbig2enc encoder
- Use inotify instead of polling the consumption folder: inotify_simple PR and make it work
- Set
PAPERLESS_SECRET_KEY
to a random sequence of characters. It's used for authentication. Failure to do so allows third parties to forge authentication credentials. - Set
PAPERLESS_OCR_LANGUAGE
to the language most of your documents are written in - Set
PAPERLESS_TIME_ZONE
to your local time zone.