Mateusz Gruszczyński 35546fd4a7 instal lvenv for certbot
2025-10-24 10:48:22 +02:00
2025-10-24 10:48:22 +02:00
2025-10-24 09:05:34 +02:00

NPM + Angie Auto Installer

Minimal, repeatable setup for Nginx Proxy Manager (NPM) on Angie (Debian / Ubuntu).
The installer configures Angie, deploys NPM (frontend + backend), fixes common pitfalls (PID tests, logrotate)

Repository

Base URL: https://gitea.linuxiarz.pl/gru/npm-angie-auto-install

On Gitea, the raw file URL usually looks like: https://gitea.linuxiarz.pl/gru/npm-angie-auto-install/raw/branch/main/install.py


Requirements

  • Debian 13 (root privileges).
  • curl, python3, systemd.
  • Network access to fetch packages and Node/Yarn artifacts.
  • ~2 GB RAM (recommended) or add 2 GB swap for safer frontend builds.

Quick Start (one-liner)

curl -fsSL https://gitea.linuxiarz.pl/gru/npm-angie-auto-install/raw/branch/master/npm_install.py -o install.py   && sudo python3 install.py --dark-mode

If you keep a patched version, replace install.py with your file name (e.g. install_fixed.py).


Manual Download & Run

# 1) Download
curl -L https://gitea.linuxiarz.pl/gru/npm-angie-auto-install/raw/branch/master/npm_install.py -o install.py 

# 2) Verify (optional)
python3 -m pyflakes install.py || true

# 3) Run
sudo python3 install.py --dark-mode

What the Installer Does

  • Creates /etc/nginx -> /etc/angie symlink (idempotent).
  • Installs Angie and config templates; provides an nginx wrapper that makes config tests safe:
    • nginx -t automatically uses -g "pid /tmp/angie-test.pid; error_log off;" and strips other -g flags.

Options

  • IPv6 keep/strip (resolver & conf).
  • Theme.Park stylesheet injection (optional).
  • Update-only mode (rebuild without reconfiguring Angie).

Check --help in the script for all flags.


Post-Install

systemctl status angie.service --no-pager
systemctl status npm.service --no-pager

NPM UI

Default: http(s)://:81 (see summary printed by installer)


Angie Statistics for a Specific vHost (NPM → Edit → Advanced)

To enable Angie statistics for a specific vHost:

  1. Go to Hosts → Proxy Hosts → (Edit).
  2. Open the Advanced tab.
  3. Add a line with a fixed zone name (no variables):
 status_zone my-domain;
  1. Save Metrics will be visible at: http://:82/console/#server_zones

HTTP/3 Announcement (NPM → Edit → Advanced)

listen 443 quic;
add_header Alt-Svc 'h3=":443"; ma=86400' always;

(Optional) Debug header for verification

add_header X-H3-Advertised "1" always;

Troubleshooting

1) Frontend build killed (SIGKILL) / high RAM usage

  • If memory is tight, add swap:
    sudo fallocate -l 2G /swapfile && sudo chmod 600 /swapfile
    sudo mkswap /swapfile && sudo swapon /swapfile
    

Uninstall (manual)

sudo systemctl disable --now npm.service angie.service || true
sudo rm -f /usr/sbin/nginx /usr/local/bin/logrotate-npm || true
sudo rm -f /opt/npm || true

License

MIT

Author

linuxiarz.pl, Mateusz Gruszczyński

Description
No description provided
Readme 1.7 MiB
Languages
Python 100%