debian 11 Unable to start

1

 sudo curl -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg

2

echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list

sudo apt update -y

3

sudo apt install syncthing -y

syncthing --version syncthing v1.22.2 “Fermium Flea” (go1.19.2 linux-amd64) deb@build.syncthing.net 2022-11-28 03:48:37 UTC [noupgrade]

4

cat /lib/systemd/system/syncthing@.service

[Unit]
Description=Syncthing - Open Source Continuous File Synchronization for %I
Documentation=man:syncthing(1)
After=network.target
StartLimitIntervalSec=60
StartLimitBurst=4

[Service]
User=%i
ExecStart=/usr/bin/syncthing serve --no-browser --no-restart --logflags=0
Restart=on-failure
RestartSec=1
SuccessExitStatus=3 4
RestartForceExitStatus=3 4

# Hardening
ProtectSystem=full
PrivateTmp=true
SystemCallArchitectures=native
MemoryDenyWriteExecute=true
NoNewPrivileges=true

# Elevated permissions to sync ownership (disabled by default),
# see https://docs.syncthing.net/advanced/folder-sync-ownership
#AmbientCapabilities=CAP_CHOWN CAP_FOWNER

[Install]
WantedBy=multi-user.target

sudo vim /etc/systemd/system/syncthing@.service

[Unit]
Description=Syncthing - Open Source Continuous File Synchronization for %I
Documentation=man:syncthing(1)
After=network.target

[Service]
User=%i
ExecStart=/usr/bin/syncthing -no-browser -gui-address="127.0.0.1:8384" -no-restart -logflags=0
Restart=on-failure
SuccessExitStatus=3 4
RestartForceExitStatus=3 4

[Install]
WantedBy=multi-user.target

sudo systemctl daemon-reload
sudo systemctl start syncthing@xxx
sudo systemctl status syncthing@xxx

5

INFO: syncthing v1.22.2 "Fermium Flea" (go1.19.2 linux-amd64) deb@build.syncthing.net 2022-11-28 03:48:37
WARNING: Failed to initialize config: failed to load config: unexpected end of file. Truncated or empty confi

The xxx user appears to have a config file which is bad in some way.

Delete all the files in the configuration folder, the problem is solved

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