mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 01:15:51 +03:00
[GH-ISSUE #5258] Add Python PIP Index Configuration via Environment Variables to Prevent Startup Failures #3150
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#3150
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AndroidOL on GitHub (Jan 31, 2026).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/5258
Is your feature request related to a problem? Please describe.
Yes, there is a critical problem where the Nginx Proxy Manager (NPM) Docker container fails to start properly when it cannot download required pip packages. During container startup, NPM attempts to install certbot plugins (e.g.,
certbot-dns-aliyun) via pip. If the network connection to the default PyPI repository is unstable or blocked, pip installation hangs or fails with SSL errors. This prevents the NPM web interface and all proxy functionalities from starting, rendering the service completely unusable until pip can successfully download the packages. In some network environments, this may take an indefinite amount of time (days or even months), effectively breaking the service.Describe the solution you'd like
I request the addition of environment variables to allow users to configure custom pip indexes/mirrors. Specifically, please add support for:
PIP_INDEX_URL: To set the primary PyPI index URL (e.g.,https://pypi.tuna.tsinghua.edu.cn/simple)PIP_EXTRA_INDEX_URL: To set extra index URLs (e.g., for fallback mirrors)PIP_TRUSTED_HOST: To optionally trust custom hosts (if using HTTP or self-signed certificates)These variables should be respected during the container's startup sequence when pip installs certbot plugins. This change will enable users in regions with poor connectivity to PyPI to use reliable mirrors, ensuring the container starts reliably and quickly.
Describe alternatives you've considered
-ioption, but this is not sustainable and requires the container to be running (which it isn't if startup fails).Additional context
The error logs clearly show SSL connection failures when accessing
https://pypi.org/simple/. This is a common issue in certain geographic regions. The current implementation offers no way to override pip's source, leading to a complete service outage. Adding these environment variables is a standard practice in many Docker images (e.g., Python official images) and would greatly improve the resilience and user experience of Nginx Proxy Manager.Example of the startup failure log: