How can I get the hosts list back for Nginx Proxy Manager?

Right now I’m using the latest version of the addon “Nginx Proxy Manager” (v0.12.3)

I have been using the “Nginx Proxy Manager”-addon for about two (?) years now. It has always been working flawlessly for me. I think it is pretty easy to configure it to do what I want it to. The last time I logged in as admin, I could see a list my of configured hosts. No problem! (Unfortunately I don not remember when I logged in to admin interface last time, probably a couple of months ago.)

When I log in now, the list of host is empty:

The really strange thing is that the addon, in some way, seems to be doing its job. Why I believe that? Well, I still can reach internal net resources from the internet behind my proxy…

Facts

  • I updated to Nginx Proxy Manager to v0.12.3 yesterday
  • I tried to revert Nginx Proxy Manager to the version before that (restored a saved backup), but the hosts list remains empty
  • I updated Nginx Proxy Manager to v0.12.3

How can I get the hosts list back?

Did you ever figure this out? Happened to me and I’ve seen a few others with the same issue but haven’t found a solution/answer yet.

Unfortunately not. I had to start it all over again. Absolutely not a desired solution!

@frenck - here I find a ticket which rendered a few dozen proxy services inaccessible due to an update that intentionally broke the existing configuration, blamed the user for having auto-update enabled, and then locked the thread so nobody can ask any questions.

So I’ll ask the question here - is there any way for one to get the old list of hosts out of the old database somehow? I don’t have that whole configuration committed to memory and I hadn’t really expected it to be intentionally deleted on auto-update without some head’s up or a plan for manual migration.

Any thoughts on how we might be able to get the hosts list back for Nginx Proxy Manager?

edit: reverted system to backup, manually wrote down the host setups configured in the working version, re-ran updates, and am now configuring the new version.

This doesn’t seem like the ideal way to handle breaking changes when some large portion of the user community has auto-updates enabled.

I threw together a quick and dirty script that will export the proxy host configuration from the old MariaDB setup so that I could start working on creating the new proxy host configuration in the new DB. Here’s the commands I used from within the container to export the full list of proxy hosts along with their settings:

JSON_FILE="/data/manager/production.json"
DB_HOST=$(jq -r '.database.host' $JSON_FILE)
DB_NAME=$(jq -r '.database.name' $JSON_FILE)
DB_USER=$(jq -r '.database.user' $JSON_FILE)
DB_PASS=$(jq -r '.database.password' $JSON_FILE)
DB_PORT=$(jq -r '.database.port' $JSON_FILE)
mysqldump -h $DB_HOST -u $DB_USER -p$DB_PASS -P $DB_PORT $DB_NAME proxy_host --skip-add-drop-table --skip-add-locks --no-create-info --compact

at the time you wrote this, the update wasn’t shipped. The issue was locked, because it wasn’t relevant. I’ve opened up the issue when I shipped it.

FYI: I don’t blame anyone.

This doesn’t seem like the ideal way to handle breaking changes

Agree, see for more context and information the issue you’ve linked already.

1 Like

At the time that I wrote it, all my configured proxy hosts were down because auto-update had pulled the new release which caught me by surprise.

Anyway, I get why this happened and I dig your work and I appreciate that this was a tough one. Maybe a feature request for the future would be some way for an add-on to declare that a given update is “breaking” and to disable auto-updates or throw a notification or something first.

Again, love your work and this addon is cool and hopefully everyone is able to put their config back together.

Then you are not using stable.

V1.0.0 was released 5 hours ago.

Your post was 11 hours ago:

Make sure you use the stable branches :slight_smile:

huh. Any idea how I control that? I just added the add-on from the community add-on store years ago. Is there some means of selecting stable branch vs something else?

The default store is stable. The community add-ons has also an beta and edge channel

  • https://github.com/hassio-addons/repository-edge
  • https://github.com/hassio-addons/repository-beta

If you have any of those repositories enabled / installed on your system, you might have installed beta/edge versions of the add-on.

My guess, it that you have the edge repo installed, as 11 hours ago, this was only used on dev.

The stable repo is: https://github.com/hassio-addons/repository

I don’t want to argue with you here but I am absolutely confident that I’m using the normal community add-on url. Wonder how it could have picked that update up?

In my situation I had the following sequence of events:

  • Power outage in the middle of the night had a brief blip (this would be around 1am EDT).
  • HA system is on UPS but a few of the things it talks to aren’t and they weren’t re-connecting, so I manually rebooted HA just to have it reconnect to all the things.
  • After restarting, found none of my proxy URLs were responding.
  • Check the plugin to find it has lost the configuration, do some searching and find the GH thread but it was locked so I couldn’t post questions

I’m not clear on how the auto-update mechanism works, maybe it’s running at startup? Weird that it would pull a release that hadn’t been released yet.

There hasn’t been anything shipped or triggered on autoupdate at that time. It didn’t exist up until 5 hours ago… can show you the git logs if you like :person_shrugging:

What version number is shown on your installed add-on?

Please note, the old version did have possible issues where it misdetected MariaDB and could start temporary with a blank SQLite (yeah, it sucked).

@frenck - one of my HA instances is still running v0.12.3 of the NPM add-on, but it looks like the Web UI updated independently?

My login p/w doesn’t work anymore, and it’s reset to admin/changeme. If I login with those credentials, it shows no hosts or SSL certs, but the proxy is still working correctly.

Is it possible that the WebUI updated independently? And if so, is there anywhere that I can see my current config before updating?

If you have access to the old container, see this post for a way to dump the old config from MariaDB.

I posted this in the GH thread but it was marked off topic for reasons which aren’t clear, helping other people grab a backup seems like it’s making maintainers mad.