Skip to content

Set Up Paperless-ngx on a Linux Server – Digitally Archive and Search Documents

Set up Paperless-ngx on your Linux server: use it as a One-Click App with HTTPS or install it manually with Docker Compose. Scan documents, make them searchable with OCR, and organize your archive.

26 November 20265 min read0 Views0 helpful

Introduction

Paperless-ngx is an open-source document management system for your paperless office. Upload invoices, letters, contracts, and scans, and Paperless-ngx will use optical character recognition (OCR) to recognize their contents and make every document searchable. Organize your archive with tags, correspondents, and document types. After a while, Paperless-ngx will suggest many of these assignments automatically. Your files are stored on your own server instead of with a third-party provider.

In this guide, we’ll show you two ways to get started: the easy way, using your VPS’s One-Click Apps, which makes Paperless-ngx available over HTTPS in just a few clicks, and manual installation using Docker Compose.

The easy way: Paperless-ngx as a One-Click App

The quickest way to set up your own document archive is with your VPS’s One-Click Apps. ZapX configures the domain and HTTPS for you, creates the admin account during installation, and enters the app’s URL in Paperless-ngx. You don’t need the console.

Requirements

  • A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. For instructions, see Set up One-Click Apps.
  • At least 1 GB RAM for Paperless-ngx; 2 GB is recommended. OCR also uses a noticeable amount of CPU when you upload many documents.

Install

  1. Open your VPS in the ZapX dashboard and switch to the One-Click Apps tab.
  2. Search for Paperless-ngx in the App catalog and click Install app.
  3. Leave Use a custom subdomain or zap.cloud enabled and choose an address. Paperless-ngx will then be available directly over HTTPS.
  4. You don’t need to fill in anything under App configuration. The app’s username, password, and secret key are generated during installation.
  5. Click Queue installation. On its first startup, Paperless-ngx sets up its database. The app will be online after two to three minutes.

First login

Open the app’s Access link. Paperless-ngx will display a login page. You can find the admin account’s username and password in the app settings (gear icon) under App environment > Automatically generated values:

  • SERVICE_USER_PAPERLESS: username
  • SERVICE_PASSWORD_PAPERLESS: password

Click the eye icon to show a value or the copy icon to copy it. After logging in, you’ll land on the dashboard.

Info

Change your password in Paperless-ngx Paperless-ngx creates the admin account only on first startup and won’t overwrite its password afterward. To set a new password, go to My Profile in Paperless-ngx (click your username in the top-right corner). You can also enable two-factor authentication there. Afterward, the value in the app environment will no longer show your current password.

Set the OCR language and time zone

By default, Paperless-ngx reads your documents as English text and uses the UTC time zone. For German documents, change both settings before your first upload:

  1. Open the app settings (gear icon) and switch to App environment.
  2. Under Custom environment variables, click the plus icon to add two variables:
VariableValueEffect
PAPERLESS_OCR_LANGUAGEdeu+engOCR for German and English
PAPERLESS_TIME_ZONEEurope/BerlinDate and time in your time zone
  1. Click Save. The app will restart and be available again in about a minute.

English, German, French, Italian, and Spanish are already included. Combine multiple languages with +, but note that OCR will take longer. To use additional languages, also add PAPERLESS_OCR_LANGUAGES with the language packs, for example tur ces. The language setting applies only to documents you upload afterward.

Add documents

Click Upload at the top or simply drag files into the browser window. Paperless-ngx processes PDFs and images, recognizes the text and the document date, and adds them to the archive. You’ll find all your documents under Documents. Use the search at the top to find any word in the recognized text. The Content tab of a document shows its recognized text.

Create tags, correspondents, and document types under Attributes. Paperless-ngx learns from your assignments and suggests them for new documents. Set up mailboxes under Mail to have Paperless-ngx automatically retrieve attachments.

Updates

To check whether an update is available for your installation, open the app settings (gear icon), go to App update, and click Check for updates. If a new version is available, install it by clicking Apply update. Your documents and database are stored in separate volumes and will be preserved.

Manual installation

The rest of this guide covers manual installation from the console using Docker Compose. This is useful, for example, if you want to integrate Paperless-ngx into an existing server environment or control every step yourself. The instructions are based on the official Paperless-ngx installation guide.

Requirements

  • A Linux server running Debian or Ubuntu that you can access over SSH.
  • Docker with the Compose plugin. For instructions on installing Docker, see our guide Set up Docker.
  • To access the app over HTTPS, a domain pointing to your server and a reverse proxy. See Set up a reverse proxy with nginx.

Download the files

Paperless-ngx provides ready-to-use Compose files for different databases. The project recommends PostgreSQL for new installations. Create a directory and download the three files into it:

Code
mkdir paperless-ngx && cd paperless-ngx
curl -L -o docker-compose.yml https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/docker/compose/docker-compose.postgres.yml
curl -L -o docker-compose.env https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/docker/compose/docker-compose.env
curl -L -o .env https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/docker/compose/.env

The docker-compose.yml file starts Paperless-ngx alongside PostgreSQL and a Redis-compatible broker (Valkey). Paperless-ngx listens on port 8000.

Configure

Open docker-compose.env with an editor, for example by running nano docker-compose.env, and enter your settings:

Code
PAPERLESS_SECRET_KEY=here-a-long-random-string
PAPERLESS_URL=https://paperless.domain.tld
PAPERLESS_OCR_LANGUAGE=deu+eng
PAPERLESS_TIME_ZONE=Europe/Berlin
  • For PAPERLESS_SECRET_KEY, enter a long random string, for example one generated with openssl rand -base64 48.
  • PAPERLESS_URL is the address you use to access Paperless-ngx in your browser, without a trailing slash.
  • The OCR and time zone settings work the same way as described above in the One-Click App section.

Start Paperless-ngx

Download the images and start the containers:

Code
docker compose pull
docker compose up -d

Configure your reverse proxy to forward your domain over HTTPS to 127.0.0.1:8000. The first time you open the web interface, Paperless-ngx will prompt you to create an admin account (superuser).

Automatically import documents

In addition to uploading files in the browser, Paperless-ngx imports any files you place in the consume folder in your installation directory, for example, using SFTP or your scanner’s file storage. Paperless-ngx removes each file from the folder after importing it.

Updates and backups

To update, go to your installation directory and pull the new version:

Code
docker compose pull
docker compose up -d

When it starts, Paperless-ngx applies any necessary database changes automatically. To back up all your documents, including tags and settings, use the exporter. It writes them to the export folder next to your docker-compose.yml:

Code
docker compose exec -T webserver document_exporter ../export

Conclusion and further resources

Congratulations! Your own Paperless-ngx document archive is now up and running. Find more information here:

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

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.