
Paperless-ngx is an open-source document management system that transforms physical documents into a searchable archive. It uses Optical Character Recognition (OCR) to extract text from scanned images and PDFs, enabling full-text search across your document library. The web-based interface provides tagging, custom fields, and automated document processing workflows.
This article explains how to deploy Paperless-ngx on a Linux server using Docker Compose. The setup includes PostgreSQL for metadata storage, Redis for task management, and Traefik as a reverse proxy for automatic HTTPS with Let's Encrypt.
Before you begin, you need to:
paperless.example.com).Paperless-ngx requires persistent directories for document storage, database files, and TLS certificates. Environment variables configure domain routing, database credentials, and application behavior.
Create the required project directories.
Navigate to the project directory.
Create an environment file to store configuration values.
Add the following environment variables:
Replace:
paperless.example.com with your registered domain name.admin@example.com with your email address for certificate notifications.CHANGE_TO_RANDOM_STRING with a random 32+ character string for Django security.STRONG_PASSWORD_HERE with a strong database password (use the same value for both PAPERLESS_DBPASS and POSTGRES_PASSWORD).Save and close the file.
The Docker Compose stack runs Paperless-ngx with PostgreSQL for metadata storage and Redis for task queuing. Traefik handles TLS termination and automatic certificate provisioning.
Create the Docker Compose file.
Add the following manifest:
Save and close the file.
In the above manifest:
80 and 443 on the host for external traffic handling..env file to each service.8000 accessible to Traefik without publishing it directly to the host../letsencrypt bind mount stores TLS certificates persistently across container rebuilds./var/run/docker.sock) grants Traefik the ability to discover services and update routes dynamically../data, ./media, ./export, ./consume, ./pgdata) persist application data, uploaded documents, exports, consumption directory, and database files.Launch the containers in detached mode.
Verify that all services are running.
Verify from the output that all containers are in the running state and report a healthy status.
View the logs for the services.
For more information on managing a Docker Compose stack, see the How To Use Docker Compose article.
Create a superuser account to access the dashboard.
Follow the prompts to set a username, email address, and password for the administrator account.
The Paperless-ngx web interface provides document upload, tagging, search, and automation workflows. After logging in with the superuser account, you can configure correspondents, document types, and custom fields.
Open your web browser and navigate to Paperless-ngx. Replace paperless.example.com with your registered domain name.
Enter the superuser credentials created in the previous step and click Login.
The dashboard loads with the following panels:
Paperless-ngx automatically processes uploaded documents using OCR to extract searchable text. The following example demonstrates uploading a scanned document.
Click Upload documents in the top-right corner of the dashboard.
Select a PDF or image file from your local machine and click Open to begin the upload.
Paperless-ngx automatically queues the document for OCR processing using Tesseract with the language defined in your environment configuration. Once processing completes (typically 5-30 seconds depending on document size), the document appears in the main dashboard view.
Click the document thumbnail to open the detail view.
Verify that the Content tab displays the extracted text from the OCR process.
The interface shows the original document on the right with the OCR-extracted text on the left, confirming that the document is now searchable.
You have successfully deployed Paperless-ngx with Docker Compose and enabled automatic HTTPS using Traefik. The platform now provides OCR-based document processing, full-text search, and persistent storage backed by PostgreSQL and Redis. Your configuration ensures data remains intact across container restarts and updates. For advanced configuration options and feature details, visit the official Paperless-ngx documentation.
0 Comments
Be the first to comment and share your perspective with the community.