How to Install Paperless-NGX on Ubuntu 24.04

Estimated reading: 3 minutes 1206 views

Introduction

Paperless-NGX is an open-source document management system that allows you to digitize, organize, and archive documents efficiently.
This guide will walk you through installing Paperless-NGX on Ubuntu 24.04 using Docker and Docker Compose.

Step 1: SSH into your server

ssh root@your_server_ip

(Windows users can use PuTTY and login as root.)


Step 2: Update Your System

apt update

Step 3: Install Required Tools

apt install curl git gnupg ca-certificates lsb-release

Step 4: Add Docker’s Official Repository

Create keyring folder (if missing):

install -m 0755 -d /etc/apt/keyrings

Download Docker’s GPG key:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc

Fix permissions:

chmod a+r /etc/apt/keyrings/docker.asc

(Optional: download key again if needed)

curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc chmod a+r /etc/apt/keyrings/docker.asc

Add Docker repo:

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] \ https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo $VERSION_CODENAME) stable" > /etc/apt/sources.list.d/docker.list

Step 5: Install Docker Engine + Docker Compose

apt update 
apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Step 6: Enable and Start Docker

systemctl enable docker 
systemctl start docker

Step 7: Verify Docker Compose

docker compose version

Step 8: Create the Paperless-NGX Directory

mkdir -p /opt/paperless cd /opt/paperless

Step 9: Generate a Secret Key

openssl rand -base64 32

Copy the generated key for later use in docker-compose.yml.


Step 10: Create Docker Compose File

nano /opt/paperless/docker-compose.yml

Paste the following content:

services:

redis:
image: redis:7
container_name: paperless_redis
restart: unless-stopped

db:
image: postgres:15
container_name: paperless_db
restart: unless-stopped
environment:
POSTGRES_DB: paperless
POSTGRES_USER: paperless
POSTGRES_PASSWORD: strongpassword
volumes:
- db-data:/var/lib/postgresql/data

webserver:
image: ghcr.io/paperless-ngx/paperless-ngx:latest
container_name: paperless_web
depends_on:
- db
- redis
ports:
- "8000:8000"
restart: unless-stopped
environment:
PAPERLESS_REDIS: redis://redis:6379
PAPERLESS_DBHOST: db
PAPERLESS_DBNAME: paperless
PAPERLESS_DBUSER: paperless
PAPERLESS_DBPASS: strongpassword
PAPERLESS_SECRET_KEY: "PASTE_YOUR_SECRET_KEY_HERE"
PAPERLESS_URL: "https://your-domain.com"
PAPERLESS_TIME_ZONE: "Europe/Bucharest"
volumes:
- data:/usr/src/paperless/data
- media:/usr/src/paperless/media
- consume:/usr/src/paperless/consume

volumes:
db-data:
data:
media:
consume:

Step 11: Start Paperless-NGX

docker compose up -d

Step 12: Verify Containers

docker ps

You should see:

paperless_web paperless_db paperless_redis

Step 13: Access Paperless-NGX

Open a browser:

http://YOUR_SERVER_IP:8000

Conclusion

Paperless-NGX is now fully installed and running on Ubuntu 24.04 using Docker and Docker Compose.
You can start importing documents, configuring OCR, and managing your digital documents efficiently.

Share this Doc

How to Install Paperless-NGX on Ubuntu 24.04

Or copy link

CONTENTS