[GH-ISSUE #2556] NGP creates new volumes after updating the image #1782

Closed
opened 2026-02-26 07:32:26 +03:00 by kerem · 4 comments
Owner

Originally created by @calvin-robertson on GitHub (Jan 23, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2556

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug
I updated the image, and upon relaunching, I found that all my settings were gone. After some research, I discovered that if the docker container is updated it creates new data volumes to use.

I attempted to ensure that the docker container used created volumes in the compose file, but even then upon rebuilding the container, I found it continued to generate new anonymous volumes to store the data

Nginx Proxy Manager Version
2.9.18

To Reproduce
Steps to reproduce the behavior:

  1. Create a container using the docker-compose.yaml method
  2. Make some configuration changes
  3. Run "docker volumes ls" and note the anonymous volumes created
  4. stop the docker container
  5. remove the docker container or pull the latest container image
  6. run the docker compose again
  7. Note there are two new anonymous volumes created and the container is completely reverted to it's default configuration

Expected behavior
Image/Compose file creates named containers that can be reused for data persistance. This way when the image is updated it doesn't wipe the configuration.

Screenshots

Operating System
Ubuntu Server 22.04

Originally created by @calvin-robertson on GitHub (Jan 23, 2023). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2556 **Checklist** - Have you pulled and found the error with `jc21/nginx-proxy-manager:latest` docker image? - Yes - Are you sure you're not using someone else's docker image? - Yes - Have you searched for similar issues (both open and closed)? - Yes **Describe the bug** I updated the image, and upon relaunching, I found that all my settings were gone. After some research, I discovered that if the docker container is updated it creates new data volumes to use. I attempted to ensure that the docker container used created volumes in the compose file, but even then upon rebuilding the container, I found it continued to generate new anonymous volumes to store the data **Nginx Proxy Manager Version** 2.9.18 **To Reproduce** Steps to reproduce the behavior: 1. Create a container using the docker-compose.yaml method 2. Make some configuration changes 3. Run "docker volumes ls" and note the anonymous volumes created 4. stop the docker container 5. remove the docker container or pull the latest container image 6. run the docker compose again 7. Note there are two new anonymous volumes created and the container is completely reverted to it's default configuration **Expected behavior** Image/Compose file creates named containers that can be reused for data persistance. This way when the image is updated it doesn't wipe the configuration. **Screenshots** <!-- If applicable, add screenshots to help explain your problem. --> **Operating System** Ubuntu Server 22.04
kerem 2026-02-26 07:32:26 +03:00
  • closed this issue
  • added the
    stale
    bug
    labels
Author
Owner

@ghost commented on GitHub (Jan 24, 2023):

You should map /data and /etc/letsencrypt to a location on your host (or the default docker location) in your volumes. If not mapped everything will be wiped. This is true when redeploying any container. See https://docs.docker.com/storage/volumes/

<!-- gh-comment-id:1402110042 --> @ghost commented on GitHub (Jan 24, 2023): You should map `/data` and `/etc/letsencrypt` to a location on your host (or the default docker location) in your volumes. If not mapped everything will be wiped. This is true when redeploying any container. See https://docs.docker.com/storage/volumes/
Author
Owner

@calvin-robertson commented on GitHub (Jan 26, 2023):

I made several attempts to do this in the docker compose file and no matter how I mapped things it still stored all the data in an anonymous docker volume. Cursory research of other docker forums seems to indicate this is a problem with the docker file itself. If you have a working docker compose file that is working, could you post the lines that map those volumes?

<!-- gh-comment-id:1405222140 --> @calvin-robertson commented on GitHub (Jan 26, 2023): I made several attempts to do this in the docker compose file and no matter how I mapped things it still stored all the data in an anonymous docker volume. Cursory research of other docker forums seems to indicate this is a problem with the docker file itself. If you have a working docker compose file that is working, could you post the lines that map those volumes?
Author
Owner

@github-actions[bot] commented on GitHub (Jan 29, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:1913827414 --> @github-actions[bot] commented on GitHub (Jan 29, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@github-actions[bot] commented on GitHub (Mar 15, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:2726120341 --> @github-actions[bot] commented on GitHub (Mar 15, 2025): Issue was closed due to inactivity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#1782
No description provided.