Unifi controller image update causes factory reset

I’m running Linuxserver/unifi-controller:latest on a Synology DS718+ NAS, container was created through the Synology GUI. Everything works great until I update the Docker image, then the container reverts to factory defaults and I have to restore from backup. I cannot figure out why.

I use all of the image defaults, except that I mount /config to a NAS directory (which should retain settings between updates, but doesn’t seem to) and mounting the Unifi Backup directory to a NAS folder as well. I also open up port 3478 because I get inform errors if I don’t and I changed the timezone.

I used this command to get the full Docker command for the running image: https://stackoverflow.com/a/60393380

docker run
–label=‘build_version=Linuxserver.io version:- 6.0.41-ls90 Build-date:- 2020-12-16T22:45:14+00:00’
-t linuxserver/unifi-controller:latest

I also see these entries in the Unifi log as the container is starting after an image update:

[2020-12-21T10:33:57,328] INFO db - waiting for db connection…
[2020-12-21T10:33:59,330] INFO db - Connecting to mongodb://localhost:27117
[2020-12-21T10:34:03,576] INFO db - setting mongodb features compatibility version to 3.6
[2020-12-21T10:34:03,620] INFO db - *** Factory Default *** Database exists. Clean it
[2020-12-21T10:34:05,262] INFO db - Connecting to mongodb://localhost:27117
[2020-12-21T10:34:05,278] INFO stat - *** Factory Default *** Stat Database exists. Clean it

Any thoughts?



There is an extra volume mapping for /config in there, which is probably overriding your other one

I wondered about that but I’m not adding the one that’s only /config. Is it in the image config, can I override it?

I also see data, logs and run directories in the /docker/unifi directory on the NAS.