Syncthing. Linux. Headless installation: различия между версиями
Перейти к навигации
Перейти к поиску
Cless (обсуждение | вклад) |
Cless (обсуждение | вклад) |
||
| Строка 57: | Строка 57: | ||
<code>systemctl daemon-reload</code> | <code>systemctl daemon-reload</code> | ||
<code>systemctl enable syncthing</code> | |||
<code>systemctl restart syncthing</code> | <code>systemctl restart syncthing</code> | ||
Текущая версия на 11:10, 14 декабря 2023
Download
wget https://github.com/syncthing/syncthing/releases/download/v1.27.1/syncthing-linux-amd64-v1.27.1.tar.gz
Create dirs
mkdir /mnt/d1/apps/
cd /mnt/d1/apps
Extract and rename
tar xvf ./syncthing-linux-amd64-v1.27.1.tar.gz
mv ./syncthing-linux-amd64-v1.27.1 ./syncthing
User creation
useradd syncthing
passwd syncthing
Systemd service
nano /etc/systemd/system/syncthing.service
[Unit]
Description=Syncthing - Open Source Continuous File Synchronization
Documentation=man:syncthing(1)
StartLimitIntervalSec=60
StartLimitBurst=4
[Service]
ExecStart=/mnt/d1/apps/syncthing/syncthing --data /mnt/d1/apps/syncthing --config /mnt/d1/apps/syncthing --logflags=0
Restart=on-failure
RestartSec=1
SuccessExitStatus=3 4
RestartForceExitStatus=3 4
User=syncthing
Group=syncthing
# Hardening
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=default.target
Change owner
chown -R syncthing:syncthing /mnt/d1/apps/syncthing
Restart service
systemctl daemon-reload
systemctl enable syncthing
systemctl restart syncthing
systemctl status syncthing
Let everybody connect to web syncthing service
nano /mnt/d1/apps/syncthing/config.xml
... <gui enabled="true" tls="false" debugging="false" sendBasicAuthPrompt="false"> <address>0.0.0.0:8384</address> ...
Service restart
systemctl restart syncthing
Go to the web service
http://<IP>:8384