Files
npm-angie-auto-install/README.md
Mateusz Gruszczyński 1a2cbc10dd cleanups
2025-10-26 18:23:52 +01:00

4.3 KiB

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 11+ / Ubuntu 20.04+
  • curl, python3, sudo
  • 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

Options / Help

usage: install.py [-h] [--nodejs-pkg NODEJS_PKG] [--node-version NODE_VERSION] [--npm-version NPM_VERSION] [--motd {yes,no}] [--enable-ipv6] [--update] [--dark-mode] [--tp-theme TP_THEME] [--debug]

Install/upgrade NPM on Angie (Debian 11 + / Ubuntu 20.04 +).

options:
  -h, --help            show this help message and exit
  --nodejs-pkg NODEJS_PKG
                        APT Node.js package name (e.g. nodejs, nodejs-18). (default: nodejs)
  --node-version NODE_VERSION
                        Install Node.js from NodeSource repo (e.g. 'latest', '21', '20', '18'). Maximum supported: v21. Overrides --nodejs-pkg. (default: None)
  --npm-version NPM_VERSION
                        Force NPM app version (e.g. 2.12.6). Default: latest release. (default: None)
  --motd {yes,no}       Update MOTD after completion. (default: yes)
  --enable-ipv6         Do not strip IPv6 from configs/resolvers (keep IPv6). (default: False)
  --update              Update mode: upgrade packages + rebuild frontend/backend without reconfiguring Angie. (default: False)
  --dark-mode           Enable dark theme (default: organizr from theme-park.dev) (default: False)
  --tp-theme TP_THEME   Enable dark theme with specific theme name (e.g. nord, dracula, plex). Implies --dark-mode. (default: None)
  --debug               Show detailed logs and progress. (default: False)


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://host_ip:81

Angie UI

Default: http://host_ip:82/console

Prometheus

Default: http://host_ip:82/p8s


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://host_ip: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