Gui unreachable, errors when using cli on 2.1.0.5_stable_2025-03-04 in debian

Hi everyone,
i installed then last version of Duplicati in a lastest version of debian.
Unfortunately, when i wanted to look today at my archive made with a previous version of Duplicati, the gui asked me a password…
i don’t remember that i made a password a installation.

Connection to server was rejected due to invalid authentication.

Log in again, or re-open the page from the TrayIcon (if applicable)

After reload, i get the same message.

So i tried to access via cli, and i get a lot of errors…
So i tried to uninstall Duplicati via apt, the reinstall it…(via apt too, because it doesn’t work with dpkg!)
and i get exactly the same errors.

example of errors i get :

root-user# duplicati-server
No database encryption key was found. The database will be stored unencrypted. Supply an encryption key via the environment variable SETTINGS_ENCRYPTION_KEY or disable database encryption with the option --disable-db-encryption
fail: Microsoft.Extensions.Hosting.Internal.Host[11]
      Hosting failed to start
      System.IO.IOException: Failed to bind to address http://127.0.0.1:8200: address already in use.
       ---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use
       ---> System.Net.Sockets.SocketException (98): Address already in use
         at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
         at System.Net.Sockets.Socket.Bind(EndPoint localEP)
         at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
         at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
         --- End of inner exception stack trace ---
         at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
         at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass28_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
      --- End of stack trace from previous location ---
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
         --- End of inner exception stack trace ---
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(ListenOptions[] listenOptions, AddressBindContext context, Func`2 useHttps, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
         at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
         at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
Une erreur critique s'est produite dans Duplicati : System.Exception: Unable to open a socket for listening, tried ports: 8200
   at Duplicati.Server.WebServerLoader.TryRunServer[TServer](IReadOnlyDictionary`2 options, Connection connection, Func`2 createServer)
   at Duplicati.Server.Program.StartWebServer(IReadOnlyDictionary`2 options, Connection connection)
   at Duplicati.Server.Program.Main(String[] _args)

and when i make run the server with the option disable db encryption :

# duplicati-server --disable-db-encryption
fail: Microsoft.Extensions.Hosting.Internal.Host[11]
      Hosting failed to start
      System.IO.IOException: Failed to bind to address http://127.0.0.1:8200: address already in use.
       ---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use
       ---> System.Net.Sockets.SocketException (98): Address already in use
         at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
         at System.Net.Sockets.Socket.Bind(EndPoint localEP)
         at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
         at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
         --- End of inner exception stack trace ---
         at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
         at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass28_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
      --- End of stack trace from previous location ---
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
         --- End of inner exception stack trace ---
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(ListenOptions[] listenOptions, AddressBindContext context, Func`2 useHttps, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
         at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
         at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
Une erreur critique s'est produite dans Duplicati : System.Exception: Unable to open a socket for listening, tried ports: 8200
   at Duplicati.Server.WebServerLoader.TryRunServer[TServer](IReadOnlyDictionary`2 options, Connection connection, Func`2 createServer)
   at Duplicati.Server.Program.StartWebServer(IReadOnlyDictionary`2 options, Connection connection)
   at Duplicati.Server.Program.Main(String[] _args)

so, what can i do for make Duplicati works fine again ?
Thanks for your answers and your help.

says says new Duplicati can’t get that because something has it. Please check what.

$ sudo lsof -i :8200
        COMMAND      PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
duplicati 529713 root  411u  IPv6 7773175      0t0  TCP *:8200 (LISTEN)
$ pgrep -a duplicati
529713 /usr/bin/duplicati-server --webservice-interface=any
$ 
$ systemctl status duplicati
● duplicati.service - Duplicati web-server
     Loaded: loaded (/lib/systemd/system/duplicati.service; disabled; vendor preset: enabled)
     Active: active (running) since Sun 2025-05-04 16:35:39 EDT; 1 week 6 days ago
   Main PID: 529713 (duplicati-serve)
      Tasks: 19 (limit: 3411)
     Memory: 58.7M
        CPU: 45.503s
     CGroup: /system.slice/duplicati.service
             └─529713 /usr/bin/duplicati-server --webservice-interface=any

Do you usually run Duplicati as a systemd service? If so, stop that before a CLI start.

If you usually run it standalone as a tray icon (called duplicati), situation is different.
Tray icon Open can bypass password. Browsing manually to Duplicati now needs one.

Duplicati Access Password

If you are starting Duplicati for the first time, it will ask you to pick a password.

is applicable to TrayIcon first start, which is likely to happen with Windows install.
Linux user might use tray icon, or might miss this if they use the systemd service.

If you’re using systemd, you got a random password assigned at first server start.
While this is in effect, there’s also a five-minute access URL you can use to get in.

systemctl status duplicati | cat - just after start will show it. Browse there.
Use Settings to change the password. That’s what TrayIcon would do more easily.

There are other ways to change a systemd service password, but first, is this one?

1 Like

Well, sorry for long time no answer.
ok, i tried today to start Duplicati normally (with the icon in Debian start menu). I didn’t find the tray icon next to the network and sound buttons (like i had in some previous installations), but i opened firefox, and did type : http://127.0.0.1:8200
and a little duplicati window said me that the connection was lost with the server, and that i need to relogin.
So i did clic on the button, the page did refresh and asked me a password (that i don’t have)
i went on the page Duplicati access password, tried this :

sudo journalctl --unit=duplicati | less

and it didn’t work.
So i tried this :

duplicati-server-util change-password

and it wrote me :

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)
Abandon

i tried to look at the /root/.config/Duplicati and nothing exist at this location.
Then, i thought, as the problem seems to be on the webservice and on its password, let’s try to change the password of the webservice with the command :

duplicati --webservice-password=abcd

then it wrote me this :

No database encryption key was found. The database will be stored unencrypted. Supply an encryption key via the environment variable SETTINGS_ENCRYPTION_KEY or disable database encryption with the option --disable-db-encryption
fail: Microsoft.Extensions.Hosting.Internal.Host[11]
      Hosting failed to start
      System.IO.IOException: Failed to bind to address http://127.0.0.1:8200: address already in use.
       ---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use
       ---> System.Net.Sockets.SocketException (98): Address already in use
         at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
         at System.Net.Sockets.Socket.Bind(EndPoint localEP)
         at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
         at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
         --- End of inner exception stack trace ---
         at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
         at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass28_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
      --- End of stack trace from previous location ---
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
         --- End of inner exception stack trace ---
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(ListenOptions[] listenOptions, AddressBindContext context, Func`2 useHttps, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
         at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
         at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
Server has started and is listening on port 8300
Running Firefox as root in a regular user's session is not supported.  ($XDG_RUNTIME_DIR is /run/user/1000 which is owned by enae-courant.)

Well, so i opened firefox, did try at the adress : 127.0.0.1:8300
and i saw the window that asked me the password, typing the little modified password, and it worked !
so i can now enjoy to can make something with Duplicati, but i need to stay in root. (it don’t work when i log out of root, and i tried as simple user and still stuck with the password = it don’t recognize the new set up password!)

out of this, i tried the commands you did ask me in your previous message :

root@courant:~# lsof -i :8200
COMMAND     PID         USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
duplicati 10836 enae-courant  416u  IPv4  70094      0t0  TCP localhost:8200 (LISTEN)
duplicati 10836 enae-courant  430u  IPv6  70097      0t0  TCP localhost:44318->localhost:8200 (ESTABLISHED)
duplicati 10836 enae-courant  433u  IPv4  69330      0t0  TCP localhost:8200->localhost:44318 (ESTABLISHED)
root@courant:~# pgrep -a duplicati
10836 duplicati
root@courant:~# systemctl status duplicati
○ duplicati.service - Duplicati web-server
     Loaded: loaded (/lib/systemd/system/duplicati.service; disabled; preset: enabled)
     Active: inactive (dead)

Any idea of what i can do for make it work as a simple user?
I thank you for your help

That is unfortunately a know bug with 2.1.0.5, it is lacking the file System.CommandLine.dll in some packages. You can work around it by grabbing the latest canary build zip package, unzip and run from there (you don’t have to install it, just run the duplicati-server-util executable).

If I read correctly, it works with non-root (om port 8300), but it does not work with root?

Then try:

> sudo systemctl stop duplicati
> sudo duplicati-server --webservice-password=abcdefgh
... wait a bit, then press CTRL+C
> sudo systemctl start duplicati

If that fails, edit /etc/default/duplicati, add change the options line:

# Additional options that are passed to the Daemon.
DAEMON_OPTS="--webservice-password=abcdefgh"

Run:

> sudo systemctl restart duplicati

It should now work with the temporary password, but you should not leave it in there, so edit the file back to:

# Additional options that are passed to the Daemon.
DAEMON_OPTS=""

And again, run:

> sudo systemctl restart duplicati

Now you have it running with the temporary password, and can log in and change the password.

Do you want Duplicati to run as root or as non-root?

Thanks for your answer Kenkendk !

About the file to replace for avoid Crash :
i did download the latest canary build, did unzip it.
I did run the duplicati-server-util from the unzipped folder, like so :

./duplicati-server-util

but it wrote me : Required command was not provided

Then i tried :

it didn’t work, same message as before, still needed to login with a password, and it didn’t accept the password that i did set up.
Then i tried to edit the /etc/default/duplicati file, changed the DAEMON_OPTS, as you mentioned, and then restart, and yes, it worked.
I thank you :wink:
I could then change finally the password with the gui, modify again the /etc/default/duplicati file like before i made changes, and tried to see the gui again, it worked.
I did clean the web browser cache, and tried, and it worked (without asking a password) :slight_smile:
The last test i want make is when i restart my pc, and see if it still works.
But that will be tomorrow as today were a much busy day!

Anyway, i thank you much for your help :wink:

Well, i tried after reboot from computer, launched Duplicati, and…still the same, asking password, and whatever password you write, it don’t work.
So i guess i’ll look for let the daemon_opts with a defined password, and continue to work so with Duplicati. (out of you have another solution?)
Thanks for your help :slight_smile:

How? If you’re using systemd to launch duplicati-server, you shouldn’t launch another.

What URL are you typing into? The systemd one is probably http://127.0.0.1:8200

Hi thanks for reply ts678.
by launching Duplicati, i meant clic on the icon in Debian in the apps menu.
This probably does start the webservice, and then, i need to open firefox and type http://127.0.0.1:8200 for can see the gui / web interface.
But as i mentionned before, it does open a windows where is written:

Connection to server was rejected due to invalid authentication.

Log in again, or re-open the page from the TrayIcon (if applicable)

and when i clic on log-in button, any of the password i enter is invalid.
But, with the tip from kenkendk (post 5 in this conversation), by modify the daemon-opts, i could temporarily access after the login page, change the password, and relogin with success.
The only problem is that, when i reboot the computer, (after i have cleaned the daemon opts) it’s like it no more works. (= it don’t recognize the new password)
So i guess i will probably need to permanently make a predefined password in the daemon-opts for can use Duplicati, unless there exists another way for can make it work?
Thanks for your help :slight_smile:

You possibly never configured systemd Duplicati to start at boot, so the URL went to the apps menu Duplicati which you never set a password for (due to directions for systemd).

If pgrep -a duplicati isn’t duplicati-server and systemctl status duplicati has disabled on first output line, then you’re not now in Duplicati that you worked to set up.

You should, however be able to get in without a password by actually using the Tray Icon that you launched. TrayIcon has pictures. The question is – which Duplicati do you want?

TrayIcon (process name is duplicati) runs as you, has limited power and needs a login. Running from systemd starts at boot (if enabled with sudo systemctl enable duplicati which might be (preferable except for having to set up a password and use it sometimes).

Choosing Duplicati Type has some discussion. You got setup directions for a Server, then used TrayIcon (I suspect). Switching the user also got a completely different configuration.

Hi, i tried

and for pgrep -a duplicati => no answer
and for the systemctl command → duplicati service loaded but disabled and inactive (dead)

I think the TrayIcon installation would be better for me. But after reading the TrayIcon page, and the choosing Duplicati type page, i don’t see how i can do for make appear the icon picture in the upper right of my screen.
What’s strange is that, i did set up for some month a new Duplicati installation on another computer, and this one installation has a TrayIcon, and works fine !

So how can i make appear the TrayIcon on my current computer ?
Thanks for your help :slight_smile:

Presumably meaning no error, but no output line, meaning the server isn’t there due to

which is where your password setup was left – and the TrayIcon route is giving trouble.

Look all around. Different systems use different places. Mine is in lower right of screen.

Please give numbers, and say whether it uses Gnome or KDE. The reason I ask is this:

I’m not sure where this issue landed, but maybe one of the participants will have news.

Please see if you can think of any difference in the computers and Duplicati installation.

I suppose while we wait to see if you and the others can get that sorted out, you can try enabling and starting the systemd version. Before doing that, do the pgrep look to see whether duplicati is actually running. If the actual icon isn’t around anywhere, then it doesn’t have a menu to Quit, so needs kill of its PID. After it’s down, server can start.