The Short Answer
Paperless-ngx turns scans and PDFs into a searchable document archive: you feed it a file, it reads the text with OCR, files it with a date, tags and sender, and later finds it by any word inside it. To self-host Paperless-ngx on a VPS, the route the project itself recommends is Docker Compose — either through its interactive installation script or by downloading the official Compose templates by hand. The stack is small: the Paperless webserver, a database (PostgreSQL is the recommended backend for new installations), and a Redis-compatible broker, with optional Tika and Gotenberg services if you want Office documents converted too. It serves its web interface on port 8000, which you should bind to localhost and put behind an HTTPS reverse proxy, because the archive holds your most sensitive paperwork in readable form.
Sizing needs honesty, because the project publishes no official minimum RAM figure. The practical floor from deployment guides and measured stacks is 2 vCPUs and 2 GB of RAM for a household archive, with 4 GB the comfortable size — idle use sits in the few-hundred-megabyte range, but OCR on a multi-page PDF spikes CPU and memory per document, and a bulk import will punish an undersized server for hours. Storage is the other decision: Paperless keeps originals, archived copies and thumbnails, so budget disk for the archive you will have in three years, not the one you import this weekend. If Docker itself is new to you, work through our guide on how to install Docker on a VPS first.
Why Run Your Document Archive on a VPS?
A document archive is only useful if you can reach it when the paper is not in front of you — the insurance letter while travelling, the contract at the office, the invoice at tax time. A VPS keeps that archive always on and reachable from anywhere, without opening ports on your home router, and Paperless stores documents as plain files on disk alongside its database, so you are never locked out of your own archive by a vendor’s export button. The trade is the usual self-hosting one: you own the patching, the TLS certificate, the backups and the disk-full alerts, and the documents inside — contracts, IDs, bank letters — must never sit on an unprotected server. If you already run services for yourself, Paperless fits alongside the setups in our roundup of the best VPS options for self-hosting.
Step 1: Size the VPS for OCR, Not for Idle
Paperless looks lightweight when idle, and that misleads people into buying the smallest VPS on the page. The work that matters is consumption: every new document is OCR-processed, thumbnailed and indexed by background workers, and OCR is CPU-hungry per page. A household adding a few documents a week will live at the floor; a small office scanning daily should step up in CPU first and RAM second.
Use this baseline, checked against the project’s setup guidance and current deployment guides on December 5, 2026: 2 vCPUs, 2 GB of RAM minimum, 4 GB recommended, SSD storage from about 20 GB for the application plus archive growth. On a 2 GB server, adding swap is cheap insurance against an OCR spike killing a worker mid-document. Our VPS sizing guide on how much CPU, RAM and storage you actually need covers the general method; for Paperless, archive growth matters more than the idle footprint.
Step 2: Install with Docker Compose — and Choose the Database First
Paperless-ngx documents three routes: the interactive installation script (fastest; creates the files, pulls the image, starts the containers, creates your account), the manual Docker Compose templates, and a bare-metal install the project describes as complicated and best suited to advanced users. For a VPS you will maintain for years, take the manual Compose route: download one docker-compose.*.yml template for your database backend, save it as docker-compose.yml, and download docker-compose.env and .env into the same directory. Files with -tika in the name add optional Tika and Gotenberg services for Office documents.
Two traps catch first-time installers. First, the file split: your Paperless settings live in docker-compose.env, while the plain .env mostly names the Compose project — editing the wrong one changes nothing and fails silently. Second, the database choice, which is painful to reverse once documents exist:
| SQLite | PostgreSQL | |
|---|---|---|
| Setup | Built in, one file in the data directory | Extra service in Compose, credentials in the env file |
| Good for | Trying Paperless out, tiny single-user archives | New installations the project recommends it for; multi-user and growing archives |
| Concurrency | One writer at a time; busy imports queue up | Proper database; workers and web UI do not fight over a file |
| Backups | Copy the file with the archive | Dump or snapshot the database volume with the archive |
| Migration | — | Choose it on day one; moving later is a project, not a setting |
The project’s own tip for new installations is PostgreSQL, and current templates pair it with a Valkey broker (the Redis-compatible task queue between web process and OCR workers). On current releases, two settings deserve attention before first start: PAPERLESS_SECRET_KEY must be a long random value you generate yourself — it signs authentication, and a guessable one lets third parties forge credentials — and the database engine must be declared explicitly for PostgreSQL rather than inferred. Set both exactly as the template does, and do not redeclare template-managed values in the env file.
Start with docker compose pull and docker compose up -d, then confirm webserver, database and broker are all up before touching DNS. On first access you will be prompted to create a superuser; follow the project’s advice and create a separate everyday user afterwards, because a superuser has full access to every document.
Step 3: Configure the Settings That Decide Whether It Works
Most of docker-compose.env can stay at defaults, but five settings decide whether the install behaves:
PAPERLESS_URL— your publichttps://address when behind a reverse proxy, so links and redirects use the right host.PAPERLESS_OCR_LANGUAGE— the language most documents are written in (for exampleeng). Selecting a language is not installing it: additional languages need their language data in the container, so check the configuration reference before the first bulk import, or the archive fills with documents OCR read in the wrong language.PAPERLESS_TIME_ZONE— your local timezone, so document dates land on the right day.USERMAP_UID/USERMAP_GID— your host account’s numeric IDs (fromid -uandid -g), so container and host user can both write to the consumption directory. The default 1000 matches the first normal user on many systems; verify rather than assume.- The consumption directory — the watched
consumeinbox where scanners drop files. On a filesystem without inotify, such as NFS, Paperless will not notice new files until you enable polling withPAPERLESS_CONSUMER_POLLING.
Keep the three storage areas straight, because backups depend on it: media holds the document files (originals and archived copies), data holds application state and the search index, and the database holds the metadata — tags, correspondents, dates — that makes files findable.
Step 4: Put HTTPS in Front Before the First Document
Paperless stores sensitive documents in readable form, so the web interface must never face the internet on plain HTTP, and port 8000 should never be world-open. Bind the published port to 127.0.0.1 so only your reverse proxy can reach it, terminate TLS at the proxy, and open only 443 in the firewall. Create the DNS record for a hostname such as docs.example.com first so the certificate issues cleanly. Our guide on how to secure your VPS covers the baseline — SSH keys, firewall, automatic updates — to have in place first.
Then log in over HTTPS and do the unglamorous hardening: a strong unique password, the separate non-superuser account for daily use, and a test document uploaded through the web UI to confirm OCR, tagging and search work end to end.
Step 5: Feed It Documents — Consume Folder, Upload, Email
Paperless accepts documents three ways. The consume folder is the workhorse: anything dropped into it — by a scanner saving to a share, a sync tool, or a script — is picked up, OCR-processed and filed automatically. Web upload suits one-off documents. Email import can watch a mailbox and file attachments as they arrive, turning “email the receipt to the archive” into a habit that happens.
The feature that makes the archive compound in value is matching: Paperless learns from documents you correct, and rules you define can auto-assign tags, correspondents and document types — every electricity letter filed the same way, every invoice tagged for tax season. Spend the first weeks correcting its guesses in the inbox view; search by any word inside any document does the rest.
Step 6: Backups and Updates — the Archive Is the Point
Back up both stores, together: the media files and the database, plus your Compose files and env file with the secret key. A media-only backup gives you PDFs with no tags or search index; a database-only backup gives you a perfect catalogue of documents you no longer have. Paperless also ships a document exporter that writes a portable copy of the archive with its metadata — schedule it, copy the export off the server, and test a restore before trusting it. Our guide on how to back up your VPS covers the automation pattern.
Updates follow the Compose rhythm — docker compose pull, then docker compose up -d — with two disciplines: back up first, and read release notes before a major-version jump. Paperless-ngx has shipped breaking changes between major lines before, including stricter secret-key and database-engine requirements, so treat a major upgrade as a small project with a rollback plan. Never run docker compose down -v on production: the -v deletes the volumes your archive lives in.
FAQ
What size VPS do I need for Paperless-ngx?
The project publishes no official minimum RAM figure. Plan on 2 vCPUs and 2 GB of RAM as the floor and 4 GB as the comfortable size, with SSD storage from about 20 GB plus archive growth. OCR bursts and bulk imports size the server, so step up in CPU if you scan daily.
Should I use SQLite or PostgreSQL?
PostgreSQL, for any archive you intend to keep. The project’s setup guidance recommends PostgreSQL for new installations; SQLite is the try-it-out option and becomes the bottleneck as workers, users and documents multiply. Choose on day one — migrating later is a project, not a toggle.
Do I need the Tika and Gotenberg services?
Only if you want Paperless to ingest Office documents (Word, Excel, PowerPoint) and convert them for archiving. The -tika Compose variants add Tika for text extraction and Gotenberg for PDF conversion. A PDF-and-scans archive does not need them.
Why is my consume folder being ignored?
Usually one of three causes: the container user cannot write to the folder (check USERMAP_UID/USERMAP_GID), the folder sits on a filesystem without inotify such as NFS (enable PAPERLESS_CONSUMER_POLLING), or the Compose path does not point where you think it does. Check the consumer logs first.
What exactly do I back up?
The document files in media, the database, the data directory with the search index, and your Compose plus env files including the secret key — copied off the server, on a schedule, with a tested restore.
Can I expose Paperless directly on port 8000?
You can, and you should not. The archive holds readable copies of your most sensitive documents. Bind 8000 to localhost, put an HTTPS reverse proxy in front, open only 443, and use strong unique passwords.
The Bottom Line
Self-hosting Paperless-ngx on a VPS is a Docker Compose job with four decisions made correctly up front: a server sized for OCR rather than idle (2 vCPUs, 4 GB of RAM comfortable, SSD with room to grow), PostgreSQL chosen on day one because the project recommends it and migration later is painful, the settings that decide behaviour — secret key, public URL, OCR language, timezone, file ownership — set before the first import, and HTTPS in front with port 8000 bound to localhost. After that, the system rewards routine: feed the consume folder, correct its filing guesses for a few weeks, back up documents and database together with a tested restore, and read release notes before major upgrades. Do those things and a shoebox of paper becomes an archive you can search by any word, from anywhere, on infrastructure you control.
Sources: Paperless-ngx official documentation (Setup, docs.paperless-ngx.com/setup/), checked December 5, 2026: Docker Compose routes recommended over bare metal, PostgreSQL for new installations, -tika variants for Office documents, port 8000, USERMAP_UID/GID, PAPERLESS_CONSUMER_POLLING, superuser warning, and the PAPERLESS_SECRET_KEY / URL / OCR_LANGUAGE / TIME_ZONE settings. Current deployment guides checked the same day for practical sizing and the three-file Compose layout. No VPS prices are quoted; verify pricing on your provider’s own page before ordering.



Leave a Reply