Skip to content

Paperless-ngx services fail to start without Internet because uv run accesses GitHub #16454

Description

@schoppfe

✅ Have you read and understood the above guidelines?

yes

🔎 Did you run the script with verbose mode enabled?

Yes, verbose mode was enabled and the output is included below

📜 What is the name of the script you are using?

Paperless-ngx

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/paperless-ngx.sh)"

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 13

🧱 Is this Proxmox host running arm64?

Yes

📈 Which Proxmox version are you on?

pve-manager/8.4.19/a68fb383814bb1e6 (running kernel: 6.8.12-20-pve)

📝 Provide a clear and concise description of the issue.

An existing and previously working Paperless-ngx LXC fails to start after a reboot when no Internet/WAN connection is available.

Paperless itself appears to be fully installed locally. However, all four Paperless systemd services are started through uv run:

paperless-consumer.service
paperless-scheduler.service
paperless-task-queue.service
paperless-webserver.service

During service startup, uv attempts to access a Paperless builder release on GitHub for psycopg-c. If GitHub is unreachable, uv times out and exits before Paperless itself is started.

No Paperless update was performed before the issue occurred. The installation had previously been running normally. The problem became visible only after the LXC was rebooted during a complete ISP/WAN outage.

As a diagnostic test only, I temporarily set:

systemctl set-environment UV_OFFLINE=1

and restarted the four Paperless services.

All four services immediately started successfully and Paperless-ngx v3.0.5 operated normally without Internet access.

No packages, service files, Paperless configuration files or Python environment files were changed.

This suggests that the installed environment itself is sufficient to run Paperless, but normal uv run service startup currently introduces an external GitHub dependency.

🔄 Steps to reproduce the issue.

  1. Have a working Paperless-ngx LXC installed using the Community Script.
  2. Disconnect WAN/Internet access while keeping the local network available.
  3. Reboot the LXC.
  4. Check the Paperless services:

systemctl status
paperless-consumer.service
paperless-scheduler.service
paperless-task-queue.service
paperless-webserver.service

All four services fail while uv run attempts to fetch metadata/a wheel from GitHub.

The local virtual environment exists:

ls -ld /opt/paperless/.venv

A locally installed dependency can be imported successfully:

/opt/paperless/.venv/bin/python -c
"import zxingcpp; print('zxing OK:', zxingcpp)"

Output:

zxing OK: <module 'zxingcpp' from '/opt/paperless/.venv/lib/python3.13/site-packages/zxingcpp.cpython-313-x86_64-linux-gnu.so'>

uv can also use the existing environment when explicitly operating offline:

cd /opt/paperless
uv run --offline -- python -c
"import zxingcpp; print('uv offline OK')"

Output:

uv offline OK

As a final diagnostic test:

systemctl set-environment UV_OFFLINE=1

systemctl restart
paperless-consumer.service
paperless-scheduler.service
paperless-task-queue.service
paperless-webserver.service

After this, all four services become active (running) without Internet connectivity.

❌ Paste the full error output (if available).

Representative output from paperless-webserver.service:

paperless-webserver.service - Paperless webserver
Loaded: loaded (/etc/systemd/system/paperless-webserver.service; enabled)
Active: failed (Result: exit-code)

ExecStart=uv run -- granian --interface asginl --ws --loop uvloop paperless.asgi:application

uv: error: Failed to generate package metadata for
psycopg-c==3.3.0 @ direct+https://github.com/paperless-ngx/builder/releases/...

Caused by: Request failed after 3 retries
Caused by: Failed to fetch:
https://github.com/paperless-ngx/builder/releases/download/psycopg-trixie-3.3.0/psycopg_c-3.3.0-cp312-cp312-linux_aarch64.whl

Caused by: client error (Connect)
Caused by: operation timed out

paperless-webserver.service: Main process exited, status=2/INVALIDARGUMENT
paperless-webserver.service: Failed with result 'exit-code'.

The same GitHub/psycopg-c failure occurred for:

paperless-consumer.service
paperless-scheduler.service
paperless-task-queue.service
paperless-webserver.service

🖼️ Additional context (optional).

The intention of this report is not to suggest that Paperless updates should work without Internet. Updates obviously require external connectivity.

The concern is that an already installed and previously working Paperless instance currently appears unable to start after a reboot when GitHub/the Internet is unavailable, although all required runtime components appear to be available locally.

One possible approach might be to decouple normal runtime service startup from online dependency resolution. For example, uv could potentially be run offline for the systemd services while installation/update operations continue to use normal online uv sync, or an offline fallback could be used if online resolution fails.

I am not sure which approach is appropriate for the Community Script and would prefer the maintainers to decide the correct implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions