Skip to content

Getting Started

DenAV edited this page Feb 22, 2026 · 2 revisions

Getting Started

Prerequisites

  • Ansible >= 2.7 (install guide)
  • Python >= 3.9 with pip
  • Docker & Docker Compose on the target host
  • A running Nginx Proxy Manager instance (v2.10.3 recommended)

Installation

1. Clone the repository

git clone https://github.com/DenAV/nginx-proxy-manager-ansible.git
cd nginx-proxy-manager-ansible

2. Install Python dependencies

pip install -r requirements-dev.txt

3. Deploy Nginx Proxy Manager (if not running)

Update the Docker Compose file with your settings:

cd docker
# Edit docker-compose_npm.yml — set ports, volumes, etc.
docker-compose -f docker-compose_npm.yml up -d

Default NPM ports:

  • 80 — HTTP
  • 443 — HTTPS
  • 81 — Admin API / Web UI

4. Configure API credentials

Create an encrypted vault file with your NPM admin credentials:

ansible-vault create roles/npm-management/vars/api_secret.yml

Add the following content:

---
npm_user: admin@example.com
npm_password: changeme

Note: Default NPM credentials are admin@example.com / changeme. Change them after first login.

5. Run the playbook

# With vault password prompt
ansible-playbook pl_npm-management.yml --ask-vault-pass

# With vault password file
ansible-playbook pl_npm-management.yml --vault-password-file .vault-pass

First Run Checklist

  1. NPM is running and accessible at http://<your-ip>:81
  2. You've changed the default NPM admin password
  3. api_secret.yml is encrypted with Ansible Vault
  4. .gitignore contains **/api_secret.yml
  5. npm_api_url points to your NPM instance (see Configuration)

Next Steps

Clone this wiki locally