# Configuring systemd to start Syncthing

**URL:** https://forum.syncthing.net/t/configuring-systemd-to-start-syncthing/12859
**Category:** Support
**Created:** [February 17, 2019, 1:35am UTC](https://forum.syncthing.net/t/configuring-systemd-to-start-syncthing/12859 "2019-02-17T01:35:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bruceg](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/b/e274bd/32.png) [@bruceg](https://forum.syncthing.net/u/bruceg)
#### Post date: [February 17, 2019, 1:35am UTC](https://forum.syncthing.net/t/configuring-systemd-to-start-syncthing/12859/1 "2019-02-17T01:35:22Z")

</div>

I installed Syncthing and had it happily syncing files while running it from the command line and connecting with a browser. I now want to have it start automatically with a specific user and tried the instruction set here: [https://docs.syncthing.net/users/autostart.html](https://docs.syncthing.net/users/autostart.html).

I have tried setting it up as a system service and after entering systemctl enable syncthing@www-data.service systemctl start syncthing@www-data.service

I then run systemctl status syncthing@www-data.service and that shows that it isn’t running as shown below. What am I doing wrong?

● syncthing@www-data.service - Syncthing - Open Source Continuous File Synchronization for www/data Loaded: loaded (/etc/systemd/system/syncthing@.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sat 2019-02-16 20:30:34 EST; 21s ago Docs: man:syncthing(1) Process: 605 ExecStart=/usr/local/bin/syncthing -no-browser -no-restart -logflags=0 (code=exited, status=1/FAILURE) Main PID: 605 (code=exited, status=1/FAILURE)

Feb 16 20:30:33 pbx1 systemd[1]: syncthing@www-data.service: Unit entered failed state. Feb 16 20:30:33 pbx1 systemd[1]: syncthing@www-data.service: Failed with result ‘exit-code’. Feb 16 20:30:34 pbx1 systemd[1]: syncthing@www-data.service: Service hold-off time over, scheduling restart. Feb 16 20:30:34 pbx1 systemd[1]: Stopped Syncthing - Open Source Continuous File Synchronization for www/data. Feb 16 20:30:34 pbx1 systemd[1]: syncthing@www-data.service: Start request repeated too quickly. Feb 16 20:30:34 pbx1 systemd[1]: Failed to start Syncthing - Open Source Continuous File Synchronization for www/data. Feb 16 20:30:34 pbx1 systemd[1]: syncthing@www-data.service: Unit entered failed state. Feb 16 20:30:34 pbx1 systemd[1]: syncthing@www-data.service: Failed with result ‘exit-code’.

---

<div class="post-metadata">

### Author: ![imsodin](https://forum.syncthing.net/user_avatar/forum.syncthing.net/imsodin/32/3317_2.png) [@imsodin](https://forum.syncthing.net/u/imsodin)
#### Post date: [February 17, 2019, 9:24pm UTC](https://forum.syncthing.net/t/configuring-systemd-to-start-syncthing/12859/2 "2019-02-17T21:24:47Z")

</div>

There are just systemd specific log lines, nothing about why Syncthing failed. You can get the full log relating to Syncthing with `journalctl -r -u syncthing@www-data`.

---

<div class="post-metadata">

### Author: ![bruceg](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/b/e274bd/32.png) [@bruceg](https://forum.syncthing.net/u/bruceg)
#### Post date: [February 17, 2019, 9:40pm UTC](https://forum.syncthing.net/t/configuring-systemd-to-start-syncthing/12859/3 "2019-02-17T21:40:39Z")

</div>

I found the problem - it was a permissions issue. All good

---

<div class="post-metadata">

### Author: ![system](https://forum-uploads.syncthingcdn.net/original/2X/0/0b50e0a202b22ae6a67190759e8c868805b8ed9f.png) [@system](https://forum.syncthing.net/u/system)
#### Post date: [March 19, 2019, 9:40pm UTC](https://forum.syncthing.net/t/configuring-systemd-to-start-syncthing/12859/4 "2019-03-19T21:40:39Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
