Duplicati as a Service - Windows


Tested with Duplicati 2.0.2.13 on Windows 10 and Windows 11.

This assumes you've already downloaded and installed the latest Duplicati.


Update for 2024 for Duplicati 2.0.9/2.1.0 and newer!

You need to set a password to access the web interface.

With the service running, run this from the command line to choose a password:

Duplicati.CommandLine.ServerUtil.exe --server-datafolder=C:\ProgramData\Duplicati change-password

Then update your Tray Icon shortcut to add the password:

Duplicati.GUI.TrayIcon.exe --no-hosted-server --webservice-password=your_password

Note, the Tray Icon will HANG unless you use Canary v2.1.0.101 from December 6th, 2024 or newer (i.e. it is broken in the current 2.1.0 beta).


For running Duplicati as a service, I use NSSM, which you can download from here:
https://nssm.cc/

  • Grab the latest release of NSSM and extract the nssm.exe file to your \Windows\System32 directory.
  • Close/exit Duplicati if it is running.
  • Open a command prompt and run this to start service creation:
  • nssm install

Fill in the fields of the NSSM application:

Path: C:\Program Files\Duplicati 2\Duplicati.Server.exe
Service Name: Duplicati
Display Name: Duplicati 2
Description: Duplicati 2 Backup Service
Environment: Duplicati_Home=%AllUsersProfile%\Duplicati


The last part (Environment) sets Duplicati's working directory to C:\ProgramData\Duplicati. If you leave that out, Duplicati defaults to using \Windows\System32\Config\SystemProfile\AppData\Local\Duplicati, and that location may be lost when upgrading Windows.


For the Tray icon:

  • Disable Duplicati from running on Startup, using Task Manager (if using a current build of Windows or Windows Server) or msconfig (if using something like Windows 7 or Windows Server 2008 R2).
  • Modify the properties of any Duplicati 2 shortcut and add --no-hosted-server to the end of the command.
  • (it will look like this: "C:\Program Files\Duplicati 2\Duplicati.GUI.TrayIcon.exe" --no-hosted-server)

Run the modified shortcut to load the system tray icon.


You should be able to start the service, and it will run automatically in the background on boot. Please remember not to run any of the shortcuts Duplicati makes unless they have --no-hosted-server appended to their command (if not, they will start up an additional service).