For now, there is a executable that is called Duplicati.WindowsService.exe that you can call like this:
Duplicati.WindowsService.exe install
You can run it from a terminal/powershell to see detailed usage.
It is not part of the installer, because using it this way exposes a webserver that runs with Administrator privileges, which I do not recommend.
Once we get a better auth mechanism implemented, it will be an option in the installer to add the privilege elevation service, and only that part will then run as a service.
Many thanks for the quick help! Restarting the PC, uninstalling and reinstalling again has helped. The service was obviously still marked for deletion.
Other question: Previously, the configuration was saved as a service in this file during installation: C:\ProgramData\Duplicati\Duplicati-server.sqlite
I no longer have this file, but the service obviously saves its configuration somewhere, as the data entered is still available after restarting the PC. But where, I can’t find it? Registry, file system?
Ordinarily, a command is invoked by using its name followed by any arguments. However, the command-invocation operator, &, can be used. If the command name contains unescaped white space, it must be quoted and invoked with this operator.
Not really. That’s Duplicati server configuration file, but isn’t related to Windows service.
Windows service mechanism is internal to Windows, and used through a variety of UIs.
Are you saying it did just what you asked? Are you looking for a previous config or what?
The default location, if you ran Duplicati as a service before, is in a fragile folder which is C:\Windows\System32\config\systemprofile\AppData\Local\Duplicati, a.k.a. %LOCALAPPDATA%\Duplicati for the SYSTEM user. It’s best to move it elsewhere since
this area tends to get moved to C:\Windows.old on Windows version updates. Not good.
Basically please clarify the problem. If there was a Duplicati before, please describe that.
Finally getting around to testing this on one of my Windows servers, but wanted to know before I do: Is the MSI parameter FORSERVICE=“true” still accepted?
First test on Windows Server 2022, upgrading from the last beta 2.0.8, and it’s not good news.
The install seemed to go without incident using the MSI with the “FORSERVICE” setting as mentioned before, but the service will not start. I get in the event log:
Application: Duplicati.WindowsService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeLoadException
at Duplicati.WindowsService.Program.Main(System.String[])
Faulting application name: Duplicati.WindowsService.exe, version: 2.0.8.1, time stamp: 0x663a1359
Faulting module name: KERNELBASE.dll, version: 10.0.20348.2461, time stamp: 0x6008e061
Exception code: 0xe0434352
Fault offset: 0x000000000003f19c
Faulting process id: 0xb7c
Faulting application start time: 0x01dab8c922cc062e
Faulting application path: C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: e96e8aaa-ca17-4dd7-855b-5b553a2e14e7
Faulting package full name:
Faulting package-relative application ID:
The service command I use is, which uses Local System:
If I run it from the command line, where will it grab the profile from?
To get around the issue where major Windows updates doesn’t move the systemprofile folder, I have in place directory links in the Local and Roaming folders that replace the real Duplicati folders but point at where they really should be, “C:\ProgramData\Duplicati”. After an upgrade and before running Duplicati I make sure the two links are recreated with mklink.
It will use %APP_DATA%\Duplicati by default, but you can pass the same arguments as you did for the service (the service actually passes them to the server).
But the error you see happens when the service starts, and indicates that some library is missing.
By starting the server, we can isolate if the problem is with the service (my best guess) or generally with Duplicati.
Unhandled Exception: System.TypeLoadException: Could not load type 'System.Object' from assembly 'System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' because the parent does not exist.
at Duplicati.Server.Program.Main(String[] args)
Reinstalling without the parameter made no difference.