How to install Syncthing in TrueNAS SCALE?

victorhooi

Contributor
Joined
Mar 16, 2012
Messages
184
Hmm, yes, I have a little familiarity with it.

Are you saying I should just pull say, the LinuxServer Docker image for Syncthing (link) or the official SyncThing Docker image (link) into TrueNAS Scale, and use it that way?

What would be the best way of exposing the files within TrueNAS itself to the Docker image?
 

ellie

Cadet
Joined
Nov 11, 2020
Messages
5
I'm currently just using docker-compose and I mounted /data inside the Syncthing container to a folder in a storage pool I have. Keep in mind after every system update you will have to redownload and create the images, enable the docker daemon and manually recreate any networks that you have (common occurrence if you're using nightly builds).

Apparently on the 15th of December there should be an update introducing an easier to use Docker management UI. If you don't want to wait, just run docker-compose up -d where your docker-compose.yml is located.

Personally I created a small script that just runs after every system update that starts the docker service, creates my reverse proxy docker network and loops over all my folders containing docker-compose.yml files running docker-compose up -d in each of them unless the folder contains a specific suffix.

Code:
#!/bin/bash
systemctl start docker
systemctl enable docker
docker network create NETWORK_NAME

for dir in "PATH"*/; do
    if [[ "$dir" != *.wip/ ]]; then
        cd $dir
        docker-compose up -d
        cd ..
    fi
done

Replace PATH with the full path to the folder containing folders that contain your docker-compose.yml files. The line creating a network is unnecessary if you don't need a network for a reverse proxy.

It's not ideal, but it'll do until the UI is introduced ‍♂️
 

Kieeps

Dabbler
Joined
Jun 17, 2018
Messages
30
Hmm, yes, I have a little familiarity with it.

Are you saying I should just pull say, the LinuxServer Docker image for Syncthing (link) or the official SyncThing Docker image (link) into TrueNAS Scale, and use it that way?

What would be the best way of exposing the files within TrueNAS itself to the Docker image?
That's what I was thinking :smile: not sure what the difference is between the linuxserver image and the official one, truenas scale comes pre-installed with docker so installing it should be pretty straight forward, i'w personally never used syncthing so I have no idea how it would work within truenas, but i suspect you would have to mount the folders to be synced in to the container.

EDIT: I completely missed that gigatex already answered :-D
 
Last edited:

victorhooi

Contributor
Joined
Mar 16, 2012
Messages
184
OK, I reinstalled a new TrueNAS Scale using the latest nightly, and I'm trying to get Syncthing running there.

From the TrueNAS UI, I click on "Apps" on the left hand menu, then click on "Launch Docker Image" in the top right.

For Application Name - I believe this is just an arbitrary name to identify this docker container on the TrueNAS host right?

For Image Repository, I pick "syncthing/syncthing". The other options I leave at defaults:

Screen Shot 2021-04-21 at 6.06.14 am.png


For Container Settings, I don't set any of these, and leave at defaults.

For Networking, I don't set any of these, and leave at defaults - this means it should default to Docker's default of bridge networking, and the container should get an IP address like any other host on the local network, right?

For Port Forwarding, I don't set any of these - I believe the Syncthing docker file already exposes certain ports - so we should be fine here, right?

For Host Path Volumes - my understanding is that is just Bind mounts from docker - so I created a new Dataset on my ZFS pool, and linked that to "/var/syncthing" in the container:

Screen Shot 2021-04-21 at 6.11.14 am.png


For Volumes - this is named/unnamed volumes, I didn't set up any of these.

For Security Settings, I did tick the "Privileged" box.

After that, I create and run the container.

However, it doesn't seem to grab an IP add

If I use docker inspect on the container, under NetworkSettings, I see:

Code:
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {},
            "SandboxKey": "",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {}
        }
    }
]


The container doesn't seem to have grabbed an IP address?

Did I miss something in the steps above, or has anybody else managed to get Syncthing running as a container recently under TrueNAS Scale?
 

Attachments

  • Screen Shot 2021-04-21 at 6.14.15 am.png
    Screen Shot 2021-04-21 at 6.14.15 am.png
    445.3 KB · Views: 427

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
I think our new TrueCharts App for Syncthing should be the easiest way to go for latest nightly and 21.04 ;-)
 

amiskell

Patron
Joined
Jun 25, 2015
Messages
266
OK, I reinstalled a new TrueNAS Scale using the latest nightly, and I'm trying to get Syncthing running there.

From the TrueNAS UI, I click on "Apps" on the left hand menu, then click on "Launch Docker Image" in the top right.

For Application Name - I believe this is just an arbitrary name to identify this docker container on the TrueNAS host right?

For Image Repository, I pick "syncthing/syncthing". The other options I leave at defaults:

View attachment 46648

For Container Settings, I don't set any of these, and leave at defaults.

For Networking, I don't set any of these, and leave at defaults - this means it should default to Docker's default of bridge networking, and the container should get an IP address like any other host on the local network, right?

For Port Forwarding, I don't set any of these - I believe the Syncthing docker file already exposes certain ports - so we should be fine here, right?

For Host Path Volumes - my understanding is that is just Bind mounts from docker - so I created a new Dataset on my ZFS pool, and linked that to "/var/syncthing" in the container:

View attachment 46647

For Volumes - this is named/unnamed volumes, I didn't set up any of these.

For Security Settings, I did tick the "Privileged" box.

After that, I create and run the container.

However, it doesn't seem to grab an IP add

If I use docker inspect on the container, under NetworkSettings, I see:

Code:
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {},
            "SandboxKey": "",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {}
        }
    }
]


The container doesn't seem to have grabbed an IP address?

Did I miss something in the steps above, or has anybody else managed to get Syncthing running as a container recently under TrueNAS Scale?

Docker doesn't default to bridged networking, it defaults to NAT networking, so you would need to map ports from the host to the container.

If you wanted the docker container to have it's own IP address, you'll need to configure docker networking as such and manually assign an IP from your network to the docker container (docker doesn't perform DHCP on it's own to assign IPs to containers).
 
Joined
Feb 27, 2021
Messages
5
I tried installing the truecharts app for syncthing using the default parameters, however after a few minutes of updating my login info in the syncthing ui, I get kicked out and can no longer connect to the ui for syncthing.
The truenas scale app ui shows the following messages:
Liveness probe failed: HTTP probe failed with statuscode: 401
Readiness probe failed: HTTP probe failed with statuscode: 401

Anyone having similar issues on 21.06-Beta?
 

ellie

Cadet
Joined
Nov 11, 2020
Messages
5
I tried installing the truecharts app for syncthing using the default parameters, however after a few minutes of updating my login info in the syncthing ui, I get kicked out and can no longer connect to the ui for syncthing.
The truenas scale app ui shows the following messages:
Liveness probe failed: HTTP probe failed with statuscode: 401
Readiness probe failed: HTTP probe failed with statuscode: 401

Anyone having similar issues on 21.06-Beta?

My instance only runs locally without a password, but I set one up to test it and it seems to work fine for me.
 

DrGonzo94

Cadet
Joined
Aug 12, 2018
Messages
1
My instance only runs locally without a password, but I set one up to test it and it seems to work fine for me.

I got TrueNasNewbie's exact issue. I also got what I think gigatex is describing. The app works, but when I set a GUI password, it becomes inaccessible.
 

ellie

Cadet
Joined
Nov 11, 2020
Messages
5
Update:
I managed to reproduce it, I'll ask for some help from the people at truecharts
 

ellie

Cadet
Joined
Nov 11, 2020
Messages
5
I tried installing the truecharts app for syncthing using the default parameters, however after a few minutes of updating my login info in the syncthing ui, I get kicked out and can no longer connect to the ui for syncthing.
The truenas scale app ui shows the following messages:
Liveness probe failed: HTTP probe failed with statuscode: 401
Readiness probe failed: HTTP probe failed with statuscode: 401

Anyone having similar issues on 21.06-Beta?
I got TrueNasNewbie's exact issue. I also got what I think gigatex is describing. The app works, but when I set a GUI password, it becomes inaccessible.

The fix is merged, you can try again after refreshing your catalog and updating the syncthing app.
 

TrueNASnoob

Cadet
Joined
Sep 8, 2021
Messages
7
Hey everyone, I'm new to TrueNAS, TrueCharts and Syncthing but I really want to get everything up and running well. I have TrueNAS Scale Beta (August version) working just the way I want with my datasets and shares. It's great. I have also installed TrueCharts and Syncthing. But I have two problems: (1) I don't know how to set a password; and (2) I don't know how to point syncthing to a particular dataset and share. I tried setting a password within SyncThing but it says "The GUI address is overridden by startup options. Changes here will not take effect while the override is in place" so that's not good! Right now, SyncThing has root access without the need for a password - I need to secure it! As for pointing to a dataset, I don't even know where to try this. Any suggestions? Thanks everyone!
 
  • Like
Reactions: Xan
Top