-
Notifications
You must be signed in to change notification settings - Fork 5
Getting Started
DenAV edited this page Mar 19, 2026
·
2 revisions
- Ansible >= 2.12 (install guide)
-
Python >= 3.9 with
pip - Docker & Docker Compose on the target host
- A running Nginx Proxy Manager instance (v2.11.3+)
Note: Ansible, Python, and pip run on your local machine (the control node). The target host only needs Docker.
git clone https://github.com/DenAV/nginx-proxy-manager-ansible.git /opt/npm
cd /opt/npmpython3 -m venv .venv
source .venv/bin/activate # Linux/macOS
# .venv\Scripts\activate # Windows (PowerShell)
pip install -r requirements-dev.txtNote: Modern Linux distributions (Ubuntu 24.04+) require a virtual environment for pip. On Windows with a system-wide Python install,
pip installworks directly without a venv.
On the target host (server with Docker), start NPM using the project's docker-compose file:
cd /opt/npm/docker
# Edit docker-compose_npm.yml — set ports, volumes, etc.
docker compose -f docker-compose_npm.yml up -dDefault NPM ports:
- 80 — HTTP
- 443 — HTTPS
- 81 — Admin API / Web UI
Create an encrypted vault file with your NPM admin credentials:
ansible-vault create roles/npm-management/vars/api_secret.ymlAdd the following content:
---
npm_user: admin@example.com
npm_password: changemeNote: Default NPM credentials are
admin@example.com/changeme. Change them after first login.
# 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- NPM is running and accessible at
http://<your-ip>:81 - You've changed the default NPM admin password
-
api_secret.ymlis encrypted with Ansible Vault -
.gitignorecontains**/api_secret.yml -
npm_api_urlpoints to your NPM instance (see Configuration)
- Configuration — customize role variables
- Usage Examples — create your first proxy host