How to Migrate from an Existing NGINX Proxy Manager Deployment and Keep Configuration
To migrate from an existing NGINX Proxy Manager installation to a version which provides also open-appsec integration here's some guidance:
Note that the specific steps can vary based on customizations that you might have done to the original NGINX Proxy Manager's docker compose file.
The below is assuming you did a deployment by using the default docker-compose.yml file similarly as shown here: https://nginxproxymanager.com/setup/#running-the-app .
Change into your existing folder that contains the docker-compose.yml file and all related files and folders for your current NGINX Proxy Manager deployment.
Stop your current deployment with
docker-compose down
in the folder that contains yourdocker-compose.yaml
file used for the NGINX Proxy Manager deployment.Make a full backup of your existing folder that contains the NGINX Proxy Manager docker compose environment, including any mounted volumes like
./data
and./letsencrypt
, etc. to a safe location. This will allow you to bring it up withdocker-compose up
later exactly as it was before the migration, if required for some reason.Rename the original
docker-compose.yml
file (so you will still have it as a backup):
mv ./docker-compose.yml ./docker-compose.npm.orig.yml
Please carefully read the important considerations below!
Only then follow the regular instructions for the deployment:
Deploy NGINX Proxy Manager with open-appsec managed from NPM WebUIImportant considerations:
Your existing NGINX Proxy Manager (and Let's Encrypt) configuration will still be available also once migrated to the open-appsec enhanced NGINX Proxy Manager deployment as long as it still resides in the local
./data
and./letssencrypt
folders.If you did any important changes to the original
docker-compose.yml
file from the NGINX Proxy Manager project: Once you downloaded thedocker-compose.yaml
file for deployment of NGINX Proxy Manager with open-appsec, make sure to apply these changes also to thisdocker-compose.yaml
file. You can compare the newdocker-compose.yaml
with the renameddocker-compose.orig.yaml
file of you previous deployment of only NGINX Proxy Manager. Note that for the open-appsec integration a combination of adocker-compose.yaml
file with a .env file is being used, as this allows for easier customization of commonly used variables.Below find the relevant folders typically containing the persistent configuration of NGINX Proxy (NPM) Manager, they will also be mounted as part of the open-appsec NPM integration
docker-compose.yaml
so that all your existing configuration should be kept. Only if for some reason you changed the local folder locations for these specific docker volume mounts in the past, please make sure to adjust those as well in the new.env
file for the open-appsec NGINX Proxy Manager integration.NPM_DATA=./data NPM_LETSENCRYPT=./letsencrypt
When you perform the first time login with your web browser to the Web UI of the NGINX Proxy Manager (NPM) with open-appsec integration then your existing user credentials for the login should still work, indicating your NPM configuration was kept successfully.
http://[hostname or IP of your host]:81
After switching to and loading the new Nginx Proxy Manager (NPM) pages, make sure to clear your browser’s cache and cookies to ensure the updated configuration is applied correctly.
Last updated
Was this helpful?