TrueNAS AppsTrueNAS Apps: Tutorials
Application maintenance is independent from TrueNAS version release cycles.
App versions, features, options, and installation behavior at time of access might vary from documented tutorials and UI reference.

Syncthing (Stable)

Syncthing Overview

Adding the Enterprise App

To add the enterprise train Syncthing application to the list of available applications:

The stables and enterprise train versions of the Syncthing app widget display on the Discover application screen.

Before Installing Syncthing

Before launching the app installation wizard, do the following:

  • Create the required dataset, config and an optional data1.

    Syncthing stores configuration information in the config dataset. You can use the data1 dataset to store application data.

Create the two datasets before beginning the app installation process. You can organize these under a parent dataset to keep the Syncthing storage datasets separated from datasets for other potential applications. For example, create a parent dataset syncthing with the two child datasets nested under it.

  • If not already assigned, set a pool for applications to use.

  • (Optional) Create a new TrueNAS user to serve as the administrator for the app

    Either use the default user and group IDs or create a new user with Create New Primary Group selected. Make note of the UID/GID for the new user.

Installing the Syncthing Application

This basic procedure covers the required Syncthing stable app settings. For optional settings, see Understanding Syncthing Wizard Settings.

Go to Apps, click on Discover Apps, locate the app widget by either scrolling down to it or begin typing the name into the search field. For example, to locate the MinIO app widget, begin typing minIO into the search field to show app widgets matching the search input.

Click on the widget to open the app information screen.

Click Install to open the app installation wizard.

Application configuration settings are grouped into several sections, each explained below in Understanding App Wizard Settings. To find specific fields begin typing in the Search Input Fields search field to show the section or field, scroll down to a particular section, or click on the section heading in the list of section on the upper-right of the wizard screen.

Install Syncthing Enterprise Screen
Figure 4: Install Syncthing Enterprise Screen

Accept the default value or enter a name in Application Name field. In most cases use the default name, but if adding a second deployment of the application you must change this name.

Accept the default version number in Version. When a new version becomes available, the application shows an update badge and the Application Info widget on the Installed applications screen shows the Update button.

You can have multiple deployments of the same app (for example, two or more from the stable or enterprise trains, or a combination of the stable and enterprise trains).

Each deployment of the same app requires a unique name. App names can include numbers, dashes, or underscores (for example, syncthing2, syncthing-test, syncthing_1, minio2, etc.).

Use a consistent file-naming convention to avoid conflict situations where data does not or cannot synchronize because of file name conflicts. Path and file names in apps are case-sensitive. For example, a file named MyData.txt is not the same as the mydata.txt file in Syncthing.

Accept the default user and group ID settings (568). If you created a user for this app, change these settings to the UID/GID for that new user.

Accept the default port numbers in Networking, and leave the Host Network cleared. See Network Settings below for more information on network settings.

Configure the storage settings. Syncthing uses one dataset and mount paths, but you can add as many as you want. Set the first to /config with the host path set to the config dataset. Another optional mount point can be /data1 with the host path set to a data1 dataset. The Syncthing stable train app config stores app configuration data. An additional storage volumes such as a data or data1 dataset can store data but this is not required.

Syncthing Storage and ACL Settings
Figure 5: Syncthing Storage and ACL Settings

Select Enable ACL to show the ACL and ACE Entries options.

Enter or browse to select the dataset path.

Next click Add to the right of ACL Entries to show the permissions settings. Set ID Type to Entry is for a USER. Enter the UID as one of the following:

  • The default apps user which is either 473 for apps in the stable train or 568 for apps in the enterprise or community train.
  • The new user ID for the TrueNAS user created to serve as the app administrator.

If setting up postgres storage volumes, the default user id for these volumes is 999.

If there is run-as option defined in the wizard, enter this run-as UID when adding the user ACE entry. If not show in the UI, to find the run-as user ID, refer to the questions.yaml file in the GitHub repository for the application.

Select the permissions level from the Access dropdown list. Enter the UID for the app administration user, and set the level to FULL CONTROL.

Select Force to apply the ACL even if the path has existing data.

See Storage Settings below for more information.

Accept the default values in Resources Configuration.

Click Install.

The Installed applications screen opens showing the application in the Deploying state before it changes to Running when the application is ready to use.

Click Web Portal to open the Syncthing admin interface.

Securing the Syncthing Web UI

After installing and starting the Syncthing application, launch the Syncthing web UI. Go to Actions > Settings and set a user password for the web UI.

Syncthing UI Actions Menu
Figure 8: Syncthing UI Actions Menu

Using the Syncthing Web Portal for TrueNAS

Understanding TrueNAS Syncthing Wizard Settings

The following sections provide more detail explanations of the settings found in each section of the Install Syncthing screen.

Application Name Settings

Accept the default value or enter a name in Application Name field. In most cases use the default name, but if adding a second deployment of the application you must change this name.

Accept the default version number in Version. When a new version becomes available, the application shows an update badge and the Application Info widget on the Installed applications screen shows the Update button.

Configuration Settings

The Syncthing app wizard is configured with all settings required to deploy the container, but you can add additional settings if you want to further customize the app in TrueNAS.

Add Syncthing Variables
Figure 9: Add Syncthing Environment Variables

The app app wizard is configured with all settings required to deploy the container, but you can add additional settings if you want to further customize the app in TrueNAS.

Click Add to the right of Environmental Variables to show a set of fields to configure the application with additional.

You can add environment variables to the app configuration after deploying it. Click Edit on the Application Info widget for the app found on the Installed Application screen to open the edit screen.

User and Group Settings

Accept the user and group defaults settings in User and Group Configuration, or enter new user and group IDs for the user created to administer this app. The default value for User Id and Group ID is 568.

Some TrueNAS apps have predefined run-as user and group IDs. These assignments vary based on the app train and other variables such as installing but not running as the root user.

Default user and group IDs are:

  • 473 for apps in the stable train.
  • 568 for some community apps and all apps in the enterprise train
  • 999 for postgres storage volumes

Accept the default user and group ID in the User and Group Configuration section or enter the user ID for a new TrueNAS user created to serve as the administrator for this app.

Create any app administrator user before installing the application, and take note of the UID. Enter this user ID when configuring the user for the app and as the user when setting up storage volume permissions.

Networking Settings

Accept the default port numbers in Web Port for Syncthing, TCP Port for Syncthing and UDP Port for Syncthing. The TrueNAS Syncthing stable app listens on port 20910. The default TCP port is 20978 and the default UDP port is 20979.

Syncthing (stable) Network Configuration
Figure 11: Syncthing (stable) Network Configuration

All TrueNAS apps are assigned default port numbers. Accept the default port numbers, but if changing port number assignments, enter a number within the range 9000-65535. Before changing default ports, refer to the TrueNAS default port list for a list of assigned and available port numbers.

Host Network is selected by default, but it is recommended to disable this as it binds to the host network. Select to allow auto-discovery to work. If not selected, enter the network settings for TrueNAS in the web portal for the application.

Clearing the Host Network checkbox shows the TCP and UDP port numbers, and the web UI listens on port 22000.

Advanced DNS Settings

Syncthing Add Advanced DNS Options
Figure 12: Syncthing Add Advanced DNS Options

The app does not require configuring advanced DNS options. Accept the default settings or click Add to the right of DNS Options to enter the option name and value.

Storage Settings

The Syncthing stable train app requires one storage volume/dataset to store configuration data and you can use a second dataset for app data storage. Create one named config and the other dataset named data1.

To allow TrueNAS to create the storage volume, leave Type set to ixVolume (Dataset created automatically by the system). This is recommended for a test deployment of an app but not for a full app deployment.

To use an existing dataset, which is the recommended option, set Type to Host Path (Path that already exists on the system).

Either accept the default value in Mount Path or enter the correct mount path. For example, if the dataset name is data, enter /data as the mount path.

Select Enable ACL to show the ACL and ACE Entries options.

Enter or browse to select the dataset path.

Next click Add to the right of ACL Entries to show the permissions settings. Set ID Type to Entry is for a USER. Enter the UID as one of the following:

  • The default apps user which is either 473 for apps in the stable train or 568 for apps in the enterprise or community train.
  • The new user ID for the TrueNAS user created to serve as the app administrator.

If setting up postgres storage volumes, the default user id for these volumes is 999.

If there is run-as option defined in the wizard, enter this run-as UID when adding the user ACE entry. If not show in the UI, to find the run-as user ID, refer to the questions.yaml file in the GitHub repository for the application.

Select the permissions level from the Access dropdown list. Enter the UID for the app administration user, and set the level to FULL CONTROL.

Select Force to apply the ACL even if the path has existing data.

If the app requires additional datasets, click Add to the right of Additional Storage to show the storage volume fields. Repeat the instructions above for each dataset to add.

Click Add to show the mount and host path fields for each additional dataset and if creating storage volumes for postgres data and postgres backup.

Config and Data1 Host Path ACL and ACE Settings
Figure 13: Config and Data1 Host Path ACL and ACE Settings

Mounting an SMB Share

The TrueNAS Syncthing app includes the option to mount an SMB share inside the container pod.

Use the SMB option to data synchronization between the share and the app.

Set Type an SMB/CIFS Share (Mounts a persistent volume claim to a SMB share) to use add an SMB share storage volume.

Select Read Only to make the storage volume read only.

Enter the path inside the container to mount the storage for the share volume in Mount Path.

Enter the server address for the SMB share in Server, the path to mount the SMB share in Path, and the share authentication user credentials in User and Password. (Optional) enter the share domain name in domain.

Permissions are currently limited to the permissions of the user that mounted the share.

Resource Configuration Settings

Syncthing Enterprise Resource Limits
Figure 15: Syncthing Enterprise Resource Limits

Accept the default values in Resources Configuration or enter new CPU and memory values. By default, this application is limited to use no more than 2 CPU cores and 4096 Megabytes available memory. The application might use considerably less system resources.

To customize the CPU and memory allocated to the container (pod) the app uses, enter new CPU values as a plain integer value (letter suffix is not required). The default is 4096.

Accept the default value 8 (Gb) allocated memory or enter a new limit in bytes. Enter a plain integer without the measurement suffix, for example, 129 not 129M or 123MiB.