Commit Graph
284 Commits
Author SHA1 Message Date
Kenneth Skovhede 07cd39af34 Add support for managed TLS
This PR adds support for generating a self-signed CA and then using that CA to generate TLS certificates.

A new tool `duplicati-configure` / `Duplicati.CommandLine.ConfigureTool.exe` is added to manage the certificates.  The tool saves the configuration in the database and is meant to run with elevated privileges for the initial CA installation.

The option `--configure-https` can be added to server/trayicon, and if the process has permissions, this will automatically install the CA certificate.

If a CA is configured, the server will automatically issue, renew and use a TLS certificate.

With this setup, the TLS is opt-in, but once the flow is well tested, we can switch it to opt-out.
2026-03-01 11:33:05 +01:00
Kenneth SkovhedeandGitHub 264f455319 Merge branch 'master' into feature/assign-license-from-console 2026-02-20 13:09:10 +01:00
Kenneth Skovhede ab82719a6b Improved license key support
Added support for reporting the license key details in SystemInfo.

Added support for loading a key via the console connection, if used.
2026-02-20 10:39:51 +01:00
Kenneth SkovhedeandGitHub a2d247adb3 Merge branch 'master' into feature/folder-status-indicator 2026-02-19 19:30:31 +01:00
Kenneth Skovhede 01130f4cd5 Implemented option to enable folder-status service (disabled by default). 2026-02-19 17:30:57 +01:00
Kenneth Skovhede 05ea1dfafe Check free temporary space
This PR adds checks for free temporary space when starting the server and when restoring.

On systems that have limited space in the temp folder a warning will now be shown.

This is intended to capture issues on some Docker systems where /tmp is mounted in memory instead of being disk backed.

It will also detect the issue on other systems that are space constrained.
2026-02-06 10:37:27 +01:00
Kenneth Skovhede 08a93c2740 Automatically encrypt settings database if secret provider supports setting the password. 2025-12-07 22:55:31 +01:00
Kenneth Skovhede f4df272a0b Change the Windows Eventlog option type.
Before this PR the Windows Eventlog option was incorrectly typed as a boolean but was intended to be the log name.

This was confusing and caused a warning in the log that the option was incorrectly parsed.
2025-12-03 10:34:58 +01:00
Kenneth Skovhede 6a2af13a5c Fixed startup delay not working
This PR fixes a race during startup, where it was possible for the scheduler to start before the runner was paused, such that tasks could be started, even if the server was supposed to be paused.

This also fixes a more direct issue where the state was not updated during startup, so the UI could look paused, but the runner was active and accepting tasks.

This fixes #6634
2025-12-01 17:01:52 +01:00
Kenneth Skovhede b4ec7ca25f Updated some xmldoc string 2025-11-06 13:34:09 +01:00
Kenneth Skovhede ea83087db3 Clear notification for resolved issues
This PR removes configuration issue notifications if the underlying issues are resolved. With this PR the flow is expected to be:
1. Start application, see warning
2. Fix problem
3. Restart application
4. Notification is gone

Before this PR, step 4 was not performed, making it look like the issue was not resolved, if the user had not dismissed the notification themselves.
2025-11-01 09:35:35 +01:00
Kenneth SkovhedeandGitHub b00a0ffbdb Merge pull request #6550 from duplicati/feature/add-power-mode-provider-selection
Add PowerMode provider selection
2025-10-20 08:25:29 +02:00
Kenneth Skovhede 6ed507c0b3 Add option to limit modules
This PR adds the option to limit the available modules to just the set of specified choices.

If no option is set, all modules are available (default).
If the option is set, only those in the list are available (whitelisting).

The options are:
- `--allowed-backend-modules`
- `--allowed-encryption-modules`
- `--allowed-compression-modules`
2025-10-17 10:01:31 +02:00
Kenneth Skovhede 3269c87329 Add PowerMode provider selection
This PR adds settings to choose a Power Mode provider, which will detect if the system is in a paused/suspended state and avoid starting tasks while being suspended.

This currently only works for Windows, where the previous inplementation is named `NET` (for .NET) and the new mode is named `Native` and using the Windows documented approach with a hidden window that listens for `WM_POWERBROADCAST` messages.

The default is `Native` but can now also be disabled by choosing the `None` provider.
2025-10-15 17:58:24 +02:00
Kenneth Skovhede d675b3926e Fix a typo
This fixes #6502
2025-09-16 09:51:44 +02:00
Kenneth Skovhede 3ae93f0102 Prevent thread leak in TrayIcon
This PR changes the termination signal to a `CancellationToken` instead of a `ManualResetEvent` as the former works better with async code.

With this change there is no longer a thread being captured during each long poll operation.

This fixes #6452
2025-08-07 11:50:01 +02:00
Kenneth Skovhede 260ac36836 Fixed datafolder help showing the env var name
This fixes #6431
2025-07-27 11:45:18 +02:00
Kenneth Skovhede fc478146f3 Update ServerUtil probing
This PR updates the probing logic to not try the database if a password is supplied on the commandline.

It also fixes a crash that could happen at an unwanted place, if the user does not have write access to the supplied data folder. After this, the application will still crash due to not having  a place to write information, but it does not crash in the preloader logic. This also prevents creating the folder while probing for the database.

This PR also fixes a case where the database could become encrypted, if the ServerUtil was providing an encryption key to an unencrypted database. Before this fix, the database would be encrypted with the key provided to ServerUtil, which would most likely cause the Server/TrayIcon to fail starting and perhaps crash.

This fixes #6377
2025-07-10 21:03:16 +02:00
Kenneth SkovhedeandGitHub 5ff613b5da Merge pull request #6360 from carljohnsen/performance/mssqlite-async
Performance/Asynchronous database backend
2025-07-03 11:07:26 +02:00
Kenneth SkovhedeandGitHub ffde75a7ee Merge branch 'master' into feature/pkill-termination-issues 2025-07-01 15:18:58 +02:00
Kenneth Skovhede 395a95b723 Configureable refresh token timeout
This PR adds an option to define the timeout for the refresh token. The token is default set to 30 days.

If the user interacts with Duplicati (i.e., loads the page) the refresh token is regenerated, meaning that the user is not asked to log in again unless the refresh token has expired fully.

With this PR it is possible to configure this duration to be a shorter period, but not longer than the 30 days.
2025-06-29 16:57:47 +02:00
Marcelo C. f7bb2d0e6b Ammending changes 2025-06-27 11:19:24 -03:00
Marcelo C. 3863dbe7ce Addresses shutdown and thread safety issues
Improvement on AvaloniaRunner, HttpServerConnection, and HostedInstanceKeeper to prevent race conditions during shutdown.

Adds cancellation tokens and locking mechanisms to ensure that operations are properly stopped and resources are released in a controlled manner.

Also handles a NullReferenceException during Avalonia shutdown, and avoids invoking `InstanceShutdown` or `ConnectionClosed` multiple times.
2025-06-25 15:24:04 -03:00
Carl Johnsen 90721af98d Updated Server and ImportExportTests to use the async database backend 2025-06-11 08:58:32 +02:00
Carl Johnsen 94420be76d Removed whitespace 2025-06-11 08:58:07 +02:00
Kenneth Skovhede 55d821add1 Added support for disabling API extensions from the commandline
Also added extension that signals if websocket is supported.

Also removed the option to disable visual captcha as it is no longer used.
2025-05-28 12:47:42 +02:00
Kenneth Skovhede 948f74b57e Ensure claim link is emitted 2025-05-16 13:31:34 +02:00
Kenneth Skovhede 6750779982 Register remote control for TrayIcon
This adds the option to register for remote control on the TrayIcon or Server via commandline arguments.

This fixes #6255
2025-05-16 11:42:50 +02:00
Kenneth Skovhede c9f985ecdd Final removal of FIXMEGlobal 2025-05-05 16:13:46 +02:00
Kenneth Skovhede 4191ed31cb Removed unused ServerName property 2025-05-05 14:21:24 +02:00
Kenneth Skovhede 0bc335598a Removed the LogWriteHandler from FIXMEGlobal 2025-05-05 13:41:28 +02:00
Kenneth Skovhede 467c6eb44c One more removal from FIXMEGlobal 2025-05-04 12:21:06 +02:00
Kenneth Skovhede 1947b93a73 One more FIXMEGlobal fix 2025-05-04 12:17:44 +02:00
Kenneth Skovhede eaf6fe5f26 One more FIXMEGlobal removal 2025-05-03 16:25:24 +02:00
Kenneth Skovhede 16acb282c9 More FIXMEGlobal cleanup 2025-05-03 15:54:23 +02:00
Kenneth Skovhede 072f89c747 Remove WorkerThread class
This removes the WorkerThread class and many of the complications around it.

Instead of having a generic worker, there is now the `QueueRunnerService` which takes on all the resposibilities for handling queued tasks.

This is one step towards removing `FIXMEGlobal`
2025-05-03 15:01:09 +02:00
Kenneth Skovhede 4ecb85d2de Added task metadata
This adds the task start and finish time.

The tracking of completed tasks has been moved to a separate service to reduce the use of FIXMEGlobal.
2025-05-02 15:11:34 +02:00
Kenneth Skovhede ba298df915 Added an upgrade command to the database tool 2025-04-25 12:30:03 +02:00
Kenneth SkovhedeandGitHub cfc322c629 Merge pull request #6122 from duplicati/feature/remove-positional-sql-arguments
Remove positional arguments from SQL queries
2025-04-04 11:49:36 +02:00
Kenneth SkovhedeandGitHub 50024dd901 Merge pull request #6097 from duplicati/feature/add-pre-auth-headers
Add support for pre-authenticated headers
2025-04-03 17:17:48 +02:00
Kenneth SkovhedeandGitHub 4779fe96a1 Merge branch 'master' into feature/remove-positional-sql-arguments 2025-04-03 17:09:32 +02:00
Kenneth Skovhede 0b735d79ff More cleanup and a few bug fixes 2025-04-03 16:38:51 +02:00
Marcelo C. bf22d7e178 Changed parameter from boolean to Enum for clarity of purpose 2025-04-02 10:15:21 -03:00
Marcelo C. 2da12c12bb Refactoring of how permissions are set whilst obtaining DataFolder
This addresses [Issue](https://github.com/duplicati/duplicati/issues/6114).

Whenever in non-write context, the permissions of the folder are not set.

Changing pattern from static constructor execution.
2025-04-01 15:21:40 -03:00
Kenneth Skovhede d12b57cb71 Add support for pre-authenticated headers
This adds support for providing a custom defined token instead of using the JWT tokens.

The intended use is for deployments where the authentication is provide by a different layer (a proxy service).
2025-03-28 13:47:27 +01:00
Kenneth Skovhede e056e651f9 Fixed issues with cross-talk options from TrayIcon and Server 2025-03-25 11:36:44 +01:00
Kenneth Skovhede 1a38df7709 Cleaned up some callbacks to not use events with async methods.
Implemented argument validation for the TrayIcon and server startup.
2025-03-25 11:14:03 +01:00
Kenneth Skovhede 9501470d0d Added listen interface to startup message 2025-02-14 11:28:22 +01:00
Kenneth Skovhede 3da02c552c Added force terminate support for Windows 2025-02-09 11:01:21 +01:00
Kenneth Skovhede da1f6562ea Added option to log to console 2025-02-09 10:29:04 +01:00