# Tor -- RunAsDaemon 0|1, systemd and multiple tor services

**URL:** https://forum.torproject.org/t/tor-runasdaemon-0-1-systemd-and-multiple-tor-services/2708
**Category:** Core Tor
**Created:** [March 22, 2022, 11:53pm UTC](https://forum.torproject.org/t/tor-runasdaemon-0-1-systemd-and-multiple-tor-services/2708 "2022-03-22T23:53:33Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![smuggler](https://forum.torproject.org/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@smuggler](https://forum.torproject.org/u/smuggler)
#### Post date: [March 22, 2022, 11:53pm UTC](https://forum.torproject.org/t/tor-runasdaemon-0-1-systemd-and-multiple-tor-services/2708/1 "2022-03-22T23:53:33Z")

</div>

I’ve just downloaded and installed tor from the tor debian repo. It automatically set-up a systemd service, so if I `systemctl status tor@default` it prints the standard output, amongst them:

`Process: 25947 ExecStartPre=/usr/bin/tor --defaults-torrc /usr/share/tor/tor-service-defaults-torrc -f /etc/tor/torrc --RunAsDaemon 0 --verify-config (code=exited, status=0/SUCCESS)>`

So Tor is humming away and through enabling it as a systemd service also starts automatically if I reboot the machine.

Now I have following questions:

- in the `tor-service-default-torrc` RunAsDaemon is set to 1. I have nothing changed in the `torrc`, so RunAsDaemon is by default commented out. But why is the flag in the above service command `--RunAsDaemon` set to 0? I though a daemon is a program running in the background and this seems to be exactly what systemd should tor want to do? On what occasion should the flag be set to 1?
- there seem to be multiple systemd services: `tor@default.service, tor@.service` and `tor.service`. Can somebody explain to me what they are, why they are needed and how they interact?

Your help is really appreciated and I’m always thankful for resources which can bridge the gap between non-technical and technical explanations.

---

<div class="post-metadata">

### Author: ![overlord\_303](https://forum.torproject.org/user_avatar/forum.torproject.org/overlord_303/32/8325_2.png) [@overlord\_303](https://forum.torproject.org/u/overlord_303)
#### Post date: [March 21, 2026, 12:20am UTC](https://forum.torproject.org/t/tor-runasdaemon-0-1-systemd-and-multiple-tor-services/2708/2 "2026-03-21T00:20:30Z")

</div>

For anyone wondering this in the future, see: [[tor-commits] [tor/master] Explicitly disable RunAsDaemon in the systemd unit file (#12731).](https://archives.seul.org/or/cvs/Jul-2014/msg01520.html)
