Manage Nginx Proxy Manager
from the command line.

Full coverage of proxy hosts, redirections, streams, dead hosts, SSL certificates, access lists, users, audit logs, and settings, with first-class JSON output for scripts and agents.

MIT License macOS · Linux · Windows Go 1.21+
01Install

Get the binary

Pick whichever fits your setup. The binary is nginxpm.

Via Go
go install github.com/piyush-gambhir/nginxpm-cli@latest
Build from source
git clone https://github.com/piyush-gambhir/nginxpm-cli.git
cd nginxpm-cli
make install
From releases

Download a prebuilt binary for your platform from the releases page and place it on your PATH.

02Quick start

Authenticate once, then operate

Add -o json to any command for machine-readable output.

quick start
# 1. Authenticate (saves a profile to ~/.config/nginxpm-cli/)
nginxpm login

# 2. Show server status (no auth required)
nginxpm status

# 3. List proxy hosts
nginxpm proxy list

# 4. Get a proxy host as JSON
nginxpm proxy get 1 -o json

# 5. Create a proxy host from a JSON file
nginxpm proxy create -f proxy.json

# 6. List SSL certificates
nginxpm cert list

# 7. List redirections
nginxpm redirect list

# 8. Pipe JSON to jq
nginxpm proxy list -o json | jq '.[].domain_names'
03Authentication

Connect to your Nginx Proxy Manager instance

Precedence: CLI flags > environment variables > saved profile.

interactiveDefault
Run nginxpm login and enter your NPM URL, email, and password. Credentials are saved to a profile.
env varsCI / Agents
Set NGINXPM_URL, NGINXPM_EMAIL, and NGINXPM_PASSWORD, no profile file needed.
profilesMulti-instance
Save multiple named profiles and switch with nginxpm config use-profile or --profile per-command.
Interactive login
nginxpm login
Environment variables (CI / agents)
export NGINXPM_URL=https://npm.example.com
export NGINXPM_EMAIL=admin@example.com
export NGINXPM_PASSWORD=your-password
Multiple profiles
nginxpm login                              # saves as default
nginxpm config use-profile prod            # switch active profile
nginxpm proxy list --profile staging       # one-off override
04Commands

Full coverage of the Nginx Proxy Manager API

Every group has its own --help. A selection of the top-level groups:

nginxpm proxy
Reverse proxy hosts (alias: ph), list, get, create, update, delete, enable, disable
nginxpm redirect
Redirection hosts (alias: redir, rh), list, create, update, delete
nginxpm stream
TCP / UDP streams (alias: st), list, create, update, delete
nginxpm dead
404 dead hosts (alias: dh, 404), list, create, update, delete
nginxpm cert
SSL certificates (alias: ssl), list, create, delete, renew
nginxpm access
Access lists (alias: acl), manage IP-based access controls
nginxpm user
Manage NPM users, list, create, update, delete
nginxpm audit
View audit log of all changes to the NPM instance
nginxpm setting
Manage server settings
nginxpm config
View/set configuration, manage profiles
nginxpm login
Interactive authentication setup
nginxpm status
Server status check (no auth required)
nginxpm version · update · completion
Print CLI version, self-update to latest release, generate shell completions (bash, zsh, fish)
Common operations
# Proxy hosts, list, get, create, update, delete, enable / disable
nginxpm proxy list
nginxpm proxy get 1 -o json
nginxpm proxy create -f proxy.json
nginxpm proxy update 1 -f proxy.json
nginxpm proxy delete 1 --confirm
nginxpm proxy enable 1
nginxpm proxy disable 1

# Redirection hosts, same shape
nginxpm redirect list
nginxpm redirect create -f redirect.json

# Streams (TCP/UDP)
nginxpm stream list
nginxpm stream create -f stream.json
Output formats
nginxpm proxy list                  # table (default)
nginxpm proxy list -o json          # JSON
nginxpm proxy list -o yaml          # YAML
Full reference on github.com/piyush-gambhir/nginxpm-cli ↗