How to install Paperless 3.0?

Yesterday, I installed QubesOS 4.3.1 on my computer for the first time.

Now I want to install Paperless-ngx 3.
First, you’re supposed to install Docker.

I just tried to install it in TemplateVM.

The Qubes I’ve created so far:

Archive 1-Template
Archive 2-AppVM

The entire system is Debian 13
50 GB of storage space

Archive 1-Template:

1. Remove old Docker packages and install dependencies

sudo apt-get remove -y docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg

2. Add the official Docker GPG key

sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

3. Add the Docker repository (for Trixie)

echo “deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] Index of linux/debian/ trixie stable” |
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

4. Install Docker CE

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

5. Disable default services (Docker will be controlled via qvm-service later)

sudo systemctl disable docker
sudo systemctl disable containerd

6. Add the user to the docker group (replace ‘user’ with your username)

sudo groupadd docker 2>/dev/null
sudo usermod -aG docker user

7. Create and initialize directories for bind-dirs

sudo mkdir -p /var/lib/docker /etc/docker

IMPORTANT: Start Docker at least once to ensure the directory structures exist

sudo docker ps

8. Configure bind-dirs for persistence

sudo mkdir -p /etc/qubes-bind-dirs.d
sudo tee /etc/qubes-bind-dirs.d/50_user.conf > /dev/null << EOF
binds+=( ‘/var/lib/docker’ )
binds+=( ‘/etc/docker’ )
EOF
sudo chmod 644 /etc/qubes-bind-dirs.d/50_user.conf

Question: Is everything correct so far?

If so, what’s the next step?

I’ve never worked with Linux before, since I used to work with Windows.

It would be great if I could have the terminal commands listed line by line, so it’s easier for me to install this.

Later on, I’d like to be able to find the document I want by entering keywords in the file (inside it) among approximately 20 GB of PDF files, etc.

Firstly, what catches my eye is you disabling the docker+containerd services. In combination with the description:

it seems you are missing that integration.


It would be nice if you could link the guide you used for this setup, considering you stating not having worked with linux - it is not your guide.


Apart from that, if you are still free regarding experimenting, I think “rootless podman” is superior to docker on a qubes-os vm since it already uses by default storage paths within the AppVMs.

Regarding paperless, you should look for a docker compose file, that would make running the service way simpler.

Maybe have a chat with Claude regarding the complete setup process - he is quite competent on such topics.

I don’t care whether I have to install “rootless Podman” or Docker.

I just want Paperless 3 to run offline on Debian 13 on my computer in the end.

Installing Paperless-ngx on Debian 13 in a Qubes OS 4.3.1 template VM requires installing Docker and downloading the official configuration files.

1. Install Docker (in the template VM)

Remove old packages and install the official Docker Engine and the Compose plugin:

sudo apt-get remove -y docker docker-engine docker.io containerd runc

sudo apt-get update

sudo apt-get install -y ca-certificates curl

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

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

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



echo \

 "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \

 $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \

 sudo tee /etc/apt/sources.list.d/docker.list > /dev/null



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

sudo usermod -aG docker $USER

2. Configure and start Paperless-ngx

Create a directory, download the PostgreSQL configuration, and customize the .env file:

mkdir -p ~/paperless-ngx

cd ~/paperless-ngx

curl -O https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/docker/compose/docker-compose.postgres.yml

mv docker-compose.postgres.yml docker-compose.yml

Create a .env file with the necessary environment variables (be sure to change the passwords!):

cat > .env << EOF

PAPERLESS_SECRET_KEY=dein_geheimes_geheimes_geheimes_geheimes_geheimes_geheimes

PAPERLESS_ADMIN_USER=admin

PAPERLESS_ADMIN_PASSWORD=dein_sicheres_passwort

PAPERLESS_DBHOST=db

PAPERLESS_DBUSER=paperless

PAPERLESS_DBPASS=dein_datenbank_passwort

PAPERLESS_DBNAME=paperless

PAPERLESS_REDIS=redis://broker:6379

EOF

Start the containers:

docker compose pull

docker compose up -d

»»»»»»»»»»»»»»

I created a new TemplateVM:

This is what I saw during installation:

»»»»»»»»»»»»»»

Question: Is that right?

What happens next?

If my installation isn’t correct, it would be great if you could provide me with the installation code.

Starts in daemon mode, aka. background.

You can check if it worked with:

netstat -tanp | grep 8000
#or
grep localhost:8000

Or opening a browser in the vm and open localhost:8000.


If it did not work, try starting the service not as a daemon, this is at least nice for debug purposes.

docker compose up