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.
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.
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?
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:
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.
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.
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.
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:
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.
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.