SOLVED How to edit Syncthing ssl

Fred974

Contributor
Joined
Jul 2, 2016
Messages
190
Hi,

I have installed the Syncthing plugin on my TrueNAS. I can access it via http but not https. On my other box (centos) I can control/edit the ssl certificate in the config.xml. I have search the server but I cannot find such file in my plugin jail. I read the forum here and I believe that I should find it in /var/db/syncthing/ . However I have no such directory in my installation.

Could anyone please advise?

Thank you
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Are you searching in the host TrueNAS filespace, or inside the plugin's filespace? You'll need to run iocage console syncthing to get a shell in the plugin's filespace.
 

Fred974

Contributor
Joined
Jul 2, 2016
Messages
190
Hi,

I have connected using iocage console to syncthing and here is /var/db
iocage console Syncthing
Code:
root@Syncthing:~ # ll /var/db/
total 550
drwx------  2 operator  operator        2 Oct 23  2020 entropy/
drwxr-xr-x  3 root      wheel           4 Oct 23  2020 etcupdate/
drwx------  4 root      wheel          11 May 18 12:19 freebsd-update/
drwx------  2 root      wheel           2 Oct 23  2020 hyperv/
drwx------  2 root      wheel           2 Oct 23  2020 ipf/
-rw-r--r--  1 nobody    wheel           0 Oct 23  2020 locate.database
-rw-------  1 root      wheel       29329 Oct 23  2020 mergemaster.mtree
drwxr-xr-x  2 ntpd      ntpd            2 Oct 23  2020 ntp/
drwxr-xr-x  2 root      wheel           5 Jun 11 11:59 pkg/
drwxr-xr-x  2 root      wheel           2 Oct 23  2020 ports/
drwxr-xr-x  2 root      wheel           2 Oct 23  2020 portsnap/
-rw-r--r--  1 root      wheel     2097920 Oct 23  2020 services.db
drwxr-xr-x  3 root      wheel           3 Oct 23  2020 zfsd/


I do not have a
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399

Fred974

Contributor
Joined
Jul 2, 2016
Messages
190
iocage console Syncthing
root@Syncthing:~ # grep syncthing /etc/passwd
Code:
syncthing:*:983:983:Syncthing Daemon:/var/tmp/syncthing:/usr/sbin/nologin

As the syncthing has a nologin there is no home directory. I also tried root@Syncthing:/var/tmp # find / -name ".config" but go no results
 

Fred974

Contributor
Joined
Jul 2, 2016
Messages
190
@Samuel Tai like, you I was taking my doc from the syncthing doc. After more digging, the file is simply in /usr/local/etc/syncthing
Code:
root@Syncthing:/usr/local/etc/syncthing # ls -lah
total 109
drwx------  3 syncthing  syncthing    10B Jun 11 12:03 .
drwxr-xr-x  9 root       wheel        11B Jun 11 11:59 ..
-rw-r--r--  1 syncthing  syncthing   794B Jun 11 11:59 cert.pem
-rw-------  1 syncthing  syncthing   7.1K Jun 11 12:03 config.xml
-rw-------  1 syncthing  syncthing   7.0K Jun 11 11:59 config.xml.v0
-rw-------  1 syncthing  syncthing    66B Jun 11 12:02 csrftokens.txt
-rw-r--r--  1 syncthing  syncthing   790B Jun 11 11:59 https-cert.pem
-rw-------  1 syncthing  syncthing   288B Jun 11 11:59 https-key.pem
drwxr-xr-x  2 syncthing  syncthing     8B Jun 14 05:00 index-v0.14.0.db
-rw-------  1 syncthing  syncthing   288B Jun 11 11:59 key.pem
 
Top