Paperless-ngx Setup: Make Your Paperwork Searchable, Step by Step
You need an invoice, you know roughly who sent it, and you still end up opening three folders and two inboxes. With Paperless-ngx you type one word and the document shows up. In this guide you set up Paperless on your own computer at home, from a fresh Ubuntu to the first letter you find again. You don’t need to know Docker.
Quick summary
- Paperless-ngx is a free open-source program, which means its code is public. It collects your letters, invoices and contracts, reads the text in them and makes everything searchable. You use it in your browser.
- Reading the text is called OCR (optical character recognition). It turns the photo of a letter into text you can search.
- Paperless runs on your own computer. You need no cloud storage and no AI for this guide.
- This is for households, and for freelancers who want to find their receipts faster. If you use it for tax records, read the section on that before you throw paper away.
- You need a computer running Ubuntu that can stay on, and some patience the first time. You copy commands into a window and answer a few questions.
What you need
- A computer that is always on and can run Docker. A mini PC, an old desktop or a laptop will do. Docker starts programs in ready-made packages called containers. The database and the text recognition are already inside these packages, so you don’t install them one by one.
- Ubuntu as the operating system. All commands here are written for Ubuntu 24.04 LTS or 26.04 LTS, and the desktop version is the easiest. LTS stands for long-term support: this version gets updates for an especially long time. You can download it from ubuntu.com. Careful: installing Ubuntu from scratch normally erases the drive. Use a computer that has nothing important left on it.
- An internet connection for the installation and for updates.
- A smartphone for scanning. A document scanner is more convenient, but you don’t need one to start.
- A USB drive or another place to keep your backup.
This guide doesn’t cover Windows, macOS or ready-made NAS systems (network storage), because the steps look different there. If you don’t have a server yet, meaning a computer that stays on and works for your other devices, the Homelab Beginner Guide helps you pick one. If you already have an Ubuntu server without a screen, run the same commands over SSH. That’s a text connection from another computer.
A fresh test install following this guide used about 620 MB of memory (RAM) when idle, with a single document in it. My own full installation with an AI index (a search aid for the AI), database and converters for Office files uses 1.9 GB. Your number depends on things like how many documents are processed at the same time, and Ubuntu needs some memory too. The installation page of the Paperless docs gives no minimum. For a Raspberry Pi, a very small computer, it recommends some lighter settings and warns that some things can be slow there.
Why the install script?
The official docs list several ways to install Paperless and recommend the install script for most people. A script is a text file with commands that the computer runs one after another. At the end you have a normal Docker Compose installation. Docker Compose starts several containers together, the way a file describes them.
The script is easier to follow for beginners because it downloads the right files, creates your login and generates a random PAPERLESS_SECRET_KEY. Paperless uses this key to protect your login, among other things. Since version 3 it is required, and Paperless won’t start without it. This guide is based on Paperless-ngx 3.5.1, the current version in November 2026.
Step 1: Prepare the computer
Turn off automatic suspend (sleep) in Ubuntu’s power settings. While the computer sleeps, you can’t reach Paperless. Then open the terminal with Ctrl+Alt+T. Paste commands into this window with Ctrl+Shift+V and press Enter. Paste the lines below one at a time, and wait for a new prompt (the line where you can type again) before you continue. sudo at the start of a line means the command runs with administrator rights. Ubuntu then asks for your password and shows nothing while you type.
sudo apt update
sudo apt install -y ca-certificates curl wget nano
hostname -I
The first two lines install small helper programs. The third shows your computer’s IP addresses, which are its addresses on your home network.
You should see: a line at the end with an address made of four numbers, for example 192.168.1.50. That address is only an example throughout this guide, so always use your own. Set your router to give this computer the same address every time. Depending on the router, the option is called “static IP address” or “DHCP reservation”.
Step 2: Install Docker
You install Docker from its official package source, as described in the Docker docs for Ubuntu. On a freshly installed Ubuntu you can use the blocks as they are. If Docker was ever installed on this computer, read the section “Uninstall old versions” in the docs first. Type sudo -v and enter your password, so that Ubuntu doesn’t ask for it in the middle of the next block. The block tells Ubuntu about the package source. Copy all of it, paste it in one go and press Enter:
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt update
You should see: download.docker.com in the output and no error message. Now install Docker and allow your user to use it:
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER
The second line adds you to the group docker. According to the Docker docs, anyone in this group has the same rights as an administrator, so only do this for your own user. Restart the computer once so the group takes effect. Open the terminal again and check both:
docker run --rm hello-world
docker compose version
You should see: a text with “Hello from Docker!” and below it a version number for Docker Compose. If it says “permission denied”, the group isn’t active yet. Restart the computer once more.
Step 3: Install Paperless
You download the official script, take a quick look inside if you like, and start it. Don’t use sudo here, because the script stops if you run it as administrator. Paste the four lines one at a time:
cd ~
curl -fsSL -o install-paperless-ngx.sh https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/install-paperless-ngx.sh
less install-paperless-ngx.sh
bash install-paperless-ngx.sh
cd ~ takes you to your personal folder. less shows you what’s in the script, and the Q key gets you back out. Press Q before you paste the last line. That line starts the script, which asks you the questions below. The text in square brackets is the suggestion, and you accept it by pressing Enter.
| Question in the script | Your answer |
|---|---|
| URL | Enter (leave it empty, you’ll use the IP address) |
| Port | Enter (8000). A port is like the door number a program answers at. |
| Current time zone | your own, for example America/New_York. If the suggestion is already right, press Enter. |
| Database backend | Enter (postgres, the PostgreSQL database) |
| Enable Apache Tika? | Enter (no). You only need Tika for files from Word, Excel or PowerPoint. |
| OCR language | Enter (eng, English). See the note below for other languages. |
| User ID and Group ID | Enter twice |
| Target folder | Enter (the folder paperless-ngx in your personal folder) |
| Consume folder | Enter (the import folder) |
| Media, Data and Database folder | Enter three times (Docker manages these folders itself) |
| Paperless username | the login name you want |
| Paperless password | the same long password twice, nothing shows while you type |
| Enter (Paperless doesn’t need a real address here) | |
| Press any key to install | Enter |
The OCR language should be the one most of your documents are written in. You can combine languages with a plus sign: deu+eng, for example, stands for German and English. The Paperless package already includes English, German, French, Italian and Spanish. For any other language, enter its code from the list of the text recognition program Tesseract. The script then adds that language to the settings, and Paperless installs it when it starts. According to the docs, several languages cost much more computing time, so only add what you need.
Now the computer downloads the containers, which takes a few minutes depending on your connection. The script is done when you get a new prompt. Check the result:
cd ~/paperless-ngx
docker compose ps
You should see: three lines with the services broker, db and webserver. The broker hands out jobs such as text recognition, db is the database, and the webserver shows you the interface. After a short while it says (healthy) behind webserver. If it still says (health: starting), wait a minute and run the command again.
Step 4: Log in for the first time
Open http://192.168.1.50:8000 in your browser, with your own IP address. On the Paperless computer itself, http://127.0.0.1:8000 works too. Sign in with the login from step 3.
You should see: the start page with the greeting “Paperless-ngx is running!” and the button “Start the tour”. Paperless uses the language of your browser. To change it, click “Settings” and choose a different language for “Display language” under “General”. Save and reload the page.
Your first user is a superuser and can see and change everything. For other people in your household, create separate accounts without admin rights under “Users & Groups”.
Step 5: Upload your first document and find it again
Use something harmless for the test, such as an old invoice as a PDF. Drag the file anywhere into the Paperless window, or click “Upload” at the top. Paperless reads the text, creates a searchable PDF for scanned pages and keeps the original as well.
You should see: first “Processing document…”, then “Finished.” The file appears under “Documents”. Open it and click the “Content” tab, where you find the recognized text. Check that names and amounts are right.
Now try the search. Go to “Documents”, find the search field set to “Title & content” and type a word from the document, such as “liability”. Only documents with this word stay in the list. Adding more words narrows the search further.
Step 6: Create a few tags, correspondents and types
A tag is a label, and a document can have several of them. The correspondent is the sender or recipient, for example your health insurer. The document type says what it is, for example an invoice or a contract. You find all of them in the left sidebar under “Manage” and “Attributes”.
- For tags, New, Deadline, Taxes, Insurance, Home and Health are enough to start with.
- For document types, Invoice, Contract, Official notice and Letter are enough.
- Create a correspondent only when you have a second document from the same sender.
Under “Tags”, click “Create”. For the tag New, check the box “Inbox tag”. Every new document then gets this tag automatically, and you remove it once you have checked the document. Under “Matching algorithm” you can leave “Auto: Learn matching automatically”. Paperless then learns from the documents you have checked and assigns similar ones itself. Documents that still have an inbox tag don’t count. Document types and correspondents are created the same way.
You should see: on your next upload, New is already attached to the document, and the start page counts it under “Documents in inbox”. Keep the lists small. In my installation an old AI add-on had created 923 tags over time, and searching had become useless. Now there are 17 tags for broad areas of life, plus New and Deadline.
Step 7: Scan with your phone
To start, the browser on your phone is enough: scan the letter as a PDF with your scanning app, open the Paperless address on your Wi-Fi and tap the upload button. A dedicated app is more convenient. As the server, enter the address from step 4, so http://192.168.1.50:8000 with your IP, plus your login and password.
iPhone: Swift Paperless or Paperparrot
Swift Paperless is free in the App Store and needs iOS 17 or later (version 1.10.4 in November 2026). You can scan right in the app. According to its release notes (the list of changes), it has been adapted to Paperless 3 since version 1.10. Allow access to the local network on first launch, otherwise it can’t find your computer.
Paperparrot runs on iOS 16 and later and scans with the camera or with a compatible network scanner. According to the App Store, the free version is limited to six documents. After that you need a purchase or a subscription in the app. The project page also lists an open login bug in version 3.2.2 that can hit new users on Paperless 3. The developer says it is fixed in the test version and that the App Store version will follow. Start with Swift Paperless for now.
Android: Paperless NGX Uploader
One of the apps listed in the Paperless-ngx wiki is Paperless NGX Uploader. The Paperless team points out there that it doesn’t explicitly endorse or support the apps on the list. The uploader is free in the F-Droid app catalog (version 1.8.5, Android 10 or newer). It doesn’t scan by itself: you scan with a scanning app and send the PDF to the uploader with “Share”.
The better-known app Paperless Mobile has open bug reports with Paperless 3 in its Play Store version 4.5.0. Before you install it, check whether there’s an update by now.
You should see: shortly after you send it, the scan is in Paperless under “Documents”. Take the picture straight from above in good light, with no shadow on the page, and the text recognition has an easier job.
Step 8: Import invoices from your email inbox
Paperless can check a mailbox and import attachments. It needs the IMAP details of your email provider for this. IMAP is the method mail apps use to fetch your email. You’ll find the server and port in your provider’s help pages. A separate mailbox just for invoices is best. Paperless stores the login details, and with a separate mailbox it never gets to see your private mail.
Click “Mail” on the left, then “Add Account”:
- Name: for example Invoices
- IMAP Server:
imap.example.com(placeholder) - IMAP Port: usually
993, IMAP Security: SSL - Username and Password of the mailbox
Click “Test”. You should see: “Successfully connected to the mail server”. Save the account and click “Add Rule” below it:
- Name: for example PDF invoices
- Account: Invoices, Folder:
INBOX - Maximum age (days):
30 - Filter subject:
Invoice - Attachment type: “Only process attachments”
- Include only files matching:
*.pdf - Action: “Flag the mail, don’t process flagged mails”
The action keeps the same email from being processed twice. The default is “Mark as read, don’t process read mails”. With that one, Paperless skips every email you have already opened, so the flag is more practical. Because of the subject filter, only emails with “Invoice” in the subject come in. For senders who write “Receipt” instead, create a second rule.
After saving, click “Process Mail” next to the account. Otherwise Paperless checks by itself every ten minutes. You should see: the PDF is under “Documents”, and the email is flagged in your mail program.
Gmail and Outlook.com work a little differently. With Gmail, you need an app password for this method, an extra password just for Paperless, and you only get one if 2-Step Verification is turned on. Outlook.com has not accepted passwords for IMAP since September 2024, according to Microsoft. There, signing in works through OAuth, which means you grant access in your Microsoft account. That setup takes more work and is described in the Paperless wiki.
Step 9: Set up a backup
Don’t throw away any paper before you finish this step. Your documents are in storage areas that Docker manages, called volumes. Copying only the paperless-ngx folder is therefore not enough. The program document_exporter writes all documents and the database into a ZIP file:
cd ~/paperless-ngx
docker compose exec -T webserver document_exporter ../export --zip
ls -lh export
You should see: a file like export-2026-11-25.zip with today’s date. It is in ~/paperless-ngx/export. Paperless also prints a notice that sensitive fields are stored in readable form because you set no passphrase (an additional password). The ZIP contains your documents and the mail password without encryption. Store it with that in mind, ideally on an encrypted drive.
Next, use the file manager to copy the whole paperless-ngx folder to a USB drive, and keep the drive somewhere else. Besides the export, the folder contains docker-compose.yml, docker-compose.env and the hidden file .env. You need these three to restore. Also write down which Paperless version you’re running. You’ll find it at the bottom of the left sidebar. According to the docs, an export can only be restored into the same version.
To run the export automatically every week, open your cron list with crontab -e. Cron starts commands at set times. If Ubuntu asks for an editor, choose nano, a simple text editor in the terminal. Add this line at the very bottom and save with Ctrl+O, Enter and Ctrl+X:
0 3 * * 0 cd $HOME/paperless-ngx && docker compose exec -T webserver document_exporter ../export --zip --no-progress-bar
You should see: crontab -l shows the line, and after Sunday at 3 a.m. there’s a new ZIP in the folder. You delete old ZIPs yourself. Copying to the USB drive is still a manual job, so put it in your calendar.
How to restore a backup
Test this once on a second computer. Your user should have the same name there, because the path to the import folder is written in the file docker-compose.yml.
- Install Docker as in steps 1 and 2 and copy the saved folder into your personal folder, so that it is at
~/paperless-ngxagain. - Open the file with
nano ~/paperless-ngx/docker-compose.yml. In the lineimage: ghcr.io/paperless-ngx/paperless-ngx:latest, replace the wordlatestwith the version you wrote down, for example3.5.1, and save. - Start it with
cd ~/paperless-ngxand thendocker compose up -d. Wait untildocker compose psshows(healthy)for the webserver. Don’t create a user, because the import should go into an empty installation. - Load the export with the command below and change the date to match your file.
cd ~/paperless-ngx
docker compose exec webserver document_importer ../export/export-2026-11-25.zip
You should see: at http:// plus this computer’s address, with :8000 at the end, you can sign in with your old login and find your documents. If it was only a test, stop the copy right away with docker compose down. It took over your mail rules too and would check the same mailbox. After a real restore, sign in again in the phone apps, because according to the docs their access keys (API tokens) are not part of the export.
Step 10: Access Paperless away from home
Don’t set up port forwarding in your router, or the login page is reachable from the entire internet. Paperless stores its contents unencrypted. The developers call a local server at home with backups the safest way to run it. For access on the go, use a VPN, an encrypted tunnel between your own devices. An easy option is Tailscale, a VPN service where you sign in with the same account on every device:
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
tailscale ip -4
The second command shows a link. Open it in the browser and sign in. The third shows the computer’s Tailscale address, which starts with 100. Then install the Tailscale app on your phone and sign in with the same account. In the Tailscale device list, open the three-dot menu next to the Paperless computer and choose “Disable key expiry”. Otherwise the sign-in runs out after a while, by default after 180 days.
You should see: with Wi-Fi turned off, http://100.x.y.z:8000 opens your Paperless login on the phone. Replace 100.x.y.z with the address you were shown. Enter it as the server in the scanning app too, and uploads work at home and on the go as long as Tailscale is on. Also turn on “Two-factor Authentication” under “My Profile”. You then enter a code from an app in addition to your password.
Install updates
First make a backup as in step 9 and take a quick look at the release notes. Then:
cd ~/paperless-ngx
docker compose down
docker compose pull
docker compose up -d
You should see: after a short while docker compose ps shows the webserver as (healthy) again, and the new version number is at the bottom left of the interface. Never add -v to docker compose down. That would delete the volumes with your documents.
For freelancers: tax records
Scanning and keeping records for taxes is regulated differently from country to country, and Paperless alone does not make your records compliant. Keep your originals, and ask your accountant what you have to keep and in which form before you throw any paper away. This section is not legal or tax advice.
Common problems
- “Do not run this script as root”: you started the script with
sudoor as root (administrator). Start it as a normal user. - “permission denied” with Docker commands: your user isn’t in the
dockergroup yet. Runsudo usermod -aG docker $USERagain and restart the computer. - “port is already allocated” or “address already in use”: port 8000 is taken. Open the file with
nano ~/paperless-ngx/docker-compose.yml, change"8000:8000"to"8010:8000"and save. In the folder~/paperless-ngx, start it withdocker compose up -dand use:8010in the address from then on. - The webserver keeps restarting: look at the latest messages with
docker compose logs --tail 50 webserver. If they mention the secret key, the linePAPERLESS_SECRET_KEY=with a long random value is missing indocker-compose.env. - The page doesn’t open on your phone: check that the phone is on the same Wi-Fi (not the guest network), that the address starts with
http://and that the computer is awake. - Words in another language are read wrong: the line
PAPERLESS_OCR_LANGUAGEindocker-compose.envhas to include that language, for examplePAPERLESS_OCR_LANGUAGE=deu+engfor German and English. Open the file withnano ~/paperless-ngx/docker-compose.env, change the line and save. Then rundocker compose up -din the folder~/paperless-ngx, open the document and choose “Reprocess” in the “Actions” menu, so it gets read again. A language outside the five included ones also needs a line withPAPERLESS_OCR_LANGUAGES, as described in the Paperless docs. - A document is there twice: since version 3, Paperless no longer rejects duplicates. The document then has a “Duplicates” tab.
- The mail rule imports nothing: check the subject, the age and whether the email was already flagged. “View Processed Mail” next to the rule shows you what Paperless already knows.
- Forgot your password: with
docker compose exec webserver createsuperuserin the folder~/paperless-ngxyou create a second superuser with a different name. Use it to reset the first one’s password under “Users & Groups”.
What’s next
Collect documents for a few weeks first and check them by hand, so you see whether your tags fit. If sorting starts to annoy you at some point, an AI in Paperless 3 can suggest the title, tags, correspondent and document type. Unless you use a local model, the contents of your documents go to the AI provider, and you need more RAM for the AI jobs. The next guide shows you how to set this up with Claude without getting new tags: Paperless-ngx AI: Auto-Tag Documents with Claude.
Did this guide help you? You can buy me a coffee on Ko-fi. It keeps MappleBox ad-free.