"Forgot" Password

Hi all,

I’ve been using Dupliati on Docker for many years, and upgraded to Dupliati 2 a few months back. I thought I understood that in order to access the UI, I had to get the token link from the logs. When I tried to access today, I got a message that the token was expired. I attempted to restart the container, but the token link no longer generates.

After reading the documentation here (Duplicati Access Password | Duplicati) it seems like I must have set a password at some point. I didn’t document the password, because I thought I could use the token link to access the UI.

The documentation mentions a few ways to reset the password, but it doesn’t seem to cover how to execute those methods with docker. For instance, when I shell into the container and run duplicati-server-util I get a “command not found” error.

The other method is adding the command --webservice-password=<new password> when starting the server process, but since this is a docker install, it’s not clear to me where that command would be entered.

Any help would be great. Thank you!

1 Like

Hi tkohhh,

I’m not running a recent version so can’t check but you might check in /opt/duplicati in your docker container. duplicati-server-util might be in there or in some sub directory in there. You could also try “cd /opt/duplicati; find . -name duplicati-server-util” to find the path to it.

Regards,
L

Thanks for pointing me in this direction. I found duplicati-server-util in the directory app/duplicati. However, I still get a “not found” error when trying to execute duplicati-server-util from that location.
Any ideas?

I was able to run duplicati-server-util with the command ./duplicati-server-util. However, when running ./duplicati-server-util change-password it says “no database found in /config/.config/Duplicati” and then prompts me for a password. So, it seems like I need the password to change the password?

Am I completely screwed here?

You’re past my level of expertise, but there are others on the forum that can almost certainly help you including the developers!

I’ll also note that when inspecting /config/.config/duplicati there is in fact no database there. The sqlite files are in /config/duplicati. Is there a way to tell duplicati-server-util that it’s looking in the wrong place?

I would hope a --server-datafolder=/config/duplicati would persuade it.
That’s deeper than I would have thought. Are you using a LinuxServer image?
The image Duplicati supplies puts its databases under /data. Useful reading:

Using Duplicati from Docker but LSIO did a few things differently in their image.

You might want to printenv to see what’s set now. Read your own config too.
Anyway, Duplicati usually uses $HOME/.config/Duplicati unless overridden by:

--server-datafolder: Duplicati needs to store a small database with all settings. Use this option to choose where the settings are stored. This option can also be set with the environment variable DUPLICATI_HOME.

and I found a dev post saying DUPLICATI__SERVER_DATAFOLDER variable can move it.
I think I’ve run the option format, but if it doesn’t, try the environment variable instead.

Yes, I am using the Linuxserver image. I’ll take a look at things and let you know what I find.

Thanks for your help!

So, it turns out simply setting the DUPLICATI__WEBSERVICE_PASSWORD environment variable worked. Thanks for the link, @ts678 … that definitely helped!

Good to hear, but did you find any wrong setting in your environment courtesy of either LSIO (in which case dev should tell them) or you (in which case we try to work out a conversion)?

/config/.config/duplicati still looks an odd spot to be searching (but I don’t do Docker).

No, I didn’t see anything obviously wrong when I checked the Environment Variables. The DUPLICATI__SERVER_DATAFOLDER was set to /config like the dockerfile you referenced.

I also updated from 2.1.0.4 to 2.1.0.5, and after doing so I was unable to get duplicati-server-util to run at all. It gave a different error, but I didn’t dig into it since I was able to reach the UI. I’ll take a look tonight and post the new error here. I’m also on the linuxserver discord, so I can ask there for some details as well.

Your old DBs used /config/duplicati, and duplicati-server-util tried the longest path. with the extra .config level in the middle. Maybe the dev has idea of how it got in.

If there are any LSIO Docker users of 2.0.8.1 or before on forum, maybe they can chip in.

LSIO Discord is also a good extra resource in general.

v2.1.0.5_stable_2025-03-04

details the changes to Duplicati, and there aren’t a lot, but maybe it’s a Docker problem.
Knowing the new error will probably help figure it out…

The .config is usually something that .NET resolves to match the Environment.SpecialFolder.ApplicationData variable on Linux.

It is usually resolved to ~/.config and that is the default storage folder that is being used.
Maybe $HOME is set to /config/duplicati, and this causes the longer path to be resolved?

My guess is that you set the environment variables for the Docker image, which apply to the Duplicati executable, but when you get a shell inside the Docker container, it does not have the same environment variables set.

Good point. We’d like to keep shell behavior aligned with what Duplicati server sees.

I’m noticing what I think might be a typo (capitalization). First report was speaking of:

and later mentions lowercased. If that was inadvertent, then HOME of /config may get

/config/.config/Duplicati

and we get HOME of /config in their Dockerfile posted above (if I read it right) and also

in their base image (again, if I read it right). But what became of their Dockerfile setting

DUPLICATI__SERVER_DATAFOLDER=/config

So where did that come from? Anybody have LSIO (ideally a 2.0 Duplicati) to compare?

I only have 4 environment variables set in the container definition:

  • PGID
  • PUID
  • CUSTOMSQLITEOPTIONS_DUPLICATI
  • DUPLICATI__WEBSERVICE_PASSWORD

This is the result of printenv:

root@a3c9572f5d65:/# printenv
PUID=0
HOSTNAME=a3c9572f5d65
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
LANGUAGE=en_US.UTF-8
DUPLICATI__WEBSERVICE_PORT=8200
HOST_CONTAINERNAME=duplicati
DUPLICATI__REQUIRE_DB_ENCRYPTION_KEY=true
PWD=/
DUPLICATI__WEBSERVICE_INTERFACE=any
TZ=America/Los_Angeles
HOME=/config
LANG=en_US.UTF-8
PGID=0
VIRTUAL_ENV=/lsiopy
TMPDIR=/run/duplicati-temp
S6_VERBOSITY=1
S6_STAGE2_HOOK=/docker-mods
DUPLICATI__WEBSERVICE_PASSWORD=[redacted]
TERM=xterm
HOST_OS=Unraid
SHLVL=1
DUPLICATI__SERVER_DATAFOLDER=/config
DUPLICATI__WEBSERVICE_ALLOWED_HOSTNAMES=*
LSIO_FIRST_PARTY=true
PATH=/lsiopy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOST_HOSTNAME=Server2
CUSTOMSQLITEOPTIONS_DUPLICATI=cache_size=-200000
_=/usr/bin/printenv

This is what I currently get when I try to run duplicati-server-util:

root@a3c9572f5d65:/app/duplicati# ./duplicati-server-util help
Crash!
System.IO.FileNotFoundException: Could not load file or assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.

File name: 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at Duplicati.CommandLine.ServerUtil.Program.Main(String[] args)
   at Duplicati.CommandLine.ServerUtil.Net8.Program.<>c__DisplayClass0_0.<Main>b__0()
   at Duplicati.Library.Crashlog.CrashlogHelper.WrapWithCrashLog[T](Func`1 method, String logdir, String applicationName)
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.

File name: 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at Duplicati.CommandLine.ServerUtil.Program.Main(String[] args)
   at Duplicati.CommandLine.ServerUtil.Net8.Program.<>c__DisplayClass0_0.<Main>b__0()
   at Duplicati.Library.Crashlog.CrashlogHelper.WrapWithCrashLog[T](Func`1 method, String logdir, String applicationName)
   at Duplicati.CommandLine.ServerUtil.Net8.Program.<Main>(String[] args)
Aborted

I have to apologize, I think I misspoke when I referred to /config/duplicati. The sqlite files are indeed in simply /config

What changed since when you ran change-password in it and got a surprising path?

The problem you see now is probably a not-yet-claimed-fixed probably build problem.

Despite the need for the file, the MacOS and Linux builds are missing this file, but the Windows builds contain it.
It should be sufficient to take it either from the 2.1.0.4 or the 2.1.0.5 Windows zip file:

On my x64 deb install, 2.1.0.5 has the missing-DLL problem, but 2.1.0.112 does not.
I glanced at multiple build fixes, but couldn’t find which fixed it, or maybe it’s random.

is the forum version of the report, and it’s interesting that 2.1.0.4 also lacks the issue.
I’m surprised we’re not hearing more reports on this from 2.1.0.5.

I did the workaround for Linux, set HOME environment to non-existent /config to test.

Surprise behavior is it seems to make a new Duplicati subfolder relative to current dir.
So change-password in tmp makes new folder with installation.txt and machineid.txt.
This isn’t the only command going that way. duplicati does too, but with more files:

$ pwd
/tmp
$ ls -ln Duplicati
total 80
drwxrwxr-x 2 1000 1000  4096 Apr 24 10:01 control_dir_v2
-rw------- 1 1000 1000 65536 Apr 24 10:01 Duplicati-server.sqlite
-rw-rw-r-- 1 1000 1000   283 Apr 24 10:01 installation.txt
-rw-rw-r-- 1 1000 1000   247 Apr 24 10:01 machineid.txt
$ 

is possibly the bug, as GetFolderPath returns an empty string because path isn’t there.
Append Duplicati to the empty string, and you get relative path to Duplicati folder.
This is probably not the intended result. Basing folder on current dir sounds very weird.

That would be the update from 2.1.0.4 to 2.1.0.5, as mentioned here: "Forgot" Password - #11 by tkohhh

Thanks. That matches the forum topic I posted where 2.1.0.4 works and 2.1.0.5 doesn’t.

The workaround worked for me, but it seems even odder to drop new files into container.

At this point, I’m not terribly troubled that I can’t run duplicati-server-util, because the only reason I wanted to run it in the first place was to change my password. The password situation is sorted now, so no worries there.

Is there any other reason why I need to be concerned about duplicati-server-util not working?

Not unless you need it. In testing (after a peek at source), it looks like some other commands are also broken. The only one you might have is (obscure) secret-tool.

Mainly I was hoping to make progress on the original mystery complaint, but I can:

$ pwd
/
$ printenv HOME DUPLICATI__SERVER_DATAFOLDER
/config
/config
$ ls -lan /config
total 12
drwxrwxrwx  3    0    0 4096 Apr 24 14:11 .
drwxr-xr-x 24    0    0 4096 Apr 24 14:09 ..
drwxrwxrwx  3 1000 1000 4096 Apr 24 14:11 .config
$ /usr/lib/duplicati/duplicati-server-util change-password
Connecting to http://localhost:8200/...
No database found in /config/.config/Duplicati
Enter server password: 

based on theory so far, and your printenv results, so thanks for providing those.

I had thought DUPLICATI__SERVER_DATAFOLDER would win over HOME. It didn’t.
The cited dev post and Environment variables and the help from the command:

--server-datafolder <server-datafolder> The server datafolder to use for locating the database []

make me think I set the right environment variable. Maybe the dev can answer.