Does any one successfully setup syncthing on AXT-1800?

Did you ever manage to get this working?


root@slateax:~# opkg list-installed | grep syncthing
syncthing - 1.18.2-1

As far as I remember, the problem with syncthing is / was that you need exroot for it and need to mount a data storage - which is “advanced” usage.

You don’t. There’s a conf (two, technically) to point to a specified mount, dir. You’re right about needing SSH though.

1 Like

Once you have downloaded the plug in, how do you activate it?

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

  1. 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
  2. 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
  3. 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
  4. Navigate to & 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 ''
        option gui_address ''

        # 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:

If it’s that complicated, I have absolutely no chance lol.
I was hoping that I could just log in, turn it on and point it to the various devices/folders. I have managed to set up Syncthing on my pc running Batocera and also my phone and my tablet but I wanted to get all my game saves onto a usb plugged into the axt1800 so I can access them away from home.

It’s little more than editing a text file. This is no more difficult than tweaking a .ini for Windows-based gaming of whatever new flavor/fad of the week is being shilled by those washouts on YouTube.

You can handle the power of embedded Linux; you’ve already made a solid start with Batocera Linux.

I wish I shared your optimism, most of this just baffles me.

I have read so many things online over the last few days.
I am pretty sure I read that once you download the Syncthing plug in, it just replaces (takes control) of the default network sharing?
But if that is the case, should my plugins page say Syncthing or does it remain the same?

All I know at the moment is that I cannot access the gui via the ip address.

These are plugins prepared by GL - you can’t add some nor remove them.

Wait… what the Hell is that screenshot? I don’t recognize the GUI.

You’re going to have a real hard time (read: no chance) setting this up via phone, especially iOS.

Man your battle station, my guy.

Well spotted.
That was just screen grabs to show what is/isn’t active on the Axt1800.
I used the Syncthing app to set up my pc/phone/tab connections and it was fairly easy if I did it one step at a time.
But the app doesn’t “see” the Axt1800 in “devices” so I can’t add it. That’s what makes me think that Syncthing just needs to be activated on the router?

You’ve got it installed. Now you need to configure it… after you make sure there’s a storage device present to use as a Syncthing storage target.

… which leads us back to that 4-step breakdown on such. See the link to that HOW-TO for the fundamentals & recommendations for software to allow you to ‘SSH into’ your Slate AX so you can get at those required Syncthing conf/text files.

Side note: I’m pretty sure we’ve both heard the old mantra of ‘always have a backup’ too many times so I won’t bother repeating it… or did I just do that?

I have Termius on my tablet to ssh into router and I can get to the root@GL-AXT1800:~#
But then I am totally lost at what to do next.

I have been into the Luci interface and I can see that Syncthing is definitely installed and enabled.
My usb is correctly mounted.
But I just cannot access the gui.
If I go to the Syncthing gui on any of my devices, they can see each other but none of them can see the GlAxt1800. I am fairly confident that it is something silly I haven’t done yet.

It’s not you; it’s the upstream packaging team from OpenWrt which built this particular ipk & its default confs.

They didn’t enable the Syncthing GUI to be accessible by any other connected device other than when logged into the router itself via SSH by default. Their position is to automatically allow ‘anyone’ to immed. connect to Syncthing immed. after installation is a potential security hole as there’s no default password on the Syncthing GUI. I can agree with them but it doesn’t exactly make things any easier unless the end user already knew to be aware of that… as you’re finding out ATM.

You need to edit the OpenWrt Syncthing conf value of gui_address. Match my values above for the entire file, adjusting for your mount point/storage target’s syncthing data dir & CPU ‘nice’ values… but really, just start at the top & take it step by step. Use the nano text editor if you have it. Check your progress against the command output(s) in my examples.

Once done configuring the permissions (chmod) & conf per above execute /etc/init.d/syncthing stop && /etc/init.d/syncthing start to reload Syncthing so it picks up the new config to be in effect.

I have been trying this for the last couple of hours now but something is just not right.
Forgetting about Syncthing for the time being, I tried to set sharing via Samba. I have gone through all the setup, created read/write user etc and saved everything.
At first both my phone and my tablet could see the shared drive but I was getting an error if I tried to create a new test folder. I went into Luci and deleted the mount point and set it up again. Now both devices can see/read/write to the usb drive via Samba when connected to the same WiFi network, so at least I am getting somewhere.
Now I am trying to set up WEBDAV. I have enabled everything, set up the users and permissions but I am stuck at the WAN IP bit.
How do I find out my WAN IP?