Translated: I am in Windows 10 Environment…, thank you.
Sorry. That reply was for the fifth user here. You’re the fourth, but came by again.
Multiple issues from multiple people on multiple OS mixed in one topic is difficult.
So you had the known Open problem with--no-hosted-server in 2.1.0.5, but a Pause or Quit worked. And you had the “same behavior” as I just described here, in 2.1.0.111 too? Or some other behavior? There are so many mentioned here to see.
Hello there.
Again another words from me and my “problem”.
After a lot of trial and error, i decided to only use the webUI and ditch the tray icon feature.
I installed Canary 111 onto my workstation and work laptop because i wanted this feature (yes, its a terrible idea and i was aware of the problems a canary can have), but after i thought i got it running, today the tray icon wont launch. Tried different launch arguments, but nothing helped.
IT is not my main job and i dont have time and nerves to figure out what is exactly the problem.
When a stable release has the flawless experience of the tray icon (and its compatible with Windows and Linux with different DEs), i will give it a new shot and update, but for now, the webUI solution is the best i could get.
I would like to have a tray idicator of the current state of my backups, but its to incalculable if its working or not.
I still want to use and believe in Duplicati as a software, because my old backup solution, Deja-Dub, was little on settings for timed backups and Pika only exisits as a Flatpak and is Linux only and bc im administrating many machines with Linux and Windows, i dont want to fiddle around with different types of applications.
This should not be to blame the devs, i know how frustrating one little bug can be, but should point out the situation, where a good result cant be acchieved without heavy configuration effort.
Have a great day and im loocking forward to new releases with potential fixes!
This doesn’t say much about what you did or how it failed. Were you trying this?
C:\Program Files\Duplicati 2>Duplicati.GUI.TrayIcon
C:\Program Files\Duplicati 2>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
Server has started and is listening on port 8200
What OS did you use? On Linux, TrayIcon launches from duplicati command.
My original config for the service was:
–webservice-interface=loopback --webservice-port=http://localhost:8200 --portable-mode --webservice-password=[PASSWORD]
Both worked fine, until for some mysterious reason it wont. Server part is fine, but tray makes nothing.
Starting the tray manual from terminal (either with no arguments or with them above) gives me errors about AutoUpdater and some Mono stuff (if there is a way to upload the result, let me know, im not much into helping-by-text):
System.TypeInitializationException: The type initializer for ‘Duplicati.Library.AutoUpdater.DataFolderManager’ threw an exception.
Nothing what i can use to find a solution for (bc im not into developing).
I user Linux on my workstation and my laptop (Mint 22.1), Windows 10 22H2 and 11 24H2, LTSC IoT (2021 and 2024), and Ubuntu 24.04 in VM.
lol thank you very much for your help always ts678!
Yes, I’m on version 2.1.0.5 stable with a problem with Trayicon, which works PAUSE and QUIT, but OPEN doesn’t work (it doesn’t open the browser) - everything else is normal… including accessing localhost:8200 . If I didn’t make a mistake in the translation of a post above, I understood that by replacing Duplicati.GUI.TrayIcon.exe from version 2.1.0.5 stable with Duplicati.GUI.TrayIcon.exe from version 2.1.0.111 (replacing it, unzipping the zip from version 2.1.0.111, and taking Duplicati.GUI.TrayIcon.exe and pasting it in c:\Program Files\Duplicat 2...), I had understood that this was a temporary solution… I did it and was not successful, it was exactly the same as with Duplicati.GUI.TrayIcon.exe from version 2.1.0.5.
The server will attempt to use port 8200 and terminate if that port is not available. Use the commandline option to set a specific port:
--webservice-port=<port number>
Default port is 8200, so maybe you did no harm. Regardless, you say server’s OK.
TrayIcon has the same wrong use, and I don’t know what it would do for that case.
--hosturl: Supply the url that the TrayIcon will connect to and show status for
Detached TrayIcon is what you’re trying to set up. The suggestion to you from the developer was --hosturl=http://127.0.0.1:8200, but I think that’s also default.
You can drag small .zip files onto the compose window, but it’s also easy to put lines in with three backticks on the lines above and below. This will stop line wrap.
Mono should be nowhere in sight if you are actually on 2.1. It doesn’t use mono.
Where does sentence split, and when you test TrayIcon and Server, what is where?
On any Duplicati where you can do a login, About screen will say version. Is it 2.1?
On any Duplicati where you can run TrayIcon (duplicati on Linux), there’s also a Command Line Interface CLI you can run with no arguments to get help + a version.
In a mixed system with --no-hosted-server tray icon and separate server, keep versions the same, and especially don’t mix 2.0 and 2.1.
If you’d rather look at installation files, I showed Windows. Linux might be /usr/lib/duplicati but it can vary. Look at the top of the changelog.txt file to see what’s there.
I dont know why the Mono thing is there, bc it was replaced by dotNET. Only 111 Canary was installed on my workstation, so there should not be any traces to Mono, but they are.
I only used 111 Canary and the newest stable 2.1.0.5, nothing in between and never together, always cleaned up every service (Linux and Windows) and config files.
I only used the Tray Icon from the corresponding Server-Install, no mix of versions.
Here the output if i use “duplicati” in terminal without any arguments (111 Canary):
Crash!
System.TypeInitializationException: The type initializer for ‘Duplicati.Library.AutoUpdater.DataFolderManager’ threw an exception.
—> System.InvalidOperationException: Operation not permitted
—> Mono.Unix.UnixIOException: Operation not permitted [EPERM].
— End of inner exception stack trace —
at Mono.Unix.UnixMarshal.ThrowExceptionForLastError()
at Mono.Unix.UnixMarshal.ThrowExceptionForLastErrorIf(Int32 retval)
at Mono.Unix.UnixFileSystemInfo.SetOwner(Int64 owner, Int64 group)
at Duplicati.Library.Common.IO.PosixFile.SetUserGroupAndPermissions(String path, Int64 uid, Int64 gid, Int64 permissions)
at Duplicati.Library.Common.IO.SystemIOLinux.DirectorySetPermissionUserRWOnly(String path)
at Duplicati.Library.AutoUpdater.DataFolderManager..cctor()
— End of inner exception stack trace —
at Duplicati.Library.AutoUpdater.PreloadSettingsLoader.ConfigurePreloadSettings(String& arguments, NamedExecutable executable, Dictionary2& dbsettings) at Duplicati.Library.AutoUpdater.PreloadSettingsLoader.ConfigurePreloadSettings(String[]& arguments, NamedExecutable executable) at Duplicati.GUI.TrayIcon.Program.Main(String[] _args) at Duplicati.GUI.TrayIcon.Net8.Program.<>c__DisplayClass0_0.<Main>b__0() at Duplicati.Library.Crashlog.CrashlogHelper.WrapWithCrashLog[T](Func1 method, String logdir, String applicationName)
Unhandled exception. System.TypeInitializationException: The type initializer for ‘Duplicati.Library.AutoUpdater.DataFolderManager’ threw an exception.
—> System.InvalidOperationException: Operation not permitted
—> Mono.Unix.UnixIOException: Operation not permitted [EPERM].
— End of inner exception stack trace —
at Mono.Unix.UnixMarshal.ThrowExceptionForLastError()
at Mono.Unix.UnixMarshal.ThrowExceptionForLastErrorIf(Int32 retval)
at Mono.Unix.UnixFileSystemInfo.SetOwner(Int64 owner, Int64 group)
at Duplicati.Library.Common.IO.PosixFile.SetUserGroupAndPermissions(String path, Int64 uid, Int64 gid, Int64 permissions)
at Duplicati.Library.Common.IO.SystemIOLinux.DirectorySetPermissionUserRWOnly(String path)
at Duplicati.Library.AutoUpdater.DataFolderManager..cctor()
— End of inner exception stack trace —
at Duplicati.Library.AutoUpdater.PreloadSettingsLoader.ConfigurePreloadSettings(String& arguments, NamedExecutable executable, Dictionary2& dbsettings) at Duplicati.Library.AutoUpdater.PreloadSettingsLoader.ConfigurePreloadSettings(String[]& arguments, NamedExecutable executable) at Duplicati.GUI.TrayIcon.Program.Main(String[] _args) at Duplicati.GUI.TrayIcon.Net8.Program.<>c__DisplayClass0_0.<Main>b__0() at Duplicati.Library.Crashlog.CrashlogHelper.WrapWithCrashLog[T](Func1 method, String logdir, String applicationName)
at Duplicati.GUI.TrayIcon.Net8.Program.Main(String args)
It looks like Duplicati 2.1 uses a file from the mono team to do POSIX stuff.
You can probably find it in your installation. It’s Mono.Unix.dll. Developer assistance would be good. Meanwhile, I’ll guess. It looks like what’s said in
This update sets permissions on the data folder and the databases to prevent unauthorized access from local accounts.
To opt out of setting permissions on each startup, place a file named insecure-permissions.txt inside the data folder.
The folder it thinks is too open is likely ~/.config/Duplicati.
Is it owned by the user trying to use duplicati, the tray icon? ls -ld on it will say, and next question is what are its perms?
You can try adding an empty insecure-permissions.txt to see if it helps.
EDIT 1:
I tested 2.1.0.112 installed from .zip. I ran ./duplicati, and perms changed.
Was drwxrwxr-x now drwx------ which means only accessible by owner.
I was and remain owner of that folder. If I weren’t, change would have failed.
Crash!
System.TypeInitializationException: The type initializer for 'Duplicati.Library.AutoUpdater.DataFolderManager' threw an exception.
---> System.InvalidOperationException: Operation not permitted
...
is what I get if I chown root Duplicati and try to start a tray icon as before.
EDIT 2:
touch Duplicati/insecure-permissions.txt didn’t help the first time, then I did chmod 777 Duplicati (was 700) so duplicati could see that file. That solved it.
EDIT 3:
Since --no-hosted-server doesn’t (I think) need the database in tray icon folder, question was whether it would still do the permission change. Test indicates it does. Set up the fail situation, tested with --no-hosted-server, fails. Not sure it should, however I didn’t design it. Maybe it’s inadvertent, or maybe there’s a design intent?
Usually underneath there. Former is default, second is --portable-mode.
So it’s maybe /root/.config/Duplicati or /usr/lib/duplicati/data.
Different OS might put it in other spot, some packagers don’t use root, etc.
Find the Duplicati-server.sqlite database, sanity-check by date. lsof its path. ps -fp the PID. It should show a user and a duplicati.
This morning i was again tinkering around a bit and did a fresh install of duplicati on Linux:
purge all old versions and directories
installed 111 canary (bc of the tray icon)
set up service like on the manual page with:
DAEMON_OPTS=“–hosturl=http://localhost:8200 --webservice-port=8200 --webservice-password=[PASSWORD]”
set up tray icon with:
“duplicati --no-hosted-server --hosturl=http://localhost:8200 --webservice-password=[PASSWORD]”
imported the backup config and did a DB repair
Now it works like a charm.
I think, there was a little missunderstanding from me how the software operates.
This is a solution i can live with.
Config is now under /root/.config/Duplicati/ and included in my backup job.
If manual page means server help text, it shows server doesn’t take that option, however the server ignores unknown options, so it might not be doing any harm.
The help text for the duplicati tray icon is partly client (like this), mostly server:
Supported commandline arguments:
--no-hosted-server: Set this option to not spawn a local service, use if the TrayIcon should connect to a running service
--read-config-from-db: Set this option to read server connection info for running service from its database (only together with no-hosted-server)
--portable-mode: Activate portable mode where the database is placed below the program executable
--webservice-port: The port the webserver listens on. Multiple values may be supplied with a comma in between.
--webservice-password: The password required to access the webserver. This option is saved so you do not need to set it on each run. Setting an empty value disables the password.
--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.
--hosturl: Supply the url that the TrayIcon will connect to and show status for
--browser-command: Set this option to override the default browser detection
--host-cert-hash: Set this option to accept a specific SSL certificate, the value should be the hash of the certificate in hexadecimal format. Use * to accept any certificate (dangerous)
Additionally, these server options are also supported:
Glad I could help. I do wish that this was easier to set up, so I’ll again lobby for:
on behalf of Windows users. I’m unsure how to do other OSs with other installers.
That’s always nice to read, but to others reading it, you probably had to dodge the 2.1.0.5 Stable --no-hosted-server Open bug by using a Canary. I hope for a fix.
If you run Duplicati as a daemon, it will run as root (unless you change it). If you can back up /root it certainly runs as the root user.
Just to clarify because it is a bit confusing:
duplicati-server: Server part of Duplicati running as root, and can be accessed with a browser
duplicati: The desktop part of Duplicati, running as local user, showing in tray on desktop
Once the daemon is running, you need to start the tray icon from your local user account. As @ts678 mentions, this needs to be run as your local user, as other users cannot interact with your desktop session, where the trayicon needs to be.
Since the duplicati binary is also used for instances where there is no daemon running you need --no-hosted-server to prevent it from starting another server (usually listening on port 8300). Also, since the two processes are running as different users, you need to provide the password to allow the tray icon to connect.
For Windows, replace duplicati with Duplicati.GUI.TrayIcon.exe.
If it does not work, try running it in a terminal as it will usually emit some log messages along the way.
Since there is a known bug in 2.1.0.5 that breaks this setup, you can grab the zip package for Duplicati 2.1.0.111 or newer, and run duplicati from within that folder. Since you are using --no-hosted-server, the actual backup part of things will still run 2.1.0.5, but the icon will run with the newer (fixed) code.
Yes, that is a known issue.
That is not the right way. The reason that it still works is because the file Duplicati.GUI.TrayIcon.exe is just a small entry exectuable that loads the rest of the files. And the file has not changed between the versions (except from the version information).
You need the 2.1.0.111 entire folder to be somewhere else, like C:\Program Files\Duplicati Canary 2.1.0.111. Once you have extracted files into that folder, you have two versions, and you can use the server/service part from the regular one and the TrayIcon from the canary folder.
Yes, that looks like a new issue with the security setup. It will assign restricted permissions to the folder, but it appears to fail here. I will add some logging and a fail-safe to that area.
I am thinking this can happen if you try to run with --portable-mode and having the files installed in /usr/lib/duplicati ?
Noted
Since --no-hosted-server does not need write access, it should not fiddle with permissions, but it shares the code to locate the database, which is what sets the permissions as a side-effect.
Unfortunately, there is quite a lot of code changes in the TrayIcon connection area. To create a hot-fix release we need to isolate the changes, which has not been possible so far. Alternative is to include a large chunk of related changes. For either case, I would want to have some kind of testing period for this to avoid introducing new issues into a stable release.
We don’t currently have a great way of doing this. One suggestion could be to do a new experimental release with the fixes, have some testing done on that, and then migrate it up.
It can happen if root run has made the data folder, otherwise it fails on that first.
Personally, I think --portable-mode is inherently likely to have permission issues.
$ pwd
/usr/lib/duplicati
$ head -1 changelog.txt
2025-03-26 - 2.1.0.112_canary_2025-03-26
$ ls -ld .
drwxr-xr-x 19 root root 49152 Mar 31 11:28 .
$ ./duplicati-server --portable-mode
Crash!
System.TypeInitializationException: The type initializer for 'Duplicati.Server.Program' threw an exception.
---> System.TypeInitializationException: The type initializer for 'Duplicati.Library.AutoUpdater.DataFolderManager' threw an exception.
---> System.UnauthorizedAccessException: Access to the path '/usr/lib/duplicati/data/' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at System.IO.FileSystem.CreateDirectory(String fullPath, UnixFileMode unixCreateMode)
at System.IO.Directory.CreateDirectory(String path)
at Duplicati.Library.AutoUpdater.DataFolderManager..cctor()
--- End of inner exception stack trace ---
at Duplicati.Library.AutoUpdater.DataFolderManager.get_InstallID()
at Duplicati.Library.Main.Options.get_SupportedCommands()
at Duplicati.Server.Program..cctor()
--- End of inner exception stack trace ---
at Duplicati.Server.Program.Main(String[] _args)
at Duplicati.Server.Net8.Program.<>c__DisplayClass0_0.<Main>b__0()
at Duplicati.Library.Crashlog.CrashlogHelper.WrapWithCrashLog[T](Func`1 method)
Unhandled exception. System.TypeInitializationException: The type initializer for 'Duplicati.Server.Program' threw an exception.
---> System.TypeInitializationException: The type initializer for 'Duplicati.Library.AutoUpdater.DataFolderManager' threw an exception.
---> System.UnauthorizedAccessException: Access to the path '/usr/lib/duplicati/data/' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at System.IO.FileSystem.CreateDirectory(String fullPath, UnixFileMode unixCreateMode)
at System.IO.Directory.CreateDirectory(String path)
at Duplicati.Library.AutoUpdater.DataFolderManager..cctor()
--- End of inner exception stack trace ---
at Duplicati.Library.AutoUpdater.DataFolderManager.get_InstallID()
at Duplicati.Library.Main.Options.get_SupportedCommands()
at Duplicati.Server.Program..cctor()
--- End of inner exception stack trace ---
at Duplicati.Server.Program.Main(String[] _args)
at Duplicati.Server.Net8.Program.<>c__DisplayClass0_0.<Main>b__0()
at Duplicati.Library.Crashlog.CrashlogHelper.WrapWithCrashLog[T](Func`1 method)
at Duplicati.Server.Net8.Program.Main(String[] args)
Aborted (core dumped)
$
(do a root run)
$ ls -ldn data
drwx------ 3 0 0 4096 Mar 31 11:32 data
$ ./duplicati-server --portable-mode
Crash!
System.TypeInitializationException: The type initializer for 'Duplicati.Server.Program' threw an exception.
---> System.TypeInitializationException: The type initializer for 'Duplicati.Library.AutoUpdater.DataFolderManager' threw an exception.
---> System.InvalidOperationException: Operation not permitted
---> Mono.Unix.UnixIOException: Operation not permitted [EPERM].
--- End of inner exception stack trace ---
at Mono.Unix.UnixMarshal.ThrowExceptionForLastError()
at Mono.Unix.UnixMarshal.ThrowExceptionForLastErrorIf(Int32 retval)
at Mono.Unix.UnixFileSystemInfo.SetOwner(Int64 owner, Int64 group)
at Duplicati.Library.Common.IO.PosixFile.SetUserGroupAndPermissions(String path, Int64 uid, Int64 gid, Int64 permissions)
at Duplicati.Library.Common.IO.SystemIOLinux.DirectorySetPermissionUserRWOnly(String path)
at Duplicati.Library.AutoUpdater.DataFolderManager..cctor()
--- End of inner exception stack trace ---
at Duplicati.Library.AutoUpdater.DataFolderManager.get_InstallID()
at Duplicati.Library.Main.Options.get_SupportedCommands()
at Duplicati.Server.Program..cctor()
--- End of inner exception stack trace ---
at Duplicati.Server.Program.Main(String[] _args)
at Duplicati.Server.Net8.Program.<>c__DisplayClass0_0.<Main>b__0()
at Duplicati.Library.Crashlog.CrashlogHelper.WrapWithCrashLog[T](Func`1 method)
Unhandled exception. System.TypeInitializationException: The type initializer for 'Duplicati.Server.Program' threw an exception.
---> System.TypeInitializationException: The type initializer for 'Duplicati.Library.AutoUpdater.DataFolderManager' threw an exception.
---> System.InvalidOperationException: Operation not permitted
---> Mono.Unix.UnixIOException: Operation not permitted [EPERM].
--- End of inner exception stack trace ---
at Mono.Unix.UnixMarshal.ThrowExceptionForLastError()
at Mono.Unix.UnixMarshal.ThrowExceptionForLastErrorIf(Int32 retval)
at Mono.Unix.UnixFileSystemInfo.SetOwner(Int64 owner, Int64 group)
at Duplicati.Library.Common.IO.PosixFile.SetUserGroupAndPermissions(String path, Int64 uid, Int64 gid, Int64 permissions)
at Duplicati.Library.Common.IO.SystemIOLinux.DirectorySetPermissionUserRWOnly(String path)
at Duplicati.Library.AutoUpdater.DataFolderManager..cctor()
--- End of inner exception stack trace ---
at Duplicati.Library.AutoUpdater.DataFolderManager.get_InstallID()
at Duplicati.Library.Main.Options.get_SupportedCommands()
at Duplicati.Server.Program..cctor()
--- End of inner exception stack trace ---
at Duplicati.Server.Program.Main(String[] _args)
at Duplicati.Server.Net8.Program.<>c__DisplayClass0_0.<Main>b__0()
at Duplicati.Library.Crashlog.CrashlogHelper.WrapWithCrashLog[T](Func`1 method)
at Duplicati.Server.Net8.Program.Main(String[] args)
Aborted (core dumped)
$
The intention of the flag (as indicated by the name) was to have Duplicati installed on a USB stick, and then run it from there. Unplug the stick and remove app and all configurations.
In such a setup, the idea was not to have it installed in a system folder.
Not sure how popular such a setup is today, with increased security policies etc.
There’s also a 2017 YouTube video suggesting using it for WindowsService install, which I’m pretty sure I’ve cited before, due to lack of better documentation or code.
Things do change, and old videos and forum topics get dated (but still get noticed).
This had me wondering about new secure DB folders + new SYSTEM DB location + downgrade, and I’m hoping it all works out. One 2019 forum posting has the usage:
so maybe it’s OK (likely SYSTEM), but if normal-user stuff can be there, it fails.
Dear kenkendk and TS678, I understood the temporary solution, and then I ran Duplicati.GUI.TrayIcon.exe --no-hosted-server --webservice-password= , from inside the unzipped folder of the canary version 2.1.0.111 and - yes!! trayicon works 100%
Thank you very much!
Ok, that should now be resolved. In any case I think for anything but the “portable on USB stick” mode, the right way is to provide --server-datafolder= and not store data in the Program Files folder.
From what I could read, this is how others do it. Hopefully the amount of users who randomly create a Duplicati folder for other purposes inside ProgramData is very low.