Video coming soon…

📄 Setup Paperless-ngx — Document Management System

Deploy Paperless-ngx on Ubuntu — open-source document management with OCR, auto-tagging, and full-text search to go fully paperless.

⚠️ This script is provided for demo and testing purposes only. Not intended for production use.

📦 Resources & Setup Scripts

Grab the automated bash script from GitHub to follow along with the video.

Automated install script — one command sets everything up.
View on GitHub

Quick Install:

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/files/paperless-ngx/paperless-ubuntu.sh
chmod +x paperless-ubuntu.sh
sudo bash paperless-ubuntu.sh

Tutorial Steps

1 Download the Script

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/files/paperless-ngx/paperless-ubuntu.sh

2 Make it Executable

chmod +x paperless-ubuntu.sh

3 Run the Installer

The script installs Docker if needed, then sets up Paperless-ngx with PostgreSQL and Redis automatically.

sudo bash paperless-ubuntu.sh

4 Access the Web UI

Open your browser and navigate to:

http://<your-server-ip>:8000

5 Ingest Your First Document

Start adding documents to Paperless-ngx via the consume folder, web upload, or email ingestion.

# Drop documents into the consume folder (auto-ingested):
docker exec -it paperless-ngx ls /usr/src/paperless/consume

# Or ingest via web upload at http://<your-server-ip>:8000/upload

# Or configure email ingestion:
# Settings → Mail → Add mail account → set inbox folder to "consume"

Ports Used

PortPurpose
8000Paperless-ngx Web UI
5432PostgreSQL (internal)
6379Redis (internal)

Overview

Paperless-ngx is an open-source document management system that transforms physical and digital paperwork into a searchable, organised digital archive. It ingests documents via a watched consume folder, email attachment scanning, or direct web upload — then runs Tesseract OCR to extract text from scans and images, automatically matches documents to saved correspondents and tags using machine learning, and indexes everything for instant full-text search. The result is a system where any document — tax return, insurance policy, invoice, medical record — is found in seconds by searching its content, not guessing which folder you filed it in three years ago.

Why Use It

The average person loses 15–30 minutes per week searching for documents they know they have but cannot find. Paperless-ngx eliminates this entirely. Scan a document once, drop it in the consume folder, and it is indexed, tagged, and searchable forever. The auto-matching engine learns from your corrections — after tagging 10 invoices from the same vendor, Paperless automatically applies the same tags and correspondent to every future invoice from that source. The email ingestion feature makes it fully automatic: forward receipts and bills to a dedicated address and they appear in Paperless without any manual action.

When You Need It

    Who Should Use It

      Real Use Cases

        Main Features

          How to Use After Installation

            Security Best Practices

              Ports and Firewall Notes

              Paperless-ngx serves its web UI on port 8000 by default. Proxy it through Nginx Proxy Manager with HTTPS for secure remote access. PostgreSQL (5432) and Redis (6379) are internal Docker network services. The document storage volume contains your actual files — ensure it is on a reliable, backed-up disk. The consume folder can be shared via a network mount for scanner integration.

              Backup and Maintenance

                Common Mistakes

                  Troubleshooting

                    Alternatives

                    FileBrowser (file manager only — no OCR or search), Mayan EDMS (heavier enterprise DMS with workflow engine), Teedy (lighter, simpler DMS), Docspell (alternative open-source DMS with similar features). Paperless-ngx is the gold standard for self-hosted document management — it is actively maintained, feature-rich, and has the most active community of the open-source DMS options.

                    When Not to Use It

                    Skip Paperless-ngx if you only need basic file storage and folder organisation — FileBrowser or Nextcloud Files are simpler. Also skip it if OCR is not needed (your documents are already machine-readable PDFs) and you just want search — Nextcloud Full Text Search or a simple Elasticsearch setup covers that. Paperless requires at least 1 GB RAM for Tika to parse complex documents reliably.

                    PrismaTechWork Professional Help

                    PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support. Whether you need a single-server setup or a multi-site network, our team ensures your infrastructure is built right, secured properly, and maintained reliably.

                      Contact Us

                      Frequently Asked Questions

                      How does Paperless-ngx OCR work?

                      Paperless-ngx uses Tesseract OCR to extract text from scanned images and non-searchable PDFs. When a document is ingested, the consumer service runs Tesseract on each page, extracts the text, and stores it in PostgreSQL for full-text search. The OCR output is embedded into the PDF as a hidden text layer so the original document appearance is preserved while the content becomes searchable. Tesseract supports 100+ languages — install additional language packs for non-English documents.

                      How do I connect my scanner to Paperless-ngx?

                      The simplest method: configure your scanner to save files to a network share that maps to Paperless's consume folder (/opt/paperless/consume on the host). Any file saved there is automatically ingested. For network scanners with SMB/CIFS support, mount the consume folder as a shared folder in your scanner settings. For mobile scanning, use the Paperless mobile app or any scanning app that can upload to a WebDAV or network folder.

                      What is auto-matching and how do I set it up?

                      Auto-matching automatically assigns tags, correspondents, and document types to newly ingested documents based on rules you define. Go to Settings → Matching and create rules: choose a correspondent (e.g. My Bank), set the matching algorithm (any word, all words, fuzzy, regex), and enter keywords to match (e.g. 'Statement', 'Account Number', bank's name). When a future document matches the rule, Paperless assigns the correspondent automatically without manual intervention.

                      Can Paperless-ngx ingest documents from email?

                      Yes. In Settings → Mail, add an email account with IMAP credentials. Configure which folder to monitor (usually Inbox or a dedicated Receipts folder) and what action to take after ingestion (mark as read, move to folder, delete). Paperless checks the mailbox periodically, downloads email attachments (PDF, images, Word documents), and ingests them as regular documents. This is ideal for automatic receipt and invoice archiving.

                      How does Paperless-ngx handle document storage?

                      Documents are stored in a media directory with a configurable path structure (default: PAPERLESS_FILENAME_FORMAT sets the folder and file naming). The original file is preserved alongside an archived version with embedded OCR text. You can configure custom path templates using document metadata: {correspondent}/{document_type}/{created_year}/{title}. The PostgreSQL database stores all metadata, tags, and search indexes — the media directory stores the actual files.

                      Can I access Paperless-ngx from my mobile phone?

                      Yes. Paperless-ngx has an official mobile app for iOS and Android that connects to your self-hosted instance via HTTPS. The app allows browsing, searching, and uploading documents from your phone's camera directly to Paperless. For setup, enable HTTPS via Nginx Proxy Manager and enter your Paperless URL and credentials in the mobile app. The REST API also enables integration with automation tools like Shortcuts (iOS) for automated scanning workflows.

                      Does Paperless-ngx support multiple users?

                      Yes. Paperless-ngx supports multiple user accounts with per-document permissions. Each user can have their own set of documents that are not visible to others, or documents can be shared across users. The admin account has full access to all documents and system settings. User management is in the admin panel. For family or small team use, create separate accounts per person to keep documents private.

                      How do I migrate my existing documents into Paperless-ngx?

                      Place all your existing PDFs and images in the consume folder — Paperless ingests them all automatically. For bulk imports, use the document_importer command: docker exec paperless-ngx document_importer /path/to/documents. For structured imports with existing metadata, use the REST API to create documents programmatically with tags, correspondents, and dates pre-set. Start with a small test batch to verify OCR and auto-matching work correctly before importing thousands of documents.