Manual Jail Setup Tutorial For Syncthing on FreeNAS 11.3

Commands used in Video:
iocage console SyncThingYouTube

pkg update

pkg install syncthing

sysrc syncthing_enable=YES

sysrc sshd_enable="YES"

cat /etc/rc.conf

vi /etc/ssh/sshd_config
PermitRootLogin yes

passwd root

iocage restart

ssh -L 8000:127.0.0.1:8384 root@192.168.3.177

2 Likes

Curious, setting it up this way, does syncthing show up as a client in your Unifi Controller? It does in mine, as do all my other FreeNAS jails configured with DHCP.

Yes, since it has an IP address on the network, it will.

There seems to be something missing for windows. I have created an ssh tunnel through putty but chrome cant get into the jail page to allow me to change the parameters.
How do allow my browser to get through the tunnel?

I figured it out, same command in windows CMD terminal will pass the traffic.

Thanks @LTS_Tom for the Turorial

I install the manual synchthing jail on FreeNAS 11.3 and my Listeners are at 2/3 and it looks like @LTS_Tom jail in the video is the same.
When you hover over the 2/3 on Listeners i get x509: certificate signed by unknown authority](https://forum.syncthing.net/t/x509-certificate-signed-by-unknown-authority/10957)'
I was having a hard time remote devices decovering each other, here is how you update the certs

ssh in your jail

pkg update

pkg install curl

curl https://relays.syncthing.net/

iocage restart
1 Like

Probably a stupid question. But following the tutorial I just did my first install via SSH etc. so I,m a complete Noob (got stuck sometimes trying to figure out how to get out of vim and top for example to input the next commands). How do I now after the install upgrade Syncthing to the latest versions. I notice itā€™s on 1.4.0 and all my other systems are on 1.4.2 (web download is also 1.4.2 for FreeBSD).

Learning VIM is a great idea and will help you a lot with configruing Linux/BSD systems. Inside the jail you can run pkg upgrade which will update the system to the latest packages.

I know I am replying to and old post, but I am putting this out there just in case someone needs it. Whoever reads this please feel free to correct me if I am totally wrong as I would like to know what I did wrong and how to do things right. I installed it as per toms youtube video and noticed that the repo has an older version. I am having an issue with Syncthing so I wanted to see if updating the version fixes it. What i did to upgrade the version was to download the freebsd version of it from https://syncthing.net/downloads/ extract it on my windows PC even though you can run a few commands in freebsd to do the same. Once its extracted I connected to the jail using winscp and copied the newly extracted syncthing file to /usr/local/bin/. The syncthing file that you need to copy over is around 20 MB. Once I did that I restarted syncthing and I was now on the latest version.

Sometimes the Syncthing site will be newer than what is available in the repos so you have to download the update if you want the newest version.

Agreed. Simple, clearly explained tutorial. Thank you. Iā€™m stuck tho at the point where Tom instructs the ā€™ ssh -L 8000:127.0.0.1:8384 root@192.168.X.Xā€™ command for binding ports (if Iā€™ve understood the purpose?). I get a ā€˜unable to connectā€™ error with localhost:8000 and using the jailā€™s ip I can see the nginx server is working:
Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.
Thank you for using nginx.

I have checked the syntax multiple times, so I donā€™t think Iā€™ve made a mistake there. How do I troubleshoot from here? Thanks for any help.

If you are getting that then you did not do a manual setup as I did in the video because I did not load nginx in the jail.

Oh? I followed the video instructions to a T, so I donā€™t know how that could have happened. What would I have had to enter to obtain the nginx response then? I literally got half way thru the video to the ā€˜ssh -Lā€™ etc command without doing anything else to my knowledge.

Does anyone know the recommended way to keep syncthing up to date using this method?

Is there a command I need to run?

I followed these instructions and i noticed recently I am still on version 1.9 while my other systems are on 1.10.

You can use iocage upgrade -r 12.1-RELEASE to upgrade the jail as shown in this video https://www.youtube.com/watch?v=z0O6WHJz8I4&t=744s

Copy that, Thanks Tom

I am trying to just update syncthing from within the jail itself.
Not looking to update the entire server and jail just yet as described in that video.

Going by the comments above the version available for download in the repositories may be out of date from the website.
I think that whats going on here.

I run ā€œpkg updateā€ to update my repositories but is there a command i need to run after that to actually update the version of syncthing?

i run the command
syncthing -update

here is the output:
root@SyncThing:~ # syncthing -upgrade
13:55:20 INFO: Default folder created and/or linked to new config

Thanks in advance.

In the settings from the Syncthing UI turn on ā€œAuto Upgradesā€

Strange, when i go to auto updates within the system UI I see an error message that Automatic updates are: ā€œUnavailable/Disabled by administrator or maintainerā€

Screen Shot 2020-11-06 at 9.05.18 AM

There must be a setting I am missing somewhere or perhaps i need to edit something in a configuration file somewhere.

Interestingly enough i noticed this ā€œupdates disabledā€ appears on my Mac systems as well not just the Syncthing Jails.

Regarding permissions, what would they look like if Iā€™m using Windows AD on my datasets rather than FreeNAS/TrueNASā€™s built-in users and groups. I can add the syncthing user and group to the ACL but for the some reason, syncthing is able to create folders and the tmp files, but canā€™t actually change the names of them to the actual files. Itā€™s definitely a permissions issue, Iā€™m just not sure what it should look like using ACL.

I have a video here showing how to do ACL in TrueNAS

1 Like