Migrating from User to Service install on Windows

Thanks to @martijnsmith for giving me the boost needed to “how-to” this!

If you want to run Duplicati as a Windows service instead of under a specific user account OR maybe you find that you keep getting errors such as the following, it could be that you’re running Duplicati under a user install for a non-administrator user.

System.UnauthorizedAccessException: Access to the path '<path>' is denied.


Firstly, congratulations on not doing everyday work as an administrator! :slight_smile:


Secondly, disclaimers - running Duplicati under an elevated account (such as “Run as administrator” or as a system account service) gives it access to parts of the system most users can’t normally get to - including other user’s folders!

This means that anybody with access to the backup could be able to see AND RESTORE folder & file listings of other users. If that’s not an issue for you, then great - forge ahead!


Thirdly, you can likely resolve this issue in a few different ways, including:

  1. Run Duplicati as a service (the official way)
  2. Install and run Duplicati under an administrator account
  3. Update the Duplicati.GUI.TrayIcon.exe shortcut in your Startup folder to “Run this program as an administrator” (under the Compatibility tab of Properties)

See also

  • v2 - uses “Move existing database”
  • v3 - solves the windows update/upgrade problem of deleting C:\Windows\System32\config\systemprofile\AppData\Local\Duplicati

(I, @johnvk, am hesitant to just update these instructions, so I provided links to other versions.)

Here we’re going to go over method #1.

  1. Stop the tray icon if you currently have it running
  2. Move the following from the “Src:” folder to the “Dst:” folder as shown bellow (use the “Prt:” folder if currently running in --portable-mode). Note that you may be prompted to give yourself access to the second folder:
    Src: C:\Users\ [your user name]\AppData\Roaming\Duplicati (Alternatively replace Roaming with Local.)
    Dst: C:\Windows\System32\config\systemprofile\AppData\Local\Duplicati
    (Prt: C:\Program Files\Duplicati 2\Data)
  3. Open a command prompt as an administrator (right click and select “Run as administrator”) and run Duplicati.WindowService.exe install in your Duplicati install folder (likely "C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe" install)
  4. If you get the “Installation has completed” message, you can start the service with sc start Duplicati (or use a Windows Service GUI, your choice)
    But if you get an error such as the following then you probably didn’t open your command prompt as an authorized administrator, try again
    System.UnauthorizedAccessException: Access to the path 'C:\Program Files\Duplicati 2\Duplicati.WindowsService.InstallState' is denied.
  5. Once the service has been started go ahead and close the command prompt window (we’re done with it now)
  6. Open a browser window and go to http://localhost:8200 to make sure the service is working and found your existing settings (if that fails but http://localhost:8300 works, then you may have forgotten to stop the tray icon)
  7. The Tray icon is no longer needed so you can remove Duplicati from your Startup programs. However, if you like having the icon around then be sure to update the properties of any shortcuts to it (such as in the Startup folder) to include --no-hosted-server parameter as part of the Target field (this tells the Tray Icon to connect to the service instead of starting it’s own instance).

There you’re done! Duplicati should now run when the machine starts up whether or not a user is actually logged on.

A few final notes:

  1. If you are using “User data” folders (or %my_documents%, %desktop%, etc.) in your Source note that these are dynamic and will change depending on the user account under which Duplicati is running, so if you set up these sources while logged in as “you” then change to the service you’ll get backups of the SERVICE account “My Documents”, “Desktop”, etc. To get around this, use full “Computer” paths (they should start with drive letters, “//”, or “\”).

  2. An issue was found with the service based Duplicati with Minio:
    Launch every night - #3

  3. To REMOVE the Duplicati service (not just turn it off) you run Duplicati.WindowsService.exe uninstall in your Duplicati install folder (so most likely something like "C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe" uninstall.

  4. If you experience errors like this one: Found 240 remote files that are not recorded in local storage, please run repair it is likely that your backup databases are not moved properly. To fix this go to the “Database …” menu under Advanced settings per backup job. There you will find an option to change the “Local database path” to your new Duplicati folder, the Dst-folder from step 2. Be careful if you have already moved the backup database files, so that you do not overwrite the proper ones.

10 Likes
Installed latest Duplicati but can't see it as a service
Install as Windows service
Theme not saving, password issue
How do I set up Duplicati in Windows Task Scheduler?
Errors and warning, what to do with them?
Modify behavior of trayicon
Moved to run as a service, but backups aren't showing up
unsupportedOption Duplicati.WindowService.exe
Duplticati and VSS are bad friends
Get Microsoft's Attention Over Windows Update Deleting Duplicati DB/Configs
No temporly files excel
How to see full list of errors and warnings?
Can't get 2.0.4.17_canary to work as service
Access to the path 'C:\Program Files\Duplicati 2\true' is denied
Duplicati Commandline options limited vs. Duplicati GUI options?
Duplicati on Windows Server
Repair and Rebuild database fails: Unexpected difference in fileset
Configuration consistency between application and service mode
Locked file, errors on outlook.pst
Taking a long time for 400GB
Scheduled Backup Does Not Run Without a User Logged On in Windows
Duplicati sqlite database doesn't seem to change after running backups (SOLVED)
Installed WindowsService, decided I didn't like it, tried to go back to Duplicati.GUI.TrayIcon.exe, now crashes on startup
Release: 2.0.4.5 (beta) 2018-11-28
Is Duplicati 2 ready for production?
Feedback from a new user - mainly Windows use
Tray Icon does not start after setting a UI password (Service Mode)
HELP?! Trying to use Duplicati, but something's always broken!
Backing Up Server 2012 R@ Access Denied
Backing Up Server 2012 R@ Access Denied
Running on remote server but not logged in
How to "Please Run Repair"
Lose settings when changing service user account
Odd issue after installing as service and Duplicati.GUI.TrayIcon.exe
Service (8300) tray (8200) toggle
Only one user account backing up
Source folder does not exist: but it does (Windows mounted drive)
Should 2.0.2.19 be promoted to the experimental channel?
Service installation has queued backups until user logs in interactively
Mapped drive or network path with Duplicati service
Duplicati.WindowsService not running as administrator
Issue upgrading to 2.0.9.108 (Canary) 2024-10-03
Changed from app to service: backup no longer found
Running as service, VSS not working
Automatic configuration backup?
GUI shows only 1 version + permission restore problem
Local disk credentials issue
The process cannot access the file because it is being used by another process
Backups suddenly taking much longer to complete
Duplicati as a service - more complicate than it need be
Migrating to Windows Service Installation
Files from Windows Server 2016
Gui restore works, commandline doesn't
Backingup LAN System's in Duplicati Server
Duplicati stopped working after logout
MS SQL Database not showing up
Odd issue after installing as service and Duplicati.GUI.TrayIcon.exe