How to Run Syncthing as a Daemon on OpenBSD
Categories: [Technology], [How To], [OpenBSD]
- Install Syncthing
pkg_add syncthing - Enable Syncthing
rcctl enable syncthing - Update Daemon flag
vi /etc/rc.d/syncthing, add-home=/var/syncthing - Run Syncthing once to create initial files:
/etc/rc.d/syncthing start - Stop Syncthing after after a few minutes:
/etc/rc.d/syncthing stop - Update login.conf:
vi /etc/login.conf; addsyncthing:\ :openfiles-max=60000:\ :tc=daemon: - Generate the binary:
cap_mkdb /etc/login.conf - Add
kern.maxfiles=80000to/etc/sysctl.conf - Run
sysctl kern.maxfiles=80000to set it immediately - Set ownership on Syncthing directory:
chown -R _syncthing:wheel /var/syncthing