[FreeNAS 9 Plugin] - Syncthing

Status
Not open for further replies.

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
Oh! Interesting. Glad you are in.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Just to inform everyone, I finally finished building this plugin on top of the FreeBSD port. You can get them latest version of Syncthing (eventually to be renamed Pulse) in the plugins repo.

I'll try to keep the plugin updated regularly.
 

dwhacks

Dabbler
Joined
Mar 27, 2014
Messages
18
I just installed this from the plugins on Freenas 9.2.1.8 and I cant figure out the permissions stuff. My jails "storage" is on a dataset with nobody:nogroup yet syncthing is unable to create a directory.
Is there a step by step guide to setting this up on Freenas? I dont see any new users in my freenas webgui either.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I just installed this from the plugins on Freenas 9.2.1.8 and I cant figure out the permissions stuff. My jails "storage" is on a dataset with nobody:nogroup yet syncthing is unable to create a directory.
Is there a step by step guide to setting this up on Freenas? I dont see any new users in my freenas webgui either.
users in jails are not shared with uses on the host. the only think they share back and forth is the UID/gid ownership of files.

you can probably closely follow a guide for btsync, but do realize syncthing, by default, uses a different user (syncthing), with a different UID/GID (983).
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
I just installed this from the plugins on Freenas 9.2.1.8 and I cant figure out the permissions stuff. My jails "storage" is on a dataset with nobody:nogroup yet syncthing is unable to create a directory.
Is there a step by step guide to setting this up on Freenas? I dont see any new users in my freenas webgui either.
I always reference this when I need to link users/groups:
https://forums.freenas.org/index.php?posts/116676
 

dwhacks

Dabbler
Joined
Mar 27, 2014
Messages
18
Thanks, I made the permissions of my syncthing_1 jail's dataset to nobody:nogroud. That seems to work fine for my home network.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Thanks, I made the permissions of my syncthing_1 jail's dataset to nobody:nogroud. That seems to work fine for my home network.
you changed the permissions of the jail dataset, or a storage dataset being mounted into the jail?

If you did it for the jail dataset, those are mostly OS/program files and things will likely break next time any daemons/the jail are restarted. In this case I recommend you delete the plugin/jail and reinstall syncthing.

you should only ever change the ownership/permissions of your own data files, which should reside on a dataset mounted into whatever jails use the files.
 

dwhacks

Dabbler
Joined
Mar 27, 2014
Messages
18
Ok, my bad. I have deleted and re-installed and now I have "permission denied". Is this because the "storage" for my jail is a folder within a dataset and not an entire dataset?

Basically I have a dataset called "media" which I share on my network and its permissions are nobody:nogroup. with Sick Beard, CouchPotato, and Transmission it works with their respective folders within that dataset (/media/torrents /media/movies etc). but syncthing is unable to create its "default" folder because of permissions denied.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Ok, my bad. I have deleted and re-installed and now I have "permission denied". Is this because the "storage" for my jail is a folder within a dataset and not an entire dataset?

Basically I have a dataset called "media" which I share on my network and its permissions are nobody:nogroup. with Sick Beard, CouchPotato, and Transmission it works with their respective folders within that dataset (/media/torrents /media/movies etc). but syncthing is unable to create its "default" folder because of permissions denied.
Syncthing doesn't know anything about datasets vs directories. I suggest you just create a directory for it with ownership by the syncthing user (UID=983) or whith high enough permission levels for the syncthing user to write in there.
 

dwhacks

Dabbler
Joined
Mar 27, 2014
Messages
18
Thanks, since my Media dataset should be rw by anyone I thought it wouldnt matter the user for syncthing. If i tell syncthing to use the "root" of my media dataset it works great. then using syncthing "folder path" I am able to do as I wish.

Basically.

/mnt/tank1/media is mounted to /media/data in syncthing.
that works.
But
/mnt/tank1/media/syncthing mounted to /media/data doesnt work, permissions denied when trying to create a share folder like /media/data/default

Could it be because possibly the /syncthing forlder inside my /media dataset has different permissions somehow?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Thanks, since my Media dataset should be rw by anyone I thought it wouldnt matter the user for syncthing. If i tell syncthing to use the "root" of my media dataset it works great. then using syncthing "folder path" I am able to do as I wish.

Basically.

/mnt/tank1/media is mounted to /media/data in syncthing.
that works.
But
/mnt/tank1/media/syncthing mounted to /media/data doesnt work, permissions denied when trying to create a share folder like /media/data/default

Could it be because possibly the /syncthing forlder inside my /media dataset has different permissions somehow?
It's a possibility, but I'm not psychic, lol. 'ls -l' gives you this info.
 
Joined
Nov 26, 2014
Messages
1
First off, to anyone who's worked on this, huge thanks for doing this! I got my first FreeNAS syncthing instance running yesterday and couldn't stop smiling!

I used the pbi for 0.10.7 and was dismayed to see it is already out of date, plus does not have the cli -upgrade function enabled. Then I calmed back down; saw that it is only one point-release behind, the upgrade would make zero difference, and there are people who really care about this plugin :)

I am, however, left wondering; what should we do once an important syncthing upgrade is inevitably released? I'm new to FreeNAS, so please use little words, ha. I also didn't make the jail manually as mentioned earlier in the thread if that affects the situation.
Thanks! —Narwhal

p.s. for all interested, the name-change to pulse was called off amicably; just a realization that the ind.ie integration was not so great a fit after all.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
First off, to anyone who's worked on this, huge thanks for doing this! I got my first FreeNAS syncthing instance running yesterday and couldn't stop smiling!

I used the pbi for 0.10.7 and was dismayed to see it is already out of date, plus does not have the cli -upgrade function enabled. Then I calmed back down; saw that it is only one point-release behind, the upgrade would make zero difference, and there are people who really care about this plugin :)

I am, however, left wondering; what should we do once an important syncthing upgrade is inevitably released? I'm new to FreeNAS, so please use little words, ha. I also didn't make the jail manually as mentioned earlier in the thread if that affects the situation.
Thanks! —Narwhal

p.s. for all interested, the name-change to pulse was called off amicably; just a realization that the ind.ie integration was not so great a fit after all.
I try to update the plugin regularly and usually get the latest update in the repo within a few days. when there's a new update available you can just click update in Plugins>Installed tab.

Syncthing has been updating about once a week or more so its not always going to be the latest but I usually try not to be more then a few days behind.
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
First off, to anyone who's worked on this, huge thanks for doing this! I got my first FreeNAS syncthing instance running yesterday and couldn't stop smiling!

I used the pbi for 0.10.7 and was dismayed to see it is already out of date, plus does not have the cli -upgrade function enabled. Then I calmed back down; saw that it is only one point-release behind, the upgrade would make zero difference, and there are people who really care about this plugin :)

I am, however, left wondering; what should we do once an important syncthing upgrade is inevitably released? I'm new to FreeNAS, so please use little words, ha. I also didn't make the jail manually as mentioned earlier in the thread if that affects the situation.
Thanks! —Narwhal

This is one reason why I love his pbi with the update command:
https://forums.freenas.org/index.php?threads/[FreeNAS-9-Plugin]---Syncthing.21008/#post-148496
 

cen

Dabbler
Joined
Jul 12, 2014
Messages
32
After installing and adding a new repository, syncthing plugin won't start up anymore. It just loads for a bit and then stays OFF. jail/var/log/messages has nothing.

How to debug the reason it's not starting up?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
After installing and adding a new repository, syncthing plugin won't start up anymore. It just loads for a bit and then stays OFF. jail/var/log/messages has nothing.

How to debug the reason it's not starting up?
I would run 'service syncthing onestart' from the jails command line. logs would be in /var/db/syncthing, it doesn't use syslog like a good program
 

cen

Dabbler
Joined
Jul 12, 2014
Messages
32
No logs in there:
[root@freenas] /mnt/magneto/jails/syncthing_1/var/db/syncthing# ls
./ ../ cert.pem config.xml csrftokens.txt key.pem

If I remove the repository from .xml it starts working. So for some reason, the repo config prevents it from running.
Does the repo path need to be inside the jail? I use /mnt/magneto/myaccount/repofolder for the path which is outside the jail.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
No logs in there:
[root@freenas] /mnt/magneto/jails/syncthing_1/var/db/syncthing# ls
./ ../ cert.pem config.xml csrftokens.txt key.pem

If I remove the repository from .xml it starts working. So for some reason, the repo config prevents it from running.
Does the repo path need to be inside the jail? I use /mnt/magneto/myaccount/repofolder for the path which is outside the jail.
it definitely needs to be available inside the jail. jails have no access/ idea about the filesystem of your host system. that's what the jail mount options are for.
 

cen

Dabbler
Joined
Jul 12, 2014
Messages
32
Yeah, I figured out I had to add it as storage first and then reference it locally. Thanks :)

Any time estimation for plugin update? I had to get 0.8x binaries for my machine because the latest release has incompatible IDs (length mismatch).
 
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Yeah, I figured out I had to add it as storage first and then reference it locally. Thanks :)

Any time estimation for plugin update? I had to get 0.8x binaries for my machine because the latest release has incompatible IDs (length mismatch).
update to 0.10.10? probably in a weekish. might take me a few days to get everything setup for FN9.3
 
Status
Not open for further replies.
Top