Skip to content

How to Set Up Papra on a Linux Server – Self-Host a Lightweight Document Archive

Install Papra as a One-Click App or with Docker Compose, securely disable registration, and archive documents with tags and full-text search.

1 December 202611 min read0 Views0 helpful

Introduction

Papra is a lightweight, open-source document management system (AGPL-3.0) for invoices, contracts, official notices, and scans. Upload files in your browser, organize them with tags, and find them again with full-text search, including in scanned PDFs and photos whose text Papra extracts using optical character recognition (OCR). Papra consists of a single container with an SQLite database, so it requires little memory.

In this guide, we’ll show you two ways to get started: the easy way using your VPS’s One-Click Apps, and a manual installation with Docker Compose. Then you’ll learn how to import, organize, and find documents.

When Papra makes sense on a VPS

  • A paperless archive for you or your family: Invoices, warranty receipts, and contracts are all in one place and searchable from any device.
  • A small office or club: Use organizations and members to separate, for example, personal and business documents, or share an archive with others.
  • Data under your control: Your documents are stored on your server instead of with a cloud provider.
  • Low resource requirements: Papra runs with just 512 MB of RAM, so it can also fit on a small VPS alongside other services.

Papra is less suitable if you need mature automatic classification of correspondents, document types, and storage paths, or workflows with lots of rules. Paperless-ngx is built for that.

Papra or Paperless-ngx?

Both programs are available as One-Click Apps. Your choice mainly depends on how much automation you need:

PapraPaperless-ngx
Architecture1 container, SQLiteMultiple containers (web server, database, Redis)
MemoryFrom 512 MB, 1 GB recommendedFrom 1 GB, 2 GB recommended
OrganizationTags, tagging rules, optional AI taggingTags, correspondents, document types, storage paths, learning-based classification
Multiple archivesOrganizations with membersPermissions for each document and user
Getting startedVery quick, few settingsMore to learn, but more powerful

Papra is enough for a well-organized archive with search. See How to Set Up Paperless-ngx on a Linux Server for instructions on setting up Paperless-ngx.

The easy way: Papra as a One-Click App

The fastest way to get Papra is through your VPS’s One-Click Apps. ZapX sets up the domain, HTTPS, and your administrator account for you, so you won’t need the console.

Requirements

  • A VPS running Debian or Ubuntu with One-Click Apps set up. See How to Set Up One-Click Apps for instructions.
  • At least 512 MB of free memory for Papra; 1 GB is recommended. Your documents will determine how much storage space you need.

Install

  1. Open your VPS in the ZapX dashboard and switch to the One-Click Apps tab.
  2. Search for Papra in the App catalog and click Install app.
  3. Leave Use a custom subdomain or zap.cloud enabled and choose an address. Papra will be available over HTTPS at that domain.
  4. Open App configuration and enter the email address you want to use to sign in for PAPRA_ADMIN_EMAIL. If you leave the field empty, your account will be named admin@example.com. Leave PAPRA_REGISTRATION_ENABLED set to false.
  5. Click Queue installation. After a few minutes, Papra will be ready in your list of installed apps.
FieldRequiredDefault valueDescription
PAPRA_ADMIN_EMAILNoadmin@example.comEmail address for your administrator account; only applies during the initial installation
PAPRA_REGISTRATION_ENABLEDNofalseSet to true to allow new accounts to register
Info: Choose your email address carefully

Your email address is your username and can’t be changed in Papra later. It must look like a real address (the dialog rejects endings such as .local), but it doesn’t need to be reachable because Papra won’t send emails to it.

First login: find your credentials

Once the app is running, its card will show the Login notice: your credentials were generated during installation and are available in the app environment.

  1. Click the gear icon on the app card and switch to App environment.
  2. Under Automatically generated values, find your administrator account password next to SERVICE_PASSWORD_PAPRAADMIN.
  3. Open Papra using the app card’s Access link, then sign in with the email address from PAPRA_ADMIN_EMAIL and this password.
  4. During your first login, set your organization’s name. You can then upload documents.

Your account is also the instance administrator. Select Admin in the top-right corner to see all accounts on your server.

Papra automatically displays its interface in your browser’s language. Then, under User settings, enable Two-Factor Authentication. Set your own password using Forgot password? on the sign-in page: Papra doesn’t send emails, but instead writes the password reset link to the app’s Logs, which you can open from the app card. The value in the app environment will no longer apply.

Info: Installed Papra before 2026-12-01?

With older installations, you registered your account yourself at the time. After an App update, the app card will show the Login notice with the generated credentials, but they won’t work for you: sign in as usual with your own account. The registration setting remains unchanged. So check the PAPRA_REGISTRATION_ENABLED value in the App environment and set it to false if you don’t want anyone else to register.

Create additional accounts

Registration is disabled in the One-Click App, so nobody can create an account on your instance. If you want someone else to use Papra:

  1. In the App environment, set PAPRA_REGISTRATION_ENABLED to true and click Save. The app will then restart.
  2. Ask the person to click Register at your Papra address and create an account.
  3. Immediately set PAPRA_REGISTRATION_ENABLED back to false and click Save.
  4. In Papra, go to Members and use Invite member to add the new account to your organization.
Warning: Don’t leave registration open

While registration is open, anyone visiting your domain can create an account and upload files to your server. Only open registration for the few minutes someone needs to sign up.

Updates and backups

To check for an update, open the app’s settings (gear icon), go to App update, and click Check for updates. If a new version is available, install it with Apply update. Your documents and accounts will be preserved, and Papra will apply database changes itself when it starts.

The database and documents are stored in the app’s volume. Back it up regularly, for example using your VPS backups or the console, as described below in the “Back up your data” section of the manual installation instructions. Find the volume name with docker volume ls | grep papra.

Manual installation

If you’d like to set up Papra yourself using the console, for example alongside other services on an existing server, follow these steps. They’re based on the One-Click App recipe and the official Papra Docker Compose guide.

Requirements

  • A VPS running Debian or Ubuntu with root access via SSH.
  • Docker with the Compose plugin. See How to Set Up Docker for instructions on installing Docker.
  • A domain or subdomain for HTTPS access, with an A record pointing to your server’s IP address.
ResourceMinimumRecommended
CPU cores12
Memory512 MB1 GB
Storage space2 GB20 GB or more, depending on the number of your documents

Papra itself uses few resources. Your documents take up most of the space, while OCR of scanned pages briefly requires more CPU and RAM.

Prepare the firewall

Papra shouldn’t be exposed directly to the internet; it should only be accessible through the reverse proxy. So only open SSH, HTTP, and HTTPS. For more information about ufw, see Firewall Management on Linux.

Code
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
Warning: Docker bypasses ufw

Ports published in a Compose file without an IP address ("1221:1221") are reachable from the internet despite ufw. So bind Papra to 127.0.0.1 as shown below.

Install with Docker Compose

Create a directory and generate the auth secret Papra uses to sign sessions:

Code
mkdir -p /opt/papra && cd /opt/papra
echo "AUTH_SECRET=$(openssl rand -hex 48)" > .env
echo "AUTH_IS_REGISTRATION_ENABLED=true" >> .env
chmod 600 .env
nano compose.yaml

Add this content and replace papra.example.com with your domain:

Code
services:
  papra:
    image: ghcr.io/papra-hq/papra:26.7.1-rootless
    restart: unless-stopped
    ports:
      - "127.0.0.1:1221:1221"
    environment:
      - APP_BASE_URL=https://papra.example.com
      - AUTH_SECRET=${AUTH_SECRET}
      - AUTH_IS_REGISTRATION_ENABLED=${AUTH_IS_REGISTRATION_ENABLED}
      - AUTH_IP_ADDRESS_HEADERS=x-forwarded-for
      - DOCUMENTS_OCR_LANGUAGES=deu,eng
    volumes:
      - papra-data:/app/app-data
    healthcheck:
      test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:1221/api/ping').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 30s

volumes:
  papra-data:

The most important lines:

  • ghcr.io/papra-hq/papra:26.7.1-rootless is a fixed version. The rootless image runs without root privileges inside the container.
  • 127.0.0.1:1221:1221 makes Papra accessible only from the server itself. External access is only possible through the reverse proxy.
  • APP_BASE_URL is the address Papra will be available at. Papra uses it to verify where sign-in requests come from.
  • AUTH_IS_REGISTRATION_ENABLED controls whether new accounts can register. Set it to true briefly to create your first account.
  • AUTH_IP_ADDRESS_HEADERS=x-forwarded-for ensures the sign-in protection sees your visitors’ real IP addresses, rather than the proxy’s.
  • DOCUMENTS_OCR_LANGUAGES=deu,eng lets OCR read scans in German and English. Without this line, Papra recognizes only English.
  • The papra-data volume contains the SQLite database and all documents.

Start Papra:

Code
docker compose up -d
docker compose ps

Papra creates the database on its first start. After about 30 seconds, the container should show as healthy.

Create your first account and disable registration

The first person to register automatically becomes the Papra administrator. So create your account before the instance is publicly accessible, then disable registration.

  1. First set up the reverse proxy as described in the next section, but don’t share the address with anyone yet.
  2. Go to https://papra.example.com, click Register, and create your account with an email address and password.
  3. In the .env file, set AUTH_IS_REGISTRATION_ENABLED=false and apply the change:
Code
cd /opt/papra
sed -i 's/^AUTH_IS_REGISTRATION_ENABLED=.*/AUTH_IS_REGISTRATION_ENABLED=false/' .env
docker compose up -d

From now on, the sign-in page won’t show a registration option, and Papra will reject new accounts. Existing accounts can sign in as usual.

Warning: Don’t leave registration open

If registration is open, anyone visiting your domain can create an account and upload files to your server. Keep AUTH_IS_REGISTRATION_ENABLED set to true only for the few minutes someone needs to sign up.

Access over HTTPS through a reverse proxy

Papra doesn’t provide HTTPS itself. Put a reverse proxy in front of it, such as nginx. Install nginx and Certbot as described in How to Set Up an nginx Reverse Proxy and Create an SSL Certificate (Let’s Encrypt), then create the file /etc/nginx/sites-available/papra:

Code
server {
    listen 80;
    server_name papra.example.com;

    client_max_body_size 30m;

    location / {
        proxy_pass http://127.0.0.1:1221;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

client_max_body_size 30m allows uploads up to just over Papra’s 25 MB per-file limit. Enable the site and obtain the certificate:

Code
ln -s /etc/nginx/sites-available/papra /etc/nginx/sites-enabled/
nginx -t && systemctl reload nginx
certbot --nginx -d papra.example.com

Back up your data

All data is stored in the papra-data volume. To create a complete backup, briefly stop Papra so the database isn’t copied while it’s being written to:

Code
cd /opt/papra
docker compose stop
docker run --rm -v papra_papra-data:/data -v /root:/backup alpine tar czf /backup/papra-$(date +%F).tar.gz -C /data .
docker compose start

The volume name consists of the directory name and papra-data. Check it with docker volume ls. Then store the file somewhere outside the server and back up .env as well. Without the auth secret, you won’t be able to sign in after a restore.

Update Papra

Before updating, read the Papra release notes and back up your data. Then enter the new version in compose.yaml (keep the -rootless suffix) and restart:

Code
cd /opt/papra
nano compose.yaml
docker compose pull
docker compose up -d

Papra applies database changes itself when it starts.

Import, organize, and find documents

After your first sign-in, Papra creates an organization for you. An organization is a separate archive with its own documents, tags, and members. You can create more organizations using the organization selector, for example one for personal documents and another for business documents.

Upload and organize

  • Upload: Use Import a document in the top-right corner or drag and drop files into the document list. By default, a file can be no larger than 25 MB.
  • Tags: Under Tags, create labels such as “Invoice,” “Insurance,” or “Tax 2026” and assign them to documents.
  • Tagging rules: Under Tagging rules, Papra automatically assigns tags when the name or content of a new document matches a condition, such as “content contains electricity bill.” Use Apply to existing documents to apply a rule to documents you’ve already uploaded.
  • Deleted documents: Anything you delete first goes to Deleted documents and is permanently removed after 30 days.

Full-text search and OCR

When you upload files, Papra extracts text from PDFs, Office files, and images. Scanned pages and photos are processed with Tesseract OCR. You can then find a document by searching for any word it contains.

Info: Scanned documents in German

By default, Papra only recognizes English text. For a manual installation, DOCUMENTS_OCR_LANGUAGES=deu,eng ensures that German umlauts and words are recognized correctly too.

Work with other devices and apps

  • Members: Under Members, use Invite member to invite additional accounts to an organization. Anyone you invite needs an account on your instance.
  • API keys: Under API keys, create keys for the Papra CLI or your own scripts, which can upload or retrieve documents through the API.
  • Sharing: Use Share links to share individual documents via a link, optionally protected with a password.
  • Two-factor sign-in: Under User settings, enable Two-Factor Authentication to add a second sign-in step using an authenticator app. This is highly recommended for an archive containing personal documents.

Limitations

  • No email out of the box: Without your own mail server, Papra doesn’t send emails; it only writes them to the log. So you’ll find the link from Forgot password? in the app logs (for a manual installation, use docker compose logs papra | grep reset-password). Invitations won’t arrive by email either; after signing in, the invited account can find them in Invitations under Settings.
  • Email inbox: Sending documents to Papra by email requires an external service such as OwlRelay or a Cloudflare Email Worker, and isn’t enabled out of the box.
  • AI tagging: Automatic tagging with a language model is disabled and requires your own AI provider, such as Ollama on your own server.
  • No per-document permissions: Anyone who is a member of an organization can see all its documents. Put documents that not everyone should see in separate organizations.

Conclusion

Papra is a quick way to create a searchable document archive on your own server. The easiest way to set it up is as a One-Click App: ZapX configures the domain and HTTPS and creates your administrator account, while registration stays disabled. Manual installation is useful if you want to integrate Papra into an existing Docker environment or configure settings such as OCR languages yourself.

Do you have questions that aren’t answered here? Our support team is happy to help every day! 🙂

Free tools

Related tools for servers and developers

View all

FAQ

Frequently asked questions

The One-Click App is the fastest option: ZapX sets up your domain, HTTPS, and administrator account. Registration is closed by default, and you can install updates in the app settings. Manual installation with Docker Compose is a good choice if you want to add Papra to an existing Docker environment or set options such as OCR languages yourself.
Not with the One-Click App: registration is closed by default, and ZapX creates your administrator account during installation. With manual installation, registration is open until you close it. The first person to register becomes the administrator, and every subsequent visitor can upload files to your server. So create your account right away, then close registration.
Temporarily enable registration: for the One-Click App, set PAPRA_REGISTRATION_ENABLED to true in the app environment; for manual installation, set AUTH_IS_REGISTRATION_ENABLED=true. Have the person create an account, then close registration again. Next, invite the account to your organization under Members. After signing in, the person can find the invitation under Invitations.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.