TrueNAS SCALETrueNAS SCALE Documentation Archive
This content follows the TrueNAS SCALE 22.12 (Bluefin) releases. Archival documentation is provided for reference only and not actively maintained.
Use the Product and Version selectors above to view content specific to different TrueNAS software or major version.

Adding a Google Photos Cloud Sync Task

Google Photos works best in TrueNAS using a Google Photos API key and rclone token.

Creating the API Credentials

On the Google API dashboard, click the dropdown menu next to the Google Cloud logo and select your project. If you do not have a project, click NEW PROJECT and enter a value in Project name, Organization, and Location.

GooglePhotosAPINewProject

Enable API

After you select your project, click Enabled APIs & Services on the left menu, then click + ENABLE APIS AND SERVICES.

GooglePhotosAPIEnableAPIsandServices

Enter photos library api in the search bar, then select Photos Library API and click ENABLE.

GooglePhotosAPIPhotosLibraryAPISearch

GooglePhotosAPIClickEnable

Configure Authentication

Next, click OAuth consent screen on the left menu, select EXTERNAL, then click CREATE.

GooglePhotosAPICreateExternal

Enter a value in App name and User support email.

GooglePhotosAPIAppInformation

Enter an email address in the Developer contact information section, then click SAVE AND CONTINUE.

GooglePhotosAPIDeveloperContactInformation

Continue to the Add users section, enter your email address, then click ADD.

GooglePhotosAPIAddTestingUser

On the OAuth consent screen, click PUBLISH APP under Testing and push the app to production.

GooglePhotosAPIPublish

You can leave the app in testing mode, but your cloud sync task fails when your testing app credentials expire after seven days.

Create Credentials

Click Credentials on the left menu, then click + CREATE CREDENTIALS and select OAuth client ID.

GooglePhotosAPIAddCredentials

Select Desktop app in the Application type dropdown, then enter a name for the client ID and click CREATE.

GooglePhotosAPICreateOAuthClientID

Copy and save your client ID and secret, or download the JSON file.

GooglePhotosAPICopyIDandSecret

Configuring Rclone

Download rclone for your OS and open it in a command line utility. The example photos in this article use Powershell in Windows OS.

Enter rclone config, then enter n to create a new remote.

GooglePhotosAPIrcloneConfig

Enter a name for the new remote, then enter the number from the list corresponding to Google Photos.

Enter the client id and secret you saved when you created the Google Photos API credentials, then enter false to keep the Google Photos backend read-only.

GooglePhotosAPIrcloneConfig2

Do not edit the advanced config. When prompted about automatically authenticating rclone with the remote, enter y.

A browser window opens to authorize rclone access. Click Allow.

In the command line, enter y when prompted about media item resolution to complete the configuration.

Copy and save the type, client_id, client_secret, and token, then enter y to keep the new remote.

GooglePhotosAPIrcloneConfig3

Creating Google Photos Cloud Credentials

GooglePhotosAPIAddCloudCredentials

Open your TrueNAS Web UI. Go to Credentials > Backup Credentials and click Add in the Cloud Credentials widget.

Select Google Photos as the Provider and enter a name.

Do not click Log In To Provider.

Paste the Google Photos API client ID and client secret in the OAuth Client ID and OAuth Client Secret fields.

Paste your rclone token into the Token field.

Click Verify Credential to ensure you filled out the fields correctly, then click Save.

Creating the Cloud Sync Task

To add a cloud sync task, go to Data Protection > Cloud Sync Tasks and click Add. The Add Cloud Sync Task configuration screen opens.

AddCloudSyncTaskTop

  1. (Required) Type a memorable task description in Description.

  2. Select an existing backup credential from the Credential dropdown list. If you have not added the cloud credential, click Manage Credentials to open the Backup Credentials screen.

  3. Select the option from Direction and in Transfer Mode.

  4. Select the dataset location in Directory/Files.

  5. Cloud provider settings change based on the credential you select. Select or enter the required settings that include where files are stored.

  6. Select the time from the Schedule options.

  7. Click Save to add the task.

You can use Dry Run to test your configuration before you click Save or select the option on the Cloud Sync Task widget after you click Save.