The paperless-ngx docs provide instructions for migrating from one instance to another, but there are some steps missing for NixOS setups.

manage.py

The management script is available as a symlink on NixOS: /var/lib/paperless/paperless-manage, e.g. /var/lib/paperless/paperless-manage, and it is used to invoke the import and export tools.

export

I ran this as root but it’s probably best to run as the paperless user if you can.

sudo /var/lib/paperless/paperless-manage document_exporter paperless_export_2025-jan-13/

import

I copied the data over to my new host, and then ran the importer:

sudo systemctl stop paperless.slice
sudo /var/lib/paperless/paperless-manage document_importer paperless_export_2025-jan-13/
sudo chown -R paperless:paperless /var/lib/paperless # fix ownership

I found that after running stop paperless.slice I wasn’t able to undo that with start paperless.slice. It didn’t bring up all of the services. I don’t claim to understand systemd I just hoped it would work.