On this page
- How large a server does Paperless-ngx need?
- How do you download the official Compose files?
- Which settings should you change?
- How do you start it and create the admin user?
- How do you add HTTPS with Caddy?
- How do documents get into Paperless-ngx?
- How do you configure outgoing mail?
- How do you back up and upgrade?
- Why is a document stuck or unreadable?
- Questions
How large a server does Paperless-ngx need?
Plan on at least 2 GB of memory, because OCR with Tesseract and the background workers are the heavy part. With the optional Tika and Gotenberg containers, which convert Office files and emails, 4 GB is the realistic minimum. Disk matters as much as memory: every document is kept as an original plus an archived PDF/A copy and a thumbnail, so budget roughly double the size of what you scan.
Use Ubuntu 24.04, Ubuntu 22.04, Debian 12 or Debian 13 with Docker Engine and the Compose plugin installed; the Docker Engine tutorial walks through it. Create a DNS record such as paper.example.net before you start.
How do you download the official Compose files?
The project keeps ready-made Compose files in its repository. The PostgreSQL variant is a good default.
mkdir -p ~/paperless && cd ~/paperless
base=https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/docker/compose
curl -fsSL -o docker-compose.yml $base/docker-compose.postgres.yml
curl -fsSL -o docker-compose.env $base/docker-compose.env
curl -fsSL -o .env $base/.env
ls -laFor Office documents and .eml files, pick docker-compose.postgres-tika.yml instead; it adds the converter containers. The project also offers an interactive install script that writes these files for you, but downloading them directly shows exactly what will run.
Which settings should you change?
Edit docker-compose.env and set at least these values:
PAPERLESS_URL=https://paper.example.net
PAPERLESS_SECRET_KEY=paste-output-of-openssl-rand-hex-40
PAPERLESS_TIME_ZONE=Europe/Amsterdam
PAPERLESS_OCR_LANGUAGE=eng
PAPERLESS_OCR_LANGUAGES=deu fra
USERMAP_UID=1000
USERMAP_GID=1000PAPERLESS_OCR_LANGUAGE is the language Tesseract reads by default (combine several with a plus sign, such as eng+deu), while PAPERLESS_OCR_LANGUAGES installs extra language packs at container start. Match USERMAP_UID to the output of id -u so files in the consume and export folders belong to you.
Next, open docker-compose.yml and change the web port mapping so it listens only locally:
ports:
- "127.0.0.1:8000:8000"Docker-published ports bypass UFW, so a loopback binding is what actually keeps the app private until the proxy is ready.
How do you start it and create the admin user?
Pull, start, then add a superuser.
docker compose pull
docker compose up -d
docker compose ps
docker compose run --rm webserver createsuperuser
docker compose logs -f webserverThe first start takes a minute while migrations run. A quick check from the server itself:
curl -sI http://127.0.0.1:8000 | head -n 1The version appears in the web interface under the help or about menu after you sign in.
How do you add HTTPS with Caddy?
Install Caddy from its official repository as shown in Caddy HTTPS, then add this block to /etc/caddy/Caddyfile:
paper.example.net {
reverse_proxy 127.0.0.1:8000
}sudo systemctl reload caddy
sudo ufw allow 80/tcp
sudo ufw allow 443/tcpCaddy has no small default upload limit and passes the WebSocket connection that drives the live upload status bar. If you run Nginx instead, raise client_max_body_size and forward the upgrade headers; the reverse proxy guide has the pattern.
How do documents get into Paperless-ngx?
There are several intake paths, and you can mix them:
- Web upload: drag files onto the dashboard.
- Consume folder: anything placed in
~/paperless/consumeis imported and then removed. Combine this with an SFTP account or a sync tool so a scanner or laptop can drop files there. - Mail fetching: under Mail in the settings you can add an IMAP account and rules that import attachments from matching messages.
- Mobile apps: community apps talk to the REST API with a token from your profile.
Tags, correspondents and document types can be assigned automatically. Start with the automatic matching algorithm and correct a few documents by hand; Paperless-ngx learns from those corrections.
How do you configure outgoing mail?
Outgoing mail is used for password resets and for sending documents by email from the interface. Port 25 should not be part of the plan (ask support with a ticket before relying on it); send through an authenticated relay on port 587 instead, as set out in the SMTP relay guide.
PAPERLESS_EMAIL_HOST=smtp.relay.example.net
PAPERLESS_EMAIL_PORT=587
PAPERLESS_EMAIL_HOST_USER=paper@example.net
PAPERLESS_EMAIL_HOST_PASSWORD=relay-password
PAPERLESS_EMAIL_USE_TLS=true
PAPERLESS_EMAIL_FROM=paper@example.netAdd these to docker-compose.env and recreate the containers with docker compose up -d.
How do you back up and upgrade?
The built-in exporter writes every document plus a manifest of tags and metadata into the mounted export folder, which is the format the project recommends for backups and migrations.
cd ~/paperless
docker compose exec -T webserver document_exporter ../export
ls export | headSchedule it nightly with cron and copy the folder off the server, for example with rclone. To restore on a fresh install, use document_importer on the same folder.
Upgrades are a pull and restart:
docker compose pull
docker compose up -d
docker image prune -fRead the changelog before each jump; database migrations run on start, and a major PostgreSQL upgrade needs a dump and restore of its own.
Why is a document stuck or unreadable?
- Nothing happens after upload: check
docker compose logs webserver; the consumer runs in the same container and reports OCR errors there. - Poor OCR results: scan at 300 dpi and make sure the correct language pack is listed in
PAPERLESS_OCR_LANGUAGE. - Consume folder ignored: the files belong to another user, so the container cannot read or delete them. Fix ownership or
USERMAP_UID. - CSRF error at login:
PAPERLESS_URLdoes not match the address in the browser. - Out of memory: lower
PAPERLESS_TASK_WORKERSto 1 or move to a larger plan.
More self-hosted ideas live on the self-hosting page.
Plans that fit this guide
Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.
Questions about Paperless-ngx documents
Is Paperless-ngx the same as Paperless?
It is the community-maintained continuation of the original Paperless and Paperless-ng projects, and it can import their data.
Can it read Word and Excel files?
Yes, when you use the Compose variant with Tika and Gotenberg. Plan for 4 GB of memory with those containers.
Where are my documents stored?
In Docker volumes for media and data, with originals and archived PDFs side by side. The exporter gives you a plain folder copy that does not depend on Docker.
Can several people share one instance?
Yes. Create users and groups in the admin area and set owners and permissions per document or by rule.
Does it need a GPU for OCR?
No. Tesseract runs on the CPU. More vCPUs simply shorten the time per page when you import a large batch.
More in Self-hosted apps
- Nextcloud on Nginx
- ownCloud Infinite Scale
- Seafile file sync
- Vaultwarden password vault
- Passbolt team password manager
- Gitea Git hosting
- Forgejo Git server
- GitLab Community Edition
- Gogs Git service
- Wiki.js
- BookStack documentation
- Outline knowledge base
- n8n workflow automation
- Activepieces automation
- Plausible Analytics (Community Edition)
- Umami analytics
- Mattermost team chat
- Matrix Synapse with Element
- Jitsi Meet video calls
- ONLYOFFICE Docs with Nextcloud
- HashiCorp Vault secrets server
- OpenBao secrets management
- Infisical secrets manager
- Authelia SSO and forward auth
- Zitadel identity platform
- VS Code in the browser (code-server)
- Joplin Server for notes sync
- Firefly III personal finance
- Snipe-IT asset tracking
- Odoo ERP on Ubuntu or Debian
- ERPNext with frappe_docker
- Dolibarr ERP and CRM with Nginx
- Penpot design tool with Docker
- Planka kanban boards
- Leantime project management
- Wekan boards with Docker
- Cal.com scheduling
- Chatwoot support inbox
- Mautic marketing automation
- DocuSeal document signing
- Metabase dashboards
- Appwrite backend server
- Self-hosted Supabase
- PocketBase backend
- RustDesk relay server
- Traccar GPS tracking
- Redmine project tracker
- The Lounge IRC client
- CyberChef data toolbox
- Typebot chat forms
- AFFiNE workspace
- Overleaf Community Edition
- Neko shared virtual browser
- imgproxy image resizing
- NetBox network inventory
- UVdesk help desk
- YetiForce CRM