Why Self-Hosted Document Management Beats the Cloud
Paper documents are a liability. They pile up, they get lost, and when you need a specific receipt or insurance form from three years ago, finding it becomes a minor crisis. Paperless-NGX solves this by turning your scanner or phone camera into a document ingestion pipeline – storing, tagging, and indexing everything in a searchable archive you control completely. No subscription, no third-party server, no data leaving your home network.
Paperless-NGX is an open-source document management system built on Django and designed to run as a set of Docker containers. It accepts documents from a watched folder, processes them through an OCR engine (Tesseract by default), extracts text, applies auto-tagging rules, and stores everything in a structured database with a clean web interface. Setting it up takes about an hour, and once it is running, the daily workflow becomes almost automatic.

What You Need Before You Start
You will need a Linux-based host – a Raspberry Pi 4, an old desktop running Ubuntu Server, or any machine with at least 2GB of RAM and a few hundred gigabytes of storage. Docker and Docker Compose must be installed. If you are already running other self-hosted services on the same machine, you likely have this covered. The Paperless-NGX stack adds a web server, a Redis broker, a PostgreSQL database, and the main application container, so plan for the additional memory footprint.
Storage planning matters more than most guides acknowledge. The system stores original files and processed versions separately, and the OCR process creates additional index data. A household that scans actively – mail, tax documents, warranties, medical records – can accumulate several gigabytes per year without much effort. An external drive or NAS mount mapped to the container volumes is a sensible choice from day one rather than a retrofit later.
Pick a static local IP for the host machine before you begin. Paperless-NGX exposes a web interface on port 8000 by default, and you will want a consistent address to access it from other devices on your network. Assigning a DHCP reservation in your router settings takes two minutes and avoids the frustration of a shifted IP breaking your bookmarks or mobile access later.
Deploying the Stack with Docker Compose
The official Paperless-NGX repository provides a Docker Compose file that handles the full stack. Download it using curl or clone the repository, then copy the provided docker-compose.env example file and edit it before launching anything. The key variables to set are PAPERLESS_SECRET_KEY (generate a random string), PAPERLESS_TIME_ZONE (match your local timezone string, e.g. America/New_York), and PAPERLESS_OCR_LANGUAGE (set to eng for English, or add additional Tesseract language codes separated by plus signs). If you want PostgreSQL instead of the default SQLite, the compose file already includes the service – you just need to uncomment the relevant lines and set database credentials in the env file.
Run docker compose up -d from the directory containing your compose file. On first launch, the application container will initialize the database and run migrations automatically. Create an admin account by running docker compose exec webserver python3 manage.py createsuperuser and following the prompts. That account is what you will use to log into the web interface at http://[your-host-ip]:8000.

Configuring Consumption, Tags, and Correspondents
The consumption folder is the most practical part of the setup. Any file dropped into it – PDF, JPG, PNG, TIFF – gets automatically picked up by the Paperless-NGX consumer process, run through OCR, and added to your document library. Map this folder to a location on your host that is easy to reach from other devices. On a home network, sharing it as an SMB or NFS share means you can drag documents into it directly from a laptop or set your scanner’s destination folder to write there over the network.
Tags and correspondents are what make the archive actually useful rather than just a flat pile of scanned files. Correspondents represent senders or organizations – your bank, your employer, your insurance company. Tags represent categories like tax, medical, or warranty. Both can be created manually in the web interface or auto-assigned through matching rules based on document content. A rule that searches for the phrase “Blue Cross” in document text and assigns the correspondent “Health Insurance” and the tag “medical” will correctly categorize those documents without any manual input after the initial setup.
Auto-matching rules are where the system earns its keep over time. Navigate to Settings, then open the correspondent or tag you want to automate. Set the matching algorithm to any word, all words, exact match, or regular expression depending on how specific your criteria need to be. A regular expression match on a bank account number pattern in the document content, for example, is far more reliable than matching on a bank name that might appear in other contexts. Build these rules gradually as you process documents – trying to configure everything upfront before you know what your actual documents look like wastes time.
Custom fields were added in Paperless-NGX version 2.0 and significantly expand what you can track per document. Beyond the standard title, date, and correspondent, you can define typed fields like monetary amounts, URLs, or plain text. This is useful for tracking things like policy numbers on insurance documents, expiration dates on warranties that differ from the document date, or contract values. These fields are searchable and filterable in the interface, which means finding all warranties expiring before a certain date becomes a quick query rather than a manual scan through documents. If you are also running an inventory system – Homebox for home inventory tracking, for instance – cross-referencing items with their warranty documents stored in Paperless-NGX becomes a natural part of the workflow.
Backups, Mobile Access, and Long-Term Maintenance
Paperless-NGX stores documents in a folder structure on disk and keeps metadata in the database. Backing up both independently is essential – a database backup without the files, or files without the database, leaves you with half an archive. The document_exporter management command exports everything in a portable format: docker compose exec webserver document_exporter /export writes a directory containing original files alongside a JSON manifest with all metadata. Run this on a schedule with cron and copy the output to an external drive or a second machine. A full export is far more useful for disaster recovery than a raw database dump alone.
Mobile access works through the same web interface, which is responsive and functional on phones. For access outside your home network, running Paperless-NGX behind a reverse proxy like Nginx Proxy Manager or Caddy and exposing it through a VPN is the more secure option compared to opening the port directly to the internet. The search functionality – full-text search across all OCR-extracted content – is fast enough on modest hardware that pulling up a specific document from your phone while standing in a waiting room is entirely practical. That use case alone justifies the setup time for anyone who regularly needs to reference documents while away from home.

Version upgrades in Paperless-NGX are frequent and occasionally include database migrations that require the containers to be brought down cleanly before pulling new images. The project’s GitHub releases page documents breaking changes, and reading it before running docker compose pull takes less than a minute. Skipping a version or two and then jumping forward can stack migrations, which usually works but occasionally surfaces edge cases worth avoiding. The safer habit is pulling updates every few weeks rather than letting the gap grow wide.





