Could not run as daemon on CentOS 7.7

I installed Syncthing on CentOS 7.7, it is run in shell narmaly, but run as daemon with tomcat user failed. the journal say “Error opening database: open /usr/tomcat/.config/syncthing/index-v0.14.0.db/LOCK: read-only file system” I check the fcontext is “system_u:object_r:temp_t1”

thanks very much!

/etc/systemd/system/syncthing@tomcat.service [Unit] Description=Syncthing - Open Source Continuous File Synchronization for %I Document=man:syncthing(1) StartLimitIntervalSec=60 StartLimitBurst=4

[Service] User=%I ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0 Restart=on-failure SucessExitStatus=3 4 RestartForceExitStatus=3 4


ProtectSystem=full PrivateTmp=true SystemCallArchitectures=native Memory DenyWriteExecute=true NoNewPrivileges=true


Is the tomcat user able to write in that folder?

yes, the tomcat running OK.

The hardening options from systemd probably don’t let you write into that folder.

I’m on the phone right now so I can’t check, but I think you can do this:

sudo systemctl edit syncthing@tomcat

Then enter this into the override file, save and exit:


1 Like

thank you, i will try it later

1 Like

I found the way in Syncthing won't start after a power outage.

I modify the service configuration as ProtectSystem=strict ReadWritePaths=/usr/tomcat/.config/syncthing PrivateTmp=true SystemCallArchitectures=native MemoryDenyWriteExecute=true NoNewPrivileges=true

But the listenning ip is, how to change it? The GUI address is “” in /usr/tomcat/.config/syncthing/config.xml.

Have you checked the systemd unit file? Perhaps it’s being overridden there?

You are likely just interpreting the logs wrong. There’s two distinct lines:

[YPOXT] INFO: GUI and API listening on
[YPOXT] INFO: Access the GUI via the following URL:

The former is relevant, the latter is just how to access it from localhost ( is just a placeholder meaning “accessible from everywhere”).

thank you!

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