Python script to manipulate Nginx Proxy Manager from command line reddit / selfhosted ---------------------------------------------------------------------- IllustratorVarious ยท 2023-10-09 11:14 I made a simple python script to make it simpler to manage reverse proxies. [GitHub](https://github.com/yusing/nginx-proxy-cli) (**Caution**) *I have no responsibility when causing bugs/conflicts using the script, use on your own risk. But feel free to create "issues" or feature requests on GitHub.* What you may want to do: Rename it to something like `nginx_proxy_cli` and move it to `$HOME/.local/bin` and then `chmod +x $HOME/.local/bin/nginx_proxy_cli`. Available commands: * list-user: List all users (no args) * list-cert: List all certificates (no args) * list-proxy: List all proxies (no args) * add-proxy: Add a new proxy (with optional `--dry-run` to preview changes) * delete-proxy: Delete a proxy (no args) Environment Variables: * `NPM_URL` (required): URL that points to Nginx Proxy Manager * `NPM_AUTH_TOKEN` (optional): The "Bearer XXX" token for making API request, will ask for login with email and password if not provided. * `HOME` (required): By default, auth credentials with be saved in $HOME/.local/nginx\_proxy.json