Files
npm-angie-auto-install/README.md
2025-10-25 10:48:25 +02:00

4.7 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 13 / Ubuntu 24.04 (root privileges).
  • curl, python3
  • 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-domain TP_DOMAIN] [--tp-community-theme TP_COMMUNITY_THEME] [--tp-scheme TP_SCHEME] [--tp-theme TP_THEME] [--debug]

Install/upgrade NPM on Angie (Debian/Ubuntu) with step animation.

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', '22', '20', '18'). 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           Inject Theme.Park CSS into frontend (see TP_* vars). (default: False)
  --tp-domain TP_DOMAIN
                        Theme.Park domain (e.g. theme-park.dev or *.github.io). (default: )
  --tp-community-theme TP_COMMUNITY_THEME
                        true = community-theme-options; false = theme-options. (default: false)
  --tp-scheme TP_SCHEME
                        URL scheme (http/https). (default: https)
  --tp-theme TP_THEME   Theme.Park theme name (e.g. organizr, catppuccin). (default: organizr)
  --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://:81

Angie UI

Default: http://:82


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