Cloudflare DDNS Docker Error reading config.json

Hello Truenas community,
I am testing Docker compose on Truenas 24.10.
I am using Dockge to administer the dockers.
My first compose is the Cloudflare-DDNS using timothymiller image timothymiller/cloudflare-ddns.
This is the docker compose:
image

I created a folder for the json file.
This is the jason file:


{
“cloudflare”: [
{
“authentication”: {
“api_token”: “xxxxxxxxxxxxxxxxxx”,
},
“zone_id”: “xxxxxxxxxxxxxxxxxx”,
“subdomains”: [
{
“name”: “xxxxxxxx.com”,
“proxied”: true
},
]
}
],
“a”: true,
“aaaa”: false,
“purgeUnknownRecords”: false,
“ttl”: 300
}


But I am receiving this error:
cloudflare-ddns | :rage: Error reading config.json

My first suspicious is an issue with the owner/group:
I tested different owner/group for the ddns folder without succes
I tried root, www-data, docker/netdata without success
Any idea?

Not tried this with dockage, but the user who typically needs access for apps is User - apps
image

Change the PUID and PGID to 568 (which is the APPS user) and make sure that the APPS user has permission to access the config file/folder/dataset. :slight_smile:

Thanks
I am going to try this, adding apps as user and change the PUID and PGID to 568.

It did not work. I added the apps as user and update PUID and PGID to 568 but no change. I will delete the datasets and redo everything again after updating the 24.10.

Hi, I’m running into the same issue. Have you had any luck with this since posting it?

I’m on 24.10.0.2, and using the latest version of cloudflare-ddns, 3.9. I have PUID and PGID both set to 568 using the .env, just like you have it. Thanks!

Hi,
Step 1: Identify Your System’s User ID

To get started, please identify your system’s user ID. I’ve upgraded my system since installing TrueNAS Core, so you may need to adjust accordingly.

To find your user ID, navigate to the Shell from the menu on your left under “System” and select option 7 if prompted. Alternatively, simply type “id” in the terminal, which will display your current user ID (uid, gid, groups, etc.)

Verify Docker User Access

Next, create a new folder for the DDNS docker and JSON file. To ensure that the Docker user has access to this folder and file, I recommend verifying this by recreating the folder if necessary. You can do this by selecting the “APPS” type option when creating the dataset called “ddns”.

Review Docker Instructions

Before proceeding, please review the instructions for Docker in Electric Eel [ Docker Apps with Electric Eel - Apps and Virtualization - TrueNAS Community Forums]. This will help you understand the correct file structure for your Docker and Stacks setup.

Create JSON File from Scratch

When creating the JSON file, I recommend using “nano” on TrueNAS Core instead of copying it from another computer. If you do need to use a pre-existing JSON file, make sure its owner matches the Docker user on your system, as copying files caused me access issues.

Be Cautious with API and Token

When working with Cloudflare, be careful with the API keys and tokens.

Alternative: Use TrueNAS’s Built-in “ddns-updater” App

If you prefer a more straightforward approach, there is an official TrueNAS app called “ddns-updater” that works well. I used this while trying to install the DDNS directly in Docker.

I hope these steps help you successfully set up your DDNS on TrueNAS