unable to install Syncthing

_patrick_

Cadet
Joined
Apr 10, 2022
Messages
2
I have successfully installed syncthing from scratch manually by following q/pa instructions above yesterday.
I had to run 'service syncthing start' and 'service syncthing stop' to initialise '/usr/local/etc/syncthing/config.xml' which did not existed. In the end I had to add user 'syncthing' with UID 983 in truenas accounts to get permissions right.
It works and is running on my truenas right now and is really worth the trouble.
I installed it yesterday (used the 12.2 release for the jail).
Just tried to redo it in a new jail for checking my steps and guess what ? :
"No packages available to install matching 'syncthing' have been found in the repositories' ....
They were there yesterday ... frustrating ....
 

pogodaddy

Cadet
Joined
Apr 10, 2022
Messages
8
@_patrick_ I noticed you were using 12.2 for your jail. That is the same version I used. Has anyone tried maybe 11.3 to see if that works. I’m working late tonight, but I’ll give that a try to see if anything changes there.
 

q/pa

Explorer
Joined
Mar 16, 2015
Messages
64
Hm, it's the repository... https://freebsd.pkgs.org/12/freebsd-amd64/29/ does not show it anymore. I know for sure that a week ago syncthing was listed (otherwise the install would not have worked).

A solution could be to switch the jails repository from 'quarterly' to 'latest' (search the forums for how to do that). On 'latest' there is version 1.19.1_1 available.
 

_patrick_

Cadet
Joined
Apr 10, 2022
Messages
2
found it:
syncthing is not listed/(failed to build ?) in the actual quarterly AND latest repository (which must have been updated on the weekend). To go back to the latest working repository (I tried the quarterly) you have to

Code:
#in jail shell
edit /etc/pkg/FreeBSD.conf
# change
url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
# to
url: "pkg+http://pkg.FreeBSD.org/${ABI}/release_3",
# and
pkg update


try
Code:
pkg search syncthing

before and after changing repository

I get v1.18.1 with that which is working so far ... maybe somebody can figure out where the latest version is ...
https://pkg.freebsd.org/

I am just finished with a complete guide which is a q/pa guide and some additions ... I will check it and post it later
 

pogodaddy

Cadet
Joined
Apr 10, 2022
Messages
8
found it:
syncthing is not listed/(failed to build ?) in the actual quarterly AND latest repository (which must have been updated on the weekend). To go back to the latest working repository (I tried the quarterly) you have to

Code:
#in jail shell
edit /etc/pkg/FreeBSD.conf
# change
url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
# to
url: "pkg+http://pkg.FreeBSD.org/${ABI}/release_3",
# and
pkg update


try
Code:
pkg search syncthing

before and after changing repository

I get v1.18.1 with that which is working so far ... maybe somebody can figure out where the latest version is ...
https://pkg.freebsd.org/

I am just finished with a complete guide which is a q/pa guide and some additions ... I will check it and post it later

After switching to release_3 I was able to download and install it. I will see if I get further than that tonight. Thanks for finding that file! I have had no success finding the latest file.
 

pogodaddy

Cadet
Joined
Apr 10, 2022
Messages
8
So I’m getting stuck here. I’ve update the root password, restarted SSHD service, and I tried changing password authentication to yes. Any thoughts?
IMG_0130.jpg
 

biggzie

Cadet
Joined
Apr 11, 2022
Messages
8
Hey

_patrick_

1.18.1 is what I had working 2 weeks ago, then I buggered a few things up and thought "No big deal, I'll just reinstall" and noticed that 1.19.1 was available ............. but that didn't work out! Looking forward to reading your guide and giving it a shot! Thank you
 

Bikerchris

Patron
Joined
Mar 22, 2020
Messages
210
This is a really helpful thread, thank you all.
 

biggzie

Cadet
Joined
Apr 11, 2022
Messages
8
found it:
syncthing is not listed/(failed to build ?) in the actual quarterly AND latest repository (which must have been updated on the weekend). To go back to the latest working repository (I tried the quarterly) you have to

Code:
#in jail shell
edit /etc/pkg/FreeBSD.conf
# change
url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
# to
url: "pkg+http://pkg.FreeBSD.org/${ABI}/release_3",
# and
pkg update


try
Code:
pkg search syncthing

before and after changing repository

I get v1.18.1 with that which is working so far ... maybe somebody can figure out where the latest version is ...
https://pkg.freebsd.org/

I am just finished with a complete guide which is a q/pa guide and some additions ... I will check it and post it later
OK so this is how I got it to work step by step and yes I'm sure there are better ways but this is what worked for me!

TrueNAS GUI
- create new base jail release 12.2, I set my to dhcp but you do you!
- next in shell or I like to ssh to TrueNAS and iocage console "name of jail"
- pkg update and y to any prompts
- pkg install nano "because I'm not good with vi"
- nano /etc/pkg/FreeBSD.conf
- change from "quarterly" to "release_3" ctrl X and Y
- pkg update
- pkg search syncthing and now1.18.1 is available
- pkg install syncthing and Y
As _patrick_ mentioned take not of gid and uid of 983 user and group permissions for mountpoints.
- the passwd and set password and confirm
- nano /etc/ssh/sshd_config
- remove "#" from PermitRootLogin and change "no" to "yes"
- remove "#" from PubkeyAuthentication yes only if you want to use ssh key auth
- remove "#" from PasswordAuthentication and change "no" to "yes"
- ctrl X then Y
- sysrc sshd_enable=YES
- sysrc syncthing_enable=YES
- cat /etc/rc.conf and see that sshd_enable and syncthing_enable both set to YES
- restart under TrueNAS GUI
- open terminal and should be able to ssh into your syncthing jail, now you can add a .pub key and disable PasswordAuth or not and live dangerously!
- the ssh -L 8000:127.0.0.1:8384 root@ip of jail and open browser and go to "localhost:8000" and you should be good!

This still doesn't address why we can't find the current version of 1.19.1 and I did see that many, many people are have trouble with seemingly all packages. I also stumbled upon a thread that stated we are supposed to be using the "svn" - subversion or git methods as portsnap is now deprecated. While I like TrueNAS core it seems like TrueNAS Scale will be the way to go for apps over jails and as more info comes out about how to use docker with vlans on Scale that just might be the way to go in the future. Thank you to everyone who helped me stumble my way through getting syncthing back up and running!!
 

pogodaddy

Cadet
Joined
Apr 10, 2022
Messages
8
Thanks @biggzie
I think I found my error with regards to the ssh access after reviewing your post. I will have to look into the truenas scale to understand the difference.
 

Bikerchris

Patron
Joined
Mar 22, 2020
Messages
210
Thanks @biggzie
I think I found my error with regards to the ssh access after reviewing your post. I will have to look into the truenas scale to understand the difference.
I just installed SyncThing on TrueNAS Scale (bare metal test machine), it wasn't too bad once I figured out a few key parts. I'm sure I haven't set it up securely though, but it is just a test.
 

biggzie

Cadet
Joined
Apr 11, 2022
Messages
8
Thanks @biggzie
I think I found my error with regards to the ssh access after reviewing your post. I will have to look into the truenas scale to understand the difference.
I saw your screenshot it looks like maybe forgot to change "no" to "yes" for PasswordAuthentication or something like that because your system is answering with ssh just not letting you log in, You're 9/10 there so I'm sure you'll get it and everybody on this thread seems to be more skilled than me so that's a good thing and too anyone who reads my post next time I'll try to do more like the copy/paste style so it's easier! Luckily all the commands a short and simple.
 

biggzie

Cadet
Joined
Apr 11, 2022
Messages
8
I just installed SyncThing on TrueNAS Scale (bare metal test machine), it wasn't too bad once I figured out a few key parts. I'm sure I haven't set it up securely though, but it is just a test.
I'm looking forward to giving Scale a run just as soon as I can figure out how to get certain apps "docker containers" or "pods" to run on certain nic's with vlans. You may want to check out if you haven't already the gang over at truecharts.org they have built a huge library of apps that are intended to be super simple to install on Scale and they even have docker-compose as an app that is supposed to survive updates and that should open things up a lot! and if anybody can find the current version of syncthing 1.19.1 let us know.
 

matteob86

Explorer
Joined
Mar 19, 2022
Messages
58
- restart under TrueNAS GUI
- open terminal and should be able to ssh into your syncthing jail, now you can add a .pub key and disable PasswordAuth or not and live dangerously!
- the ssh -L 8000:127.0.0.1:8384 root@ip of jail and open browser and go to "localhost:8000" and you should be good!
i restart the jail... but now? i don't understand what there is to do...
 

pogodaddy

Cadet
Joined
Apr 10, 2022
Messages
8
@matteob86 I think you may be having a similar problem to me, maybe not. Once you have rebooted the jail you need to log in through ssh and bind the GUI address (127.0.0.1:8384) to a local host address to access the GUI interface via a web browser.
Now to that point, I am having an issue opening the GUI via localhost:8000 after ssh. Background here, I did a static IP address because I'm having issues getting DHCP to work (I tried disable hardware offloading for my NIC but that just made my plex jail inaccessible). I don't think that is the issue because I can ssh into the server and into the jail iocage without any issue.

So here is my issue, after I log in with my root password into the synching jail via ssh I go to open localhost:8000 and I get a few errors. I'm still a bit new at this so I'm going to have to find where the jail error log is to see if that contains any additional info. So here are the errors I am getting in terminal and on my web browser (yes I have tried multiple browsers to verify).
SSH Terminal.png
Browser Error.png

And here is the info from my jail. I thought maybe the syncthing program wasn't running but that shows it is up and running in the jail.
Syncthing Jail Info.png

Anyone else have this issue or thoughts about how to fix it?
Thank you so much, I have learned a lot from everyone already. I will keep looking into it and see if I can figure out where I went wrong.
 

biggzie

Cadet
Joined
Apr 11, 2022
Messages
8
@matteob86 I think you may be having a similar problem to me, maybe not. Once you have rebooted the jail you need to log in through ssh and bind the GUI address (127.0.0.1:8384) to a local host address to access the GUI interface via a web browser.
Now to that point, I am having an issue opening the GUI via localhost:8000 after ssh. Background here, I did a static IP address because I'm having issues getting DHCP to work (I tried disable hardware offloading for my NIC but that just made my plex jail inaccessible). I don't think that is the issue because I can ssh into the server and into the jail iocage without any issue.

So here is my issue, after I log in with my root password into the synching jail via ssh I go to open localhost:8000 and I get a few errors. I'm still a bit new at this so I'm going to have to find where the jail error log is to see if that contains any additional info. So here are the errors I am getting in terminal and on my web browser (yes I have tried multiple browsers to verify).
View attachment 54773 View attachment 54774
And here is the info from my jail. I thought maybe the syncthing program wasn't running but that shows it is up and running in the jail.
View attachment 54775
Anyone else have this issue or thoughts about how to fix it?
Thank you so much, I have learned a lot from everyone already. I will keep looking into it and see if I can figure out where I went wrong.
Hey Guys, just saw your post. OK so you are binding the localhost port of 8000 to your local machine ie: laptop or desktop not to the localhost of the syncthing jail, because localhost of the syncthing GUI is already bound to port 8384 of the jail

ssh -L 8000:127.0.0.1:8384 root@ip of syncthing jail, then open a browser on your computer and in the address bar type localhost:8000 which will redirect you to the localhost of the jail on port 8384, where the syncthing GUi should be waiting
the -L means local machine laptop or desktop through browser on port 8000 over to localhost 127.0.0.1:8384 which is on your jail! Hope this helps. Syncthing working very well with mount points on syncthing jail through dedicated dataset and datasets for other users although you need to mess with the permissions a little and of course still isn't the current version but that shouldn't matter to much for the moment.
 

pogodaddy

Cadet
Joined
Apr 10, 2022
Messages
8
Well I found my error :rolleyes: It was a syntax error, maybe I should watch my port numbers a lot better because 8334 is NOT 8384. Yep I sure do feel dumb for missing that for two days. Now to actually set it up!!!
 

biggzie

Cadet
Joined
Apr 11, 2022
Messages
8
Well I found my error :rolleyes: It was a syntax error, maybe I should watch my port numbers a lot better because 8334 is NOT 8384. Yep I sure do feel dumb for missing that for two days. Now to actually set it up!!!
So if I understand what your saying is that "You were blindfolded while typing with winter gloves on"! Yeah I've done that too! Glad it's working for you and I don't know about your mileage but I transferred just over 1TB of data from a dataset on the NAS to an external drive through syncthing that I use for secondary back up in just over 4 hours which would have taken over 12 hours from SMB share to the same drive, So enjoy!!
 

Lusen

Cadet
Joined
Apr 20, 2022
Messages
1
Any one found a solution to install Syncthing in a jail with 12.3-RELEASE-p5

I am running TrueNAS-12.0-U8.1
 
Top