Cannot deploy AIO with existing npm

This error is not caused by NGINX Proxy Manager. Portainer is rejecting the Compose file before AIO is even deployed.

I would also avoid pasting the configuration directly into Portainer as a Stack. For a critical service, I prefer keeping the docker-compose.yml file directly on the host and deploying it with:

docker compose config
docker compose up -d

Portainer can still be used for monitoring, logs and container management, but it should not be the only place where the deployment configuration exists.

My complete working setup is documented here:

I have been using this setup for almost 3 years now, and it has been working reliably without issues.

For the current problem, fix the YAML structure first and validate it with docker compose config.