nexpaper

nexpaper

Docker app from DerKezorm's Repository

Paperless-ngx for the home, the simple version.

Overview
Paperless-ngx for the home, the simple version. nexpaper is a light filing cabinet for the papers of a household or a small firm, on your own server: upload, find, done. One container, no Redis, no Celery and no Postgres, and an import that takes over what you already have in Paperless-ngx. Everything new waits in an inbox with the fields filled in, whether it came from the browser, a photo taken on the phone, a scanner's folder, a mailbox or Paperless, and one click files it. Scans are read and become searchable PDFs while the original stays exactly as it came, with its checksum. The search understands parts of words and filters. Pages can be turned, deleted, ordered, joined and split, and every change is a new version. Everybody has a vault of their own, the operator makes shared ones for the household or the business, and single documents can be shared with a person or, for somebody without an account, as a link that ends. For small firms, e-invoices (ZUGFeRD, Factur-X, XRechnung) are read from their data, a history shows who changed what, and an export for the tax adviser is a ZIP with the PDFs and a list. A second factor is required from the start, passkeys are supported, and accounts come by invitation or through OpenID Connect (one-button setup for authentik). An open API serves the apps that will come. nexpaper is an independent project and not affiliated with Paperless-ngx.

nexpaper

Paperless-ngx for the home: the simple version. A light filing cabinet for the papers of a household or a small firm, on your own server. Upload, find, done. One container, no Redis, no Celery, no Postgres, and an import that takes over what you already have in Paperless-ngx.

  • One inbox for everything. Photos from the phone, files from the browser, a scanner's folder, a mailbox, an import from Paperless: all of it waits in the inbox with the fields filled in, and one click files it.
  • Vaults. Everybody has a vault of their own, and the operator makes shared ones ("Household", "Business"). Rights are read, edit or manage, given in the same "Share" dialog as in every nex app (everybody on the server with their picture, one tap shares); single documents can also be shared with a person or, for somebody without an account, as a link that ends.
  • Text recognition and search. Scans become searchable PDFs; the original stays exactly as it came, with its checksum. The search understands parts of words and filters (kind:invoice amount:>100).
  • Tools for pages. Turn, delete and order pages, join documents, split a stack at blank separator sheets. Every change is a new version; nothing is overwritten.
  • What goes together. nexpaper reads the invoice, order and delivery note numbers of a paper and proposes the delivery note that goes with an invoice. Connected documents show each other, and a link to the outside or the export can take them along.
  • Small helpers. The archive adds up the amounts of what it shows and changes several documents at once, a search can be saved to the side bar, a transfer code fills in the banking app, a note on a sender keeps the customer number at hand, and a PDF with a password is opened once and read like any other.
  • Deadlines and reminders. What has to be paid, cancelled or claimed under a warranty stands on one page, with the last day to cancel worked out from the notice period. nexpaper reminds the people who may edit the vault, by push, by mail or in a weekly overview, each reminder once.
  • Connect nex apps. In one click nexpaper connects with nextime (your deadlines in the calendar), nexmail (an attachment straight into the inbox) and nextasks (a task for a document). Each app may only do what the connection is for, and only in the vaults you choose.
  • Keeping times. A kind can say how many years its documents are kept. When the time is over the document shows up in the archive under "May go". Nothing is deleted by itself; a kind can ask nexpaper to put its expired documents in the trash once a day, at night (off from the start, they stay there for 30 days).
  • For small firms. E-invoices (ZUGFeRD, Factur-X, XRechnung) are read from their data, there is a history of who changed what, and an export for the tax adviser (a ZIP with the PDFs and a list). No claim of GoBD compliance.
  • No Redis, no Celery, no Postgres. One container, SQLite, plain readable files on the disk.
  • Best kept at home. nexpaper is meant for your own network; from on the way, reach it through a VPN. It still comes with a second factor from the start, passkeys, sign-in through your own provider and a checklist in the settings. Everything the web app does goes through an open API (/api/v1) for your own tools, and AI programs can work with it over MCP.

nexpaper is one of the nex apps and looks like them: light paper and kraft by day, a dark desk by night. It speaks German, English and French; the operator adds more languages as JSON files, and whatever a file leaves out appears in English.

1.0.0. Back up /data like any other data of yours (the documents are plain files in /data/dokumente) and read what a backup holds and what it does not (below). nexpaper is an independent project and not affiliated with Paperless-ngx; it only reads from a Paperless-ngx server when you import.

The archive: documents by month, with sender, kind and amount

The inbox with proposals A document with its fields, notes and history
Vaults and who may do what The quick upload on a phone

The pictures show a made-up household.

Start

services:
  nexpaper:
    image: ghcr.io/derkezorm/nexpaper:latest
    container_name: nexpaper
    restart: unless-stopped
    ports:
      - "127.0.0.1:8560:8000"
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL
    cap_add:
      - CHOWN
      - DAC_READ_SEARCH
      - SETUID
      - SETGID
    volumes:
      - ./data:/data
    environment:
      PUID: 1000
      PGID: 1000
      TZ: Europe/Berlin
docker compose up -d

The container may not gain rights later and keeps only what its start needs: setting the owner of /data (CHOWN, DAC_READ_SEARCH) and dropping from root to the user nexpaper (SETUID, SETGID). nexpaper itself runs as that user, with none.

Built from source instead: clone this repository, use docker-compose.yml as it is (it has build: .) and run docker compose up -d --build. The file has every option explained.

Open http://127.0.0.1:8560 on that machine (the port listens only there; the comment in docker-compose.yml says how to change that). The first account you create there is the operator. It needs the setup code from the log, so that nobody who reaches a fresh instance first can take it:

docker logs nexpaper

shows the code, new at every start until nexpaper is set up. To choose it yourself, set NEXPAPER_SETUP_TOKEN (at least 16 characters; a shorter one is passed over and the log says so). The setup asks a display name, a username, an address (optional) and the password twice; then the operator invites the others by link. People sign in with their username or their address. Everything personal is in the settings under "My account" for everybody; "Server" there is the operator's and holds the server.

The operator manages the accounts under Settings › Server › Accounts: invitations, roles (there can be several operators), a storage limit per account (Manage; the limit every new account starts with is under Settings › Server › General › Limits, none from the start) and deleting. A deleted account can be brought back for 30 days; only then are its documents handed on to the person chosen when it was deleted. When an account's storage is full, uploads are refused, while files of the intake folder and mails in the mailbox wait and come in once there is room.

Reaching nexpaper from outside

Your papers are best kept in your own network. To reach nexpaper on the way, a VPN into your home network (WireGuard, Tailscale, NetBird and the like) is the safer choice than opening a port. If you open it to the internet anyway, do it with care and at least this:

  1. Set it up first, from your own network, with the setup code from the log. Only then forward a port.
  2. https at a reverse proxy, and nexpaper reachable only through it: publish the port as 127.0.0.1:8560:8000 when the proxy runs on the same host, or keep both on a Docker network without a published port. Send HSTS from the proxy.
  3. Tell nexpaper about the proxy: NEXPAPER_PUBLIC_URL (the address people use), NEXPAPER_TRUSTED_PROXIES (the proxy's address or network; without it every sign-in seems to come from the proxy and the brake against guessing cannot tell people apart) and NEXPAPER_COOKIE_SECURE: "on".
  4. Require a second factor (Settings › Server › Sign-in): right after the password every account then sets one up (a code from an app, or a passkey) and keeps the recovery codes. A new installation does not require it; an installation updated from 1.12.0 keeps the setting it had. If a lost phone ever locks everybody out, NEXPAPER_SECOND_FACTOR_OFF=1 switches the second factor off until it is removed again (the pages say so plainly).
  5. Look at "Ready for the internet?" (Settings › Server › Sign-in). It checks the points above for itself: https, the second factor, your own account with one, the brake, the server secrets, the cookies, the proxy and the backups.
  6. Backups somewhere else, as carefully as the data folder. A backup holds every account and the server's secrets (secret.key) but not the documents: those are plain files in /data/dokumente and belong in the backup your server makes anyway. Try a restore with "Check" now and then.
  7. Leave the switches closed that you do not need: API keys, upload requests and the AI are off until the operator opens them. Pin a version instead of latest, update on purpose, back up before. An upload request is the one way in for somebody without an account that takes files: whoever holds its address can put up to its number of files into one person's inbox, nothing else (see Inputs, and SECURITY.md).
  8. Nobody, the operator included, sets a password for somebody else. Whoever forgot theirs gets a link to set a new one: the operator sends it (Settings › Server › Accounts), or, where a mail server and the public address are set, the person asks for it on the sign-in page. The link works once and for 24 hours. An operator without a mail server who forgot their own password makes one in the container (below).
  9. Passkeys work under the public https address, or on localhost.

Optionally keep the operator's settings at home: NEXPAPER_OPERATOR_NETWORKS: "192.168.0.0/16" refuses them from anywhere else (behind a proxy only together with NEXPAPER_TRUSTED_PROXIES).

Sign-in with a provider

Besides the password, people can sign in through any provider that speaks OpenID Connect: authentik, Microsoft Entra ID, Keycloak, Authelia, Pocket ID. Settings › Server › Sign-in has, after "Ready for the internet?", three cards: the sign-in itself (password sign-in, the public address, the second factor), the list of sign-in providers (each gets a button on the sign-in page, in the order of the list), and authentik in one step.

  • authentik in one step: give the address of authentik and an API token that may create applications; nexpaper sets up provider and application there and enters them here. The token is used for that run only and never stored. Who would rather not hand out a token downloads the blueprint instead and enters client ID and secret by hand.
  • By hand: "Add a provider" asks for the name on the button, a short name (part of the redirect address https://paper.example.com/api/v1/oidc/<short name>/callback, fixed once made), the issuer, client ID and secret. For Microsoft Entra ID the issuer is https://login.microsoftonline.com/<tenant>/v2.0, or common or organizations for several tenants.
  • Who comes in: an identity is known by its provider and its subject only, never by its mail address. An account links itself on its own page (Settings › My account › Security, with its password); new people come in by invitation, or, where the operator switches "New people get an account" on for a provider, as members. Everybody gets a vault of their own.
  • Addresses from a provider are shown and can be taken, but they are never confirmed by that alone: a mail to the intake counts only for an address the person confirmed by the link nexpaper sends. An address 1.0.1 took from the provider as confirmed waits for that link once after the update (Settings › My account › Profile); it needs the mail server.
  • The second factor: "The provider checks the second factor itself" is on for a new provider. Off, whoever has a second factor in nexpaper is asked for its code after the provider. "Require a second factor" is for signing in with a password: an account without a password, and whoever comes in through a provider whose entry has "The provider checks the second factor itself" on, is not made to set one up (a change from 1.0.1). Paired devices and API keys of an account with a password and no second factor of its own wait until it sets one up, also when it signs in through a provider that checks one.
  • Password sign-in can go off once a provider is active; the operator can always sign in with the password.

Behind a reverse proxy the redirect address is the public address (set it in Settings › Server › Sign-in, or the authentik card offers the address the browser uses). For the authentik card and the Secure flag to see https, name the proxy in NEXPAPER_TRUSTED_PROXIES: nexpaper then believes its X-Forwarded-For and its X-Forwarded-Proto (the last value the proxy wrote), and nobody else's.

Coming from 1.0.1: the one provider of 1.0.1 becomes the entry oidc with every account linked as before, after a backup, and keeps its redirect address /api/v1/oidc/callback, so nothing changes at the provider. Whether it checks the second factor comes from 1.0.1's switch. Going back to 1.0.1 works for this version: 1.0.1 finds its settings as the entry oidc stands while the entry is on and checks the second factor itself (its switch on), otherwise without a client, so that 1.0.1 never lets anybody in with less than the entry asks. What 1.0.1 changes there is taken over at the next start of the newer version.

Forgot your password, and no mail server

Whoever can run a command in the container holds the database and the secrets anyway, so a link made there gives nothing away. It is the same link the operator makes in Settings › Server › Accounts: it works once and for one day (--days 7 or --days 30 for longer), a new one replaces the one before, and using it ends every browser session and lifts a lock after failed sign-ins; paired devices, API keys and passkeys stay, and the account page lists them at the next sign-in with "Disconnect all". A link asked for with "Forgot your password?" holds one hour. The second factor stays: sign in with the new password, then with the code from your app, a passkey or a recovery code. An account that signs in only through a provider gets a password this way and becomes an account with a password, as with the link the operator sends.

docker exec -it -u nexpaper nexpaper python -m app.reset_link <account>

<account> is the username or the address of the account.

-u nexpaper runs it as the user the server runs as (with the ids of PUID and PGID); as root it refuses, because a file root makes in /data the server could not open any more. Where the compose file starts the container with a user: of its own, give that instead. Without an account name it lists the accounts. It prints the whole link when the public address is set (Settings › Server › Sign-in, or NEXPAPER_PUBLIC_URL), otherwise the path /reset/... to open at the address you use. An unknown or blocked account gets no link and a message, and the command ends with an error. The log notes that a link was made this way, and for whom, never the link itself.

Where things are stored

Everything lives in /data:

Where What
nexpaper.db The SQLite database: accounts, settings, the filing, the recognised text and the search index.
secret.key The server's own secret (the secrets of the sign-in providers, the mail password, the AI key and the like).
backups/, logs/, locales/ Backups, the log, extra languages as JSON files.
dokumente/ The documents themselves, as readable files (below). Readable without nexpaper.
cache/, uploads/, exports/ Pictures of pages (trimmed to a size you set), uploads in progress, ZIPs for the tax adviser.
eingang/ The intake folder, when it is switched on (Settings › Server › Inputs): one subfolder per person.

The documents lie as <vault>/<year>/<sender>/<date> <kind>.<ending>, the original as it came, for example Household/2026/City Utilities/2026-10-07 Invoice.pdf. Beside it lie the searchable copy (2026-10-07 Invoice (searchable).pdf, also the PDF made from a photo) and the older versions (2026-10-07 Invoice (version 1).pdf); two documents with the same name get (2). The title is not part of the name (the export for the tax adviser names its files by date and title). Where a part is missing, the folders and files on the disk have English names whatever the language of the interface: undated for the year and the date, no sender, and Document for the kind. The interface shows them translated; the names on the disk stay as they are.

Mount /data from a local disk, never from an SMB or NFS share: SQLite's locking does not work reliably over network filesystems. There is no per-person encryption: it would stop search and make the files unreadable without nexpaper. A personal vault means only that nexpaper shows it to nobody else; protecting the disk is the operator's business. When the operator deletes an account, they decide where the documents of its personal vault go, and may give them to themselves or to a vault they are in: the dialog says so, and every document's history notes the takeover and by whom.

Backup

A backup is one ZIP file with the database, the settings and secret.key, made while nexpaper runs (through SQLite's backup function, never as a file copy). It holds no documents: they lie as plain files in /data/dokumente and belong in the backup your server makes anyway (Hyper Backup, restic, snapshots). It holds no search index either: that is the largest part of the database, and it is built anew from the recognised text after a restore (the search works while that goes on, with more and more hits). Together with secret.key it opens the mail and AI credentials, the addresses of open links and the kept PDF passwords, so keep backups protected.

Settings › Server › Storage and backups: automatic every night, every week or every month at a time of day, with a number to keep, "Back up now", upload, download, check and restore. The trial run ("Check", and again in the dialog before a restore) starts the database of the archive the way the server would, on a scratch copy, and says whether the archive is whole (a damaged one is told as damaged) and can be started, which version made it (one from a newer nexpaper is refused), how many documents it knows, which of their files are missing on the disk or have another checksum, which documents of today the restore would remove (their files stay in the folder), and which devices, keys and links it would bring back to life: a backup does not know what you withdrew after it was made. Download, delete and restore ask for the operator's password again. A restore keeps the state before it as a backup; if it cannot be put in place at the restart, the staged files are put aside, you are told, and the server goes on with the database it had. Moving to a new server: download a backup, upload it on the new one, check it, restore it, and copy the documents folder along.

Checking the files, and the storage card

Every file has a checksum. Once a week, and on a click (Settings › Server › Storage and backups › Check files), nexpaper reads them all in small portions with pauses and compares. A document whose file is missing or changed gets a warning sign in the archive, the inbox and on its page, a line in its history, and the operator a notice. The sign goes at the next check, or at once when the operator asks for that one document on its page, when a new version of it was read, when a version that could not be read is put away, or when the document comes back from the trash. The storage card beside it shows what the database (and of it the search index), the documents, the cache, the exports and the backups take, and how much room is left. It warns, here and in the log at the start, when the database lies on a network share.

Updating

With an image: docker compose pull && docker compose up -d. Built from source: pull the new code and run docker compose up -d --build. nexpaper adds what the database lacks at the start and makes a backup first; nothing needs doing by hand. The way back is under Settings › Server › Storage and backups.

Going back from 1.1.0 to 1.0.1: there, the sign-in through the provider works only if its entry had "The provider checks the second factor itself" on; otherwise only the password does. Coming up to 1.1.0 again brings everything back.

From 1.4.0 on there is no way back to an older version. 1.4.0 changes the database (schema 11 to 13: deadlines, keeping times, reminders; 1.4.1 adds the switch of the kinds, schema 14), and an older nexpaper does not open it: it stops at the start with a message that the database is newer. That includes going back to 1.1.0 or 1.0.1, which was possible until 1.3.0. Make a backup before you update (Settings › Server › Storage and backups; nexpaper also makes one itself before it changes the database). The only way back is to restore that backup with the older version, and what was entered after the update is lost with it. The first start after the update sends no wave of reminders for deadlines that were entered before.

1.5.0 changes the database again (schema 14 to 20: what goes together, saved searches, pins and notes, links with more than one document, remembered PDF passwords, upload requests), so the same holds: back up first, and the way back is only that backup with the older version. After the update nexpaper reads the numbers of the documents that are already there once, in the background; nothing needs doing by hand.

Environment

Variable Default Meaning
NEXPAPER_DATA_DIR /data Database, logs, backups, secrets and the languages
NEXPAPER_LOCALES_DIR <data>/locales Extra languages, one JSON file each
NEXPAPER_SECRET_KEY made on first start Protects server-side secrets; when set, it wins over secret.key
NEXPAPER_PUBLIC_URL from the request The address people use, for invitation links and the redirect address of the sign-in providers. The setting in the interface wins
NEXPAPER_TRUSTED_PROXIES none Addresses or networks of reverse proxies whose X-Forwarded-For and X-Forwarded-Proto are believed, comma separated
NEXPAPER_SETUP_TOKEN made at start The code the first account needs (at least 16 characters)
NEXPAPER_SECOND_FACTOR_OFF none 1 switches the second factor off for an emergency (everybody signs in with the password alone while it is set)
NEXPAPER_OPERATOR_NETWORKS none Networks the operator's settings may be changed from, comma separated
NEXPAPER_SESSION_DAYS 30 A session of "stay signed in on this device" ends after this many days without use
NEXPAPER_COOKIE_SECURE auto on, off or auto (from the request, or X-Forwarded-Proto of a trusted proxy)
NEXPAPER_COOKIE_SUFFIX none Appended to the cookie names; keeps two instances on one host apart
NEXPAPER_LOG_LEVEL stored setting quiet, normal, detailed or trace; overrides the setting
NEXPAPER_DECODE_SLOTS 1 How many pictures are unpacked at the same moment (each takes some 150 MB while open)
NEXPAPER_UPDATE_URL GitHub Where the update check asks for the newest release
NEXPAPER_PUSH_RELAY the nexapps relay The relay that hands notifications to Apple for the iPhone app. Only sealed messages and the device's ticket go there. Empty: nothing goes out
NEXPAPER_ARGON2_TIME, NEXPAPER_ARGON2_MEMORY_KIB, NEXPAPER_ARGON2_PARALLELISM 3, 65536, 2 Cost of the password hash; only the tests lower it
NEXPAPER_FRONTEND_DIST /app/static Where the built interface lies (set by the image)
NEXPAPER_DISABLE_BACKGROUND false Switches off the background jobs (the log, backups, tidying up, the queue, checking the files, the inputs); for tests. The update check is none of them: it asks only when somebody opens the about page and the last answer is older than a day
NEXPAPER_PORT 8000 The port inside the container; only for host networking
PUID, PGID 1000 Owner of the files in the data directory
TZ The time zone of the container's log. People's own time zones come from their browsers

AI

The AI is off until the operator chooses a service, for everybody (Settings › Server › AI provider): none, a local model in your own network (Ollama or anything that speaks /v1/chat/completions), a service on the internet that speaks the same, or one that speaks the Messages API. Every person can switch it off for their account (Settings › My account › AI). It proposes title, sender, kind, date and amount for a new document where nothing surer (an e-invoice, a rule, the same sender as last time, the text itself) knew them; a proposal is only a proposal, and the inbox says where each field came from.

  • A local model is asked not to think (reasoning_effort: "none"): a thinking model such as Qwen3 or DeepSeek-R1 would otherwise spend the short answer on its thoughts and give back nothing. A local server that does not know the field is asked once more without it.
  • A local service must lie in your own network and a service on the internet must be reached over https: an address that points elsewhere is refused, when it is saved and at every request. The key of the service is sealed and never shown again.
  • What goes out is the text of the first two pages and the list of kinds the document can have, nothing else. Documents in personal vaults stay away from it unless the operator lets them in.
  • The operator sets a limit of documents per day for the whole server (200 from the start, 0 for none), so that a large delivery does not send every document, one request each, to a service that is paid for by the request. When it is reached, the documents keep what the rules and the text gave them until the next day.
  • The operator can add own instructions (at most 2000 characters), for example how titles should be named. They go with the fixed rules and change nothing in which fields are filled and how the answer is checked.
  • Instead of one service for everybody, the operator can let each account set up its own (Settings › Server › AI provider, "Each account itself"); every person then enters theirs under Settings › My account › AI. Hosts in your own network are open to those only where the operator names them.
  • What went out (Settings › My account › AI) lists what nexpaper sent to the AI for you in the last 14 days.

Filing

New documents wait in the inbox with proposals. Next to title, sender, kind, date and amount, every document has a reference: one free field for the number you file by (a patient file, a case or a customer number). Each vault names the field itself or hides it; az: / ref: finds it in the search, and GET /api/v1/documents?reference=… lists every document with one. Rules (a vault's own, made by its managers, and the operator's for the whole server) fill in a vault, a kind, a tag, a sender, the reference or a title ({ref} puts the reference into it) when conditions hold, and may check the reference (is, contains, is empty); their words are compared as plain text, never as patterns. A rule of the operator's for the whole server does not reach into the personal vault of anybody else. A new or changed rule can be applied again to what already waits in the inbox ("Apply rules", for the whole inbox or the documents selected, and offered right after "Remember as a rule"): nexpaper first shows every document whose proposals would change, each field before and after, moves to another vault first, and changes only the ones left ticked. It uses the text read when the document arrived, asks the AI nothing new, and keeps what a person entered. Kinds come in two sorts: the ones that come with nexpaper and the operator keeps, and the ones a vault makes for itself (anybody who may edit it, with "+ New kind" at the end of the choice of kinds; a name that sounds like an existing one is shown first). A document that moves takes its kind along by name. E-invoices (ZUGFeRD, Factur-X, XRechnung) are read from their data, with limits on the size and the shape of the XML.

Everything that deletes or locks out asks first, and says whether it can be undone (a document in the trash stays 30 days and can be brought back; one deleted for good, a key, a link or a device that is locked out cannot).

What goes together

A delivery note belongs to its invoice, a reminder to both. Under the notes of a document the section Goes with lists what you connected: "Connect" finds the other document by its title, its sender or a word from it, and from then on both show each other. You need to be able to edit both; "Disconnect" takes a connection back and deletes nothing.

nexpaper also reads the numbers a paper carries, from its text and from the data of an e-invoice: invoice, order and delivery note number, customer and contract number, and IBANs with a valid check digit. Two documents with the same invoice, order or delivery note number are proposed to each other, with the reason, at the document and as a line in the inbox; "Doesn't fit" puts a proposal away for good, for everybody. Nothing is connected by itself, and two documents whose senders are both known and different are never proposed. After an update the numbers of the documents that are already there are read once, in the background.

In the archive, "Select" and "Connect with each other" connects 2 to 10 documents at once, and joining documents takes their connections along. Search words: linked:yes, linked:no.

The archive: sums, several at once, saved searches, pins

  • Sums. Under the table the archive says what the amounts of the documents it found add up to, euros first, other currencies beside them, and how many have no amount. Only what you may see is counted.
  • Several at once. "Select" beside the number of hits gives every row a box; the bar then adds or removes a tag, sets the kind, moves to another vault, connects with each other or moves to the trash, for up to 500 documents. What you may not change is left out, and a line says how many and why. Moving and the trash ask first.
  • Saved searches. "Save" keeps a search as it stands, with its words and filters, under a name in the side bar under "Saved", with the number of hits beside it. Up to 30 per person, each only its owner's, to rename, reorder and delete.
  • Pins. A pin on a document puts it under "Pinned" at the top of the archive's overview and on the quick upload, up to 20 per person and yours alone. Search words: pinned:yes, pinned:no.

The transfer code and the note on a sender

When a document names a recipient, an IBAN and an amount, "Transfer" shows a code (EPC, known as GiroCode) that a banking app scans to fill in a transfer. Every field says where it comes from: the data of an e-invoice, or read from the text, which you then compare with the paper. With more than one IBAN in the document you choose one, and only IBANs that stand in the document are used; the amount and the reference can be changed before you scan. There is no code for a credit note. nexpaper transfers nothing itself and stores nothing of it; "Mark as paid" ticks off the due date, if the document has one.

A sender can carry a note of up to 500 characters, say the customer number, the contract number or a phone number. It shows on every document of that sender in the vault; everybody in the vault sees it, nobody through a share of a single document. A sender with a note stays under Organise, Senders even without documents.

Deadlines, reminders and keeping times

Dates on a document come with a kind: due, contract until, warranty until, keep until. The Deadlines page (between Archive and Vaults, with the number for the next 14 days) lists what falls due, what has to be cancelled and what a warranty still covers, from every vault where you may edit: overdue, the next two weeks, later. A deadline can be marked as done (paid, cancelled) and opened again, or put off for you alone by a day, three days or a week. Whoever does not use deadlines switches them off for themselves (Settings › My account › Notifications, "Use deadlines"): no menu item, no number, no reminders, no weekly overview, no filter "Deadline" in the archive, and no "paid" or "later" on a document. The dates on the documents stay, the search words with deadline: keep working, and everybody else is unaffected. They are on from the start.

  • Contracts. Besides "contract until" a contract has a notice period (weeks or months) and a renewal (months). nexpaper works out the last day to cancel and shows it beside the field. Without a cancellation the end moves on by the renewal after it has passed, once per end, with a line in the history. When a notice has to arrive is written in the contract; nexpaper only does the sums.
  • Reminders (Settings › My account › Notifications). Everybody who may edit in a vault is reminded of its deadlines, at 8 in the morning in their own time zone: an invoice 3 days ahead, the last day to cancel 14 days ahead, a warranty 30 days ahead (each changeable), and once more on the day itself unless it is done. Way: push, mail, or a weekly overview by mail on Mondays, only when something is coming up. A person can mute single vaults; somebody who may only read gets nothing. Every reminder goes out once, a missed one is made up for two days, and at most 20 a day go to one person, the rest in one message. It names the kind, the day and the title of the document, never the amount, the text or the notes. Mail needs the mail server of the operator and a confirmed address.
  • Keeping times (Organise, Kinds, column "Keep"). A kind can have a time in years, counted from the end of the year of the document date; no kind has one from the start. Setting it asks whether it also applies to the documents already there (a date set by hand stays). Documents whose time is over are listed in the archive under the filter "May go" (a table with the column "Keep until", boxes and "Move to the trash"; the overview of the archive says how many there are) and on the Deadlines page, where you choose what goes to the trash (30 days, see Filing). The question when you set a time always says what happens once it is over. The usual times shown beside the setting are a help and carry no guarantee; nexpaper makes no claim of GoBD compliance or legal advice.
  • Expired ones into the trash by themselves (Organise, Kinds, switch below the time; off from the start, only for a kind with a time, set by whoever sets the time). When it is on, nexpaper puts the filed documents of the kind whose time is over in the trash once a day, at night (3 o'clock, server time; a night the server was off for is made up at the next start), at most 500 a day, each document only once (one you restore stays), with a line in its history, in the weekly overview and in a note on the archive. A date you set by hand counts like any other. Switching it on asks first and says how many documents would go at once; a document filed later whose time is already over goes the next night, and the document page and the inbox say so. Nothing is deleted for good by it; the trash empties itself after 30 days as always.
  • A follow-up is a date of its own with a sentence of what to do then ("ask whether it was refunded"). It stands on the Deadlines page with a filter of its own and reminds on the day itself at 8, without a lead; the sentence never goes into a reminder or the weekly overview.
  • Search words: deadline:open, deadline:overdue, deadline:<30, keep:expired. The same data is open to programs (docs/api.md).

Push

Notices arrive by Web Push, to every device a person signs up (Settings › My account › Notifications): of a new sign-in, of an export that is ready or failed or a finished import from Paperless, of a second factor the operator reset or an account the operator unlinked from a sign-in provider; operators also hear when the check of the files finds something wrong or a restore fails. It needs https (or localhost). On an iPhone it works only for the app added to the home screen (Share, Add to Home Screen) and only from iOS 16.4. The server makes its own keys; the operator can add a contact and further push services. A push never carries the content of a document; a reminder of a deadline names only its kind, its day and the title (see Deadlines, reminders and keeping times).

On the phone

A phone opens on the quick upload (once per visit; a switch under Settings › My account › Upload): take a photo, choose a file, see what was uploaded last and what waits in the inbox, and choose the vault files go to. The camera finds the edges of the page by itself (OpenCV in the browser, served by nexpaper itself and loaded only on that page), takes the picture once the page holds still, lets the corners be pulled by hand, offers colour, greyscale and black and white, and makes one PDF of several pages. It needs https (or localhost), like every camera in a browser.

  • Android: nexpaper added to the home screen stands in the share menu of every app. The shared files stay on the phone until the person taps "Upload".
  • iPhone: Safari puts no web app into the share menu, so a shortcut steps in. iOS imports only shortcuts signed by Apple, so nexpaper cannot ship the file: Settings › My account › Connections explains how to build it in four steps with a key that only uploads, and the operator can share a finished one by an iCloud link (docs/iphone-shortcut.md).
  • Pairing a device: a QR code under Settings › My account › Connections › Devices, valid for five minutes and once, or OAuth 2 with PKCE for apps. Each device gets a key of its own and stands in that list, where it can be disconnected.

Inputs

Besides the browser and the phone, documents come in two more ways (Settings › Server › Inputs). Nothing from either is filed by itself: it all waits in an inbox.

  • Intake folder: a folder in the container (/data/eingang unless you name another one, mounted as a volume for a scanner or a share) with a subfolder per person. A file is taken once it lay still for 10 seconds, goes into that person's inbox and leaves the folder; what is not taken (another kind of file, too large, empty) is moved to abgelehnt/ beside it with the reason. Files in the folder itself or in a subfolder nobody has go to the operator, marked unknown. Links are not followed, hidden and temporary files are left alone. After a person changes their username, the subfolder and the plus address of the former name keep reaching them (a former name never goes to anybody else); Settings › My account › Upload lists them.
  • Mailbox: one IMAP mailbox for the whole server, fetched every 5 minutes. PDF, pictures and e-invoices as XML are taken from the mails, also from forwarded ones; the mails themselves do not become documents, unless you switch on "Take mails without an attachment as a document" (off from the start): then a mail without any attachment that comes from a confirmed address of a person, and that your mail server says passed DMARC (dmarc=pass from the trusted server, see SECURITY.md), becomes a PDF of its text (from, to, subject, date, then the text; HTML is read as text only, nothing in it is loaded) in that person's inbox, titled with the subject. Never for unknown senders, never through paper+<account>@ alone, at most 50 a day per person and 200 KB of text each. Without such a verdict of your mail server no text is taken. A mail belongs to the person whose confirmed address it comes from (Settings › My account › Upload) or who is named in paper+<account>@; everything else goes to the operator, marked unknown (or stays in the mailbox, if you choose so). A mail for a blocked or deleted account never goes to the operator: it stays unread in the mailbox and comes in once the account is back; once the account is removed for good, it is left there and goes to nobody. Once every part was taken the mail is marked read, moved to nexpaper or deleted; a mail with parts over the limits stays and is flagged. The first start takes only the unread mails. TLS or STARTTLS is required (without it only for a server on the same machine), a server in your own network must be allowed first, and switched off nothing connects. A stranger who knows the address can send files into an inbox: nexpaper limits how much per run and day, see SECURITY.md.
  • Upload requests (Inbox, Ask for a document): an address /u/<token> you give to somebody without an account, the tax office or the property manager, who drops files there. They land in your inbox in your own vault, from the name you gave the request and marked unknown; nothing is filed by itself, and a rule may propose fields but never moves such a document to another vault. A request lasts at most as long as a link, takes 10 files unless you say otherwise (50 at most), and you withdraw it whenever you like (Settings › My account › Upload, or the dialog). Off from the start: the operator switches them on under Settings › Server › General › Features for all accounts, and they need the public address of the server. The page behind the address shows who asks, for whom, and how many files still go; never what arrived already. You get a notice (at most one per request and hour) with the name of the request and the number of files, never a file name.

Protected PDFs

A PDF that needs a password waits in the inbox with a field for it. Type the password and "Open": the original stays as it came (protected, with its checksum), and nexpaper keeps an opened copy without the password beside it, as the searchable copy. The view, the search, the page tools, links and exports use that copy; "Download: original" gives the protected file and says so. A PDF that only locks printing or changes is opened without asking.

Tick "Remember for future documents" and give it a name ("Payslip"): protected PDFs you upload yourself later, or that come into your own vault through the intake folder or the mailbox, are opened with it by themselves. Up to 10 per person, stored encrypted with the server's secret and never shown again; Settings › My account › Upload lists them by name to rename or delete. Nobody else's are ever tried, also not on a file somebody else uploads to your document, and the operator sees none of them. A backup together with secret.key can open them, see SECURITY.md.

From Paperless, and for the tax adviser

  • Import from Paperless-ngx (Settings › Server › Import; the operator): give the address and an API token of Paperless, look first (how many documents, tags, correspondents and types, who owns what), choose a person here for each owner and whether each document goes into the own vault of its person, everything into one vault, or a shared vault for each storage path (named after it; a vault of that name that is here already is used, documents without a path go to the own vault of their person). The documents come with the file as it came, the searchable copy and the text Paperless recognised (nothing is read again), title, date, sender, kind, tags, notes, custom fields (as a note) and the people they were shared with. It runs in the background, can be stopped and goes on where it stopped, also after a restart; running it again takes only what is new. Office files (Word, Excel) are not taken; when Paperless made a PDF of one, that PDF becomes the document and its history says so. What is skipped is in the log with its reason. Paperless itself is only read.
  • Export (Archive, Export): a ZIP of the documents of a period and of chosen vaults, with the filters of the archive: the searchable PDFs, the originals if wanted, e-invoices as XML and a list as CSV (Excel opens it as it is), in folders as on the disk. It is made and fetched in the browser, packed in the background, and a notice says when it is ready. Instead of downloading it, the ZIP can go to the tax adviser as a link without an account, valid as long as links are (Settings › Server › General › Features for all accounts); it shows when it was opened and can be revoked. With "Take the documents that go with them" the delivery note comes along with its invoice even outside the period (only what you see in your vaults), and the list names them in a column of its own.

Links to the outside

A document can go to somebody without an account as a link (Share, By link to the outside): it ends at its date, at most after the days the operator allows, and can be withdrawn at any time; whoever made it sees how often it was opened, and the operator can switch all links off at once. When the document has others that go with it, the link can show them too, but only those you tick when you make it, and only those you may share by a link yourself. Nothing that comes to go with it later is added. The page behind the link lists them under "Goes with it". Every document shown this way says so on its own page (and counts in the archive's sign for a link to the outside), and whoever may see its links can take it out of the link there.

A link shows the document as it is now. Whoever may change it sees that it is open to the outside (the sign in the archive and a notice at the document, without to whom; that stays with who may share it), and is asked before changing its pages: the page tools, joining, splitting, a new version or an old one back.

Connect nex apps

nexpaper connects with other nex apps in one click, without a key to copy. The operator enters each app's address once under Settings › Server › Connections › Other nex apps; an app in your own network (LAN, VPN) also needs "Connections into the local network" there, and the switch at the top turns connections off for everybody (they rest, nothing is deleted). After that every person clicks "Connect with …" under Settings › My account › Connections, agrees once in the other app and comes back connected. The page where they agree shows the account they are signed in with and says in plain words what each app may do. Each app may only do what its connection is for, and only in the vaults the person chooses.

App May do in nexpaper, or nexpaper there What you do with it
nextime Read the deadlines of your documents Open deadlines as all-day entries in the calendar; a click opens the document
nexmail Put documents into the inbox "Send to nexpaper as a document" beside an attachment puts it into your inbox
nextasks nexpaper reads your lists and creates tasks there "Task in nextasks" on a document's page makes a task with a link back

The card of each app shows since when it is connected, when it was last used and what it allows, with "Check now" and "Disconnect", which ends it on both sides. When something goes wrong in the other app, the reason is shown in the card. A calendar that reads the deadlines with an API key keeps working; it can be renewed the new way.

For programs

Everything the web app does goes through /api/v1; the web app uses nothing else. A phone or a later app pairs with a device token (Settings › My account › Connections › Devices) and acts with the rights of its account; scripts use an API key (Settings › My account › Connections › API keys) that only reads or only uploads, never more than its account may (off until the operator switches it on under Settings › Server › Connections › Interfaces; 120 requests a minute, 50 uploads an hour). The description is served at /api/v1/docs and, for machines, at /api/v1/openapi.json; docs/api.md says how to sign in.

AI tools (MCP) reach nexpaper at /api/mcp: list vaults, search and read documents, look at the inbox and the deadlines, accept suggestions, change fields and put a document in the trash. A person makes an MCP key (read, or read and change) under Settings › My account › Connections › AI tools (MCP), or a program connects itself over OAuth with the person's consent in the browser. Both can be limited to vaults, and every tool can be allowed, asked first or denied; what asks waits for a yes there, and the person's devices get a notification. A document's history names the program that changed it. Off until the operator switches it on under Settings › Server › Connections › Interfaces.

Security in short

  • Passwords are hashed with Argon2id. Five failed sign-ins lock an account and an address for 15 minutes; with a second factor, the password alone opens nothing. A session ends after 30 days without use (NEXPAPER_SESSION_DAYS), or after 12 hours when "stay signed in" was not ticked, and every device can be signed out on its own.
  • Rights are checked on the server for every request. A wrong device token or API key counts against the sender like a wrong password. A device token never changes the way into the account (password, second factor, passkeys), never reaches the operator's side (settings, accounts, backups, the log) and never pairs another device; a lost phone is blocked in the list and stops at once.
  • Every changing request of a browser needs a header a page on another site cannot send. Cookies are HttpOnly and SameSite; the Content Security Policy only allows the app's own files. Only the worker that finds the edges of a page in a photo may compile code at run time (OpenCV); it sees pixels and nothing else.
  • Addresses the server reaches out to (the AI, push services, the mailbox) are checked against the internet and the home network: resolved once, connected to exactly as checked, no redirect followed, never a metadata address.
  • A backup is read with limits (nothing but its three parts, a manifest of at most 64 KB, the bytes counted while unpacking) and tried out on a scratch copy before a restore, and downloading, deleting, uploading and restoring one ask for the operator's password again. A restore brings back devices, keys and links withdrawn after the backup; the trial run counts them.
  • The log never contains the content of a document, passwords, keys or tokens.

How to report a problem: SECURITY.md.

Development

cd backend && python -m venv .venv && .venv/Scripts/python -m pip install -r requirements-dev.txt
.venv/Scripts/python -m pytest -q
.venv/Scripts/python -m uvicorn app.main:app --port 8560 --no-proxy-headers --no-server-header
cd frontend && npm ci && npm run dev && npm test && npm run lint && npm run build

On Linux the virtual environment's programs are in .venv/bin. The frontend on port 5571 sends /api to the backend. The tests need no network and keep their data in a folder of their own. When the interface changes on purpose, renew the recorded description: NEXPAPER_RECORD_OPENAPI=1 python -m pytest tests/test_routes.py.

The sign-in through a provider end to end, headless, with a stand-in provider on its own port: cd frontend && npx playwright install chromium && npm run e2e (builds the interface, starts the backend on 18566 and the stand-in on 18567, both with a fresh data folder). The sign-in module in backend/app/vendor/nexoidc, frontend/src/vendor/nexoidc and backend/tests/nexoidc is shared by every nex app and checked against its checksums; it is changed at its source only.

License

AGPL-3.0.

The icons are Lucide (ISC, partly MIT from Feather); the font is Inter (OFL-1.1). Their notices ship with the app at /licenses/. Everything else nexpaper ships or depends on, with its licence, is listed in THIRD-PARTY.md.

Categories

Download Statistics

1,059
Total Downloads

Related apps

Links

Details

Repository
ghcr.io/derkezorm/nexpaper
Last Updated2026-10-30
First Seen2026-10-11

Runtime arguments

Web UI
http://[IP]:[PORT:8000]/
Network
bridge
Shell
sh
Privileged
false

Template configuration

WebUI PortPorttcp

Port you reach nexpaper at. Container port: 8000

Target
8000
Default
8560
Value
8560
Data (Container Path: /data)Pathrw

Holds the SQLite database with accounts and the search index, the documents as plain files in dokumente/, the key secret.key, backups and logs. A backup made by nexpaper does not hold the documents: copy this folder with the backup your server makes anyway. Keep it on a local disk, not on a network share.

Target
/data
Default
/mnt/user/appdata/nexpaper
Value
/mnt/user/appdata/nexpaper
PUIDVariable

User id that should own the files in /data. 99 is the Unraid default.

Default
99
Value
99
PGIDVariable

Group id that should own the files in /data. 100 is the Unraid default.

Default
100
Value
100
Time ZoneVariable

Time zone for timestamps in the log, for example Europe/Berlin. Leave blank for UTC. People's own time zones come from their browsers.

Target
TZ
Setup CodeVariable

The code the first account needs to become the operator. Leave blank: nexpaper makes a new one at every start until it is set up and writes it to the container log.

Target
NEXPAPER_SETUP_TOKEN
Public URLVariable

The address people use to reach nexpaper, for example https://paper.example.com when it sits behind a reverse proxy. Used for invitation links and the return address of OpenID Connect. Leave blank to take the address of the request; the same can be set later in the settings.

Target
NEXPAPER_PUBLIC_URL
Trusted ProxiesVariable

Addresses or networks of your reverse proxies, comma separated, for example 172.16.0.0/12. Only their X-Forwarded-For and X-Forwarded-Proto (the rightmost value) are believed, so only they can tell nexpaper that a request came in over https; without it every sign-in seems to come from the proxy and the brake against password guessing cannot tell people apart.

Target
NEXPAPER_TRUSTED_PROXIES
Container Port (host networking only)Variable

Leave this empty unless you switched Network Type to Host. In bridge mode the WebUI Port above already does the job and setting this will break it, because the mapping still points at 8000. On host networking the port inside the container is the port on your server, so use this to move nexpaper off 8000 if something else is already there.

Target
NEXPAPER_PORT
Secret KeyVariable

Protects the server-side secrets (the OpenID Connect client secret, the mail password, the AI key). Leave blank: nexpaper creates one on first start and keeps it in /data/secret.key.

Target
NEXPAPER_SECRET_KEY
Secure CookieVariable

auto marks the session cookie Secure when the request arrived over https, also behind a proxy listed under Trusted Proxies that sends X-Forwarded-Proto. Use on only if a proxy terminates TLS and forwards plain http without that header, and never if nexpaper should also be reachable over http, or nobody can sign in. off never marks it.

Target
NEXPAPER_COOKIE_SECURE
Default
auto
Value
auto