# Properly running as Windows service

**URL:** <https://forum.duplicati.com/t/properly-running-as-windows-service/20188>\
**Category:** Support\
**Created:** [February 20, 2025, 8:40pm UTC](https://forum.duplicati.com/t/properly-running-as-windows-service/20188 "2025-02-20T20:40:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrew829](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/a/48db29/32.png) [@andrew829](https://forum.duplicati.com/u/andrew829)\
**Post date:** [February 20, 2025, 8:40pm UTC](https://forum.duplicati.com/t/properly-running-as-windows-service/20188/1 "2025-02-20T20:40:03Z")

</div>

I have never been able to get this right, it is always a pain. Trying to run as a Windows service there are so many issues. Updates don’t seem to work properly. It ends up running as a service and also in the user context on port 8200 & 8300.

What am I missing and how can I get this working properly?

---

<div class="post-metadata">

**Author:** ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)\
**Post date:** [February 23, 2025, 10:20pm UTC](https://forum.duplicati.com/t/properly-running-as-windows-service/20188/2 "2025-02-23T22:20:12Z")

</div>

Welcome to the forum @andrew829

> [@andrew829](#):
>
> Updates don’t seem to work properly.

What Duplicati version? 2.1 is different from prior ones, and more like a normal Windows install. Before then, Duplicati used its own autoupdater plan that was unreliable for some, including me. Generally the problem was that the expected restart didn’t happen, but a manual restart worked.

Your problem might be simpler than that though. You might just be asking for it to run both ways.

> [@andrew829](#):
>
> It ends up running as a service and also in the user context on port 8200 & 8300.

[Installing Duplicati on Windows](https://prev-docs.duplicati.com/en/latest/02-installation/#installing-duplicati-on-windows) has some pictures. The defaults are for a non-service TrayIcon.

Don’t tell it to do both. If you plan to use service only, you can install without its TrayIcon startup.

You can start read near “If you want to start the server component another way (i.e. by registering the server component as a Windows service), you have 2 options:”, and you could also uncheck:

 ![image](https://forum.duplicati.com/uploads/default/original/2X/7/7aa62d628a3619c66d8a4ae0d90783342a53695f.png)

If you are on a 2.1 Duplicati, a GUI password is now required if you haven’t set one already.

> [@andrew829](#):
>
> how can I get this working properly?

Is anything working improperly if you just use port 8200? That’s where the service should be.

If port 8200 has good jobs, great. If 8300 has no jobs, that’s because it’s a different Duplicati.

What are you seeing?

> [@andrew829](#):
>
> What am I missing

Hard to say with so little information, but it might be that TrayIcon usually runs its own server.  
[TrayIcon](https://docs.duplicati.com/duplicati-programs/trayicon) explains. [Detached TrayIcon](https://docs.duplicati.com/duplicati-programs/trayicon#detached-trayicon) explains how to use `--no-hosted-server` for service.

If you are on 2.1, there’s a new requirement for GUI password. That’s also talked about there.  
Getting perfect TrayIcon integration with a service is somewhat hard. Do you prefer TrayIcon?

EDIT 1:

OK, I’ll point to a missing feature. I think this is more important than ever, but isn’t on [roadmap](https://duplicati.com/roadmap):

> <https://github.com/duplicati/duplicati/issues/1738>
>
> The installer should have an option to install Duplicati as a service.
> 
> This wou…ld also need to change the start menu link to start the trayicon with \`--no-hosted-server\`.
> \## 
> 
> 
> \<bountysource-plugin\>
> 
> \---
> Want to back this issue? \*\*\[Post a bounty on it!\](https://www.bountysource.com/issues/33456741-update-windows-installer-to-offer-the-choice-of-installing-the-windows-service?utm\_campaign=plugin&utm\_content=tracker%2F4870652&utm\_medium=issues&utm\_source=github)\*\* We accept bounties via \[Bountysource\](https://www.bountysource.com/?utm\_campaign=plugin&utm\_content=tracker%2F4870652&utm\_medium=issues&utm\_source=github).
> \</bountysource-plugin\>

---

<div class="post-metadata">

**Author:** ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)\
**Post date:** [February 24, 2025, 9:39pm UTC](https://forum.duplicati.com/t/properly-running-as-windows-service/20188/3 "2025-02-24T21:39:54Z")

</div>

> [@andrew829](#):
>
> What am I missing and how can I get this working properly?

Besides the links already provided by @ts678 and the explanation, here is a concise description of what to do:  
[https://docs.duplicati.com/detailed-descriptions/using-duplicati-with-windows#running-the-server-as-a-windows-service](https://docs.duplicati.com/detailed-descriptions/using-duplicati-with-windows#running-the-server-as-a-windows-service)

If this is not clear, let me know and I will update the description.

---

<div class="post-metadata">

**Author:** ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)\
**Post date:** [February 24, 2025, 10:29pm UTC](https://forum.duplicati.com/t/properly-running-as-windows-service/20188/4 "2025-02-24T22:29:14Z")

</div>

The advice to “edit the shortcut to Duplicati” with secrets concerns me. Is that the Desktop one?

 ![image](https://forum.duplicati.com/uploads/default/original/2X/e/e4f6d87dd8286b3d629f3c2b1a0473f8e25825e1.png)

In addition to being public, isn’t this too likely to get replaced by `.msi` installer on next upgrade?

There is also a shortcut (I think) potentially in `shell:common startup` for the start at login, right?

`C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp`

EDIT:

For @andrew829 it may be worth working progressively through this. One can even run Duplicati directly from `C:\Program Files\Duplicati 2`. If it works, then you get `http://localhost:8200` if you like to bookmark and login at the GUI. If you like TrayIcon and automatic login, there’s more.

Shortcut editing can then get a TrayIcon manual start from Desktop, and maybe start-at-login too, however note that I’m starting to discuss possible drawbacks to shortcut edits, but I haven’t tested.

---

<div class="post-metadata">

**Author:** ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)\
**Post date:** [February 27, 2025, 8:38pm UTC](https://forum.duplicati.com/t/properly-running-as-windows-service/20188/5 "2025-02-27T20:38:45Z")

</div>

> [@ts678](#):
>
> Is that the Desktop one?

It is the shortcut you would use. Either from the startup menu or the desktop.

> [@ts678](#):
>
> he advice to “edit the shortcut to Duplicati” with secrets concerns me.

True. But since the two processes run in different user contexts the TrayIcon cannot be more trusted than any other process, so you need some way to establish trust between the local user and the service.

You can use either the `--server-datafolder` method and handle insecure permissions on the database, or use the password. In either case, you grant access from your local user to the service, and malware would be able to use the same access.

It does still provide security by refusing processes that can access the local network, or any browser security exploits. The malware would need to be able to read files in your user account for the access to work.

If you would like to not have the password inside the shortcut, you can use the [secret manager and integrate with the desktop keychain](https://docs.duplicati.com/detailed-descriptions/using-the-secret-provider/local-providers#credential-manager-windows) for your operating system.

> [@ts678](#):
>
> In addition to being public, isn’t this too likely to get replaced by `.msi` installer on next upgrade?

Yes, by default it will replace this on installer upgrades.
