Just to be clear on the terminology: it’s not really a plugin; it’s a standalone program that runs on the router (instead of your PC for example).
This assumes Slate AX firmware 4.4.6-release1 (GL GUI → System → Upgrade). You’ll need to
- Have a storage device/target already mounted (in my case it is
/mnt/sda1
)- have a directory on said storage target ‘owned’ by the
syncthing
user- in my case all Syncthing data/‘folders’ are under
/mnt/sda1/syncthing
mkdir /mnt/sda1/syncthing
chown -R syncthing:syncthing /mnt/sda1/syncthing
- in my case all Syncthing data/‘folders’ are under
- have a directory on said storage target ‘owned’ by the
- Set the first (OpenWrt Linux) Syncthing configuration file to match the storage target & enable the Syncthing Web GUI
nano /etc/config/syncthing
- match my values as needed per the below output example
- adjust
option nice
to a higher number (eg: 15) so Syncthing runs with less impact/performance on the CPU/SOC for more critical running programs/processes as desired
- Execute
/etc/init.d/syncthing enable; /etc/init.d/syncthing start
- confirm it’s running & will do so on reboot via
ps -w | grep syncthing; service | grep syncthing
- confirm it’s running & will do so on reboot via
- Navigate to https://192.168.8.1:8384 & log into the Syncthing Web GUI
There’s another conf (/mnt/sda1/synchting/conf.xml
) that can be editied but it should be enough to use the web GUI instead. Just be sure to match the storage target dirs/paths to the syncthing-owned directory.
root@slateax:~# df -h
Filesystem Size Used Available Use% Mounted on
mtd:ubi_rootfs 52.8M 52.8M 0 100% /rom
tmpfs 196.4M 640.0K 195.8M 0% /tmp
/dev/ubi0_2 45.6M 25.5M 17.8M 59% /overlay
overlayfs:/overlay 45.6M 25.5M 17.8M 59% /
tmpfs 512.0K 0 512.0K 0% /dev
/dev/mmcblk0p1 115.9G 13.6G 101.7G 12% /mnt/sda
root@slateax:~# ls -l /mnt/sda1/
drwxr-xr-x 6 root root 4.0K Jan 9 17:12 .
drwxr-xr-x 1 root root 296 Jan 9 18:27 ..
drwx------ 7 syncthin syncthin 4.0K Jan 12 20:35 syncthing
root@slateax:~# cat /etc/config/syncthing
config syncthing 'syncthing'
option enabled '1'
# option gui_address 'http://127.0.0.1:8384'
option gui_address 'http://0.0.0.0:8384'
# Use internal flash for evaluation purpouses. Use external storage
# for production.
# This filesystem must either support ownership/attributes or
# be readable/writable by the user specified in
# 'option user'.
# Consult syslog if things go wrong.
option home '/mnt/sda1/syncthing'
# Changes to "niceness"/macprocs are not picked up by "reload_config"
# nor by "restart": the service has to be stopped/started
# for those to take effect
option nice '10'
# 0 to match the number of CPUs (default)
# >0 to explicitly specify concurrency
option macprocs '0'
# Running as 'root' is possible, but not recommended
option user 'syncthing'
option logfile '/var/log/syncthing.log'
option log_max_old_files 7
# Size in bytes
option log_max_size 1048576
# # CLI options with no value should be defined as booleans and theirs
# # names should be prefixed with '_'.
option _no_default_folder '1'
# # Extra settings
# list _ 'verbose'
root@slateax:~# ps -w | grep syncthing; service | grep syncthing
2894 syncthing 1376 S /usr/bin/syncthing
/etc/init.d/syncthing enabled running
You’ll probably want to review this HOW-TO before digging into Syncthing if you’ve never used SSH or edited text/conf files on Linux: